# onDataChange and saveData

**URL:** https://forum.servoy.com/t/ondatachange-and-savedata/1288
**Category:** Classic Servoy
**Created:** [February 17, 2004, 10:30am UTC](https://forum.servoy.com/t/ondatachange-and-savedata/1288 "2004-02-17T10:30:01Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)
#### Post date: [February 17, 2004, 10:30am UTC](https://forum.servoy.com/t/ondatachange-and-savedata/1288/1 "2004-02-17T10:30:01Z")

</div>

Don’t know how to describe this, therefore the maybe ‘slightly’ off subject:

I have a field on a form with a tab with a related table. The field has a method onDataChange

I change the value in the field but ‘forget’ to step out.

When you now use the controller to step through the rows there is no issue, the method is fired.

When I step through the related records on the tab, the method is not (and never) fired…

---

<div class="post-metadata">

### Author: ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)
#### Post date: [February 17, 2004, 11:55am UTC](https://forum.servoy.com/t/ondatachange-and-savedata/1288/2 "2004-02-17T11:55:13Z")

</div>

I have a similar problem… I have one combo that fires a method onDataChange. If you play around with it (changing values back and forth) you can manage to change the value but not leave the field and then the method is not fired.

---

<div class="post-metadata">

### Author: ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)
#### Post date: [February 18, 2004, 7:34pm UTC](https://forum.servoy.com/t/ondatachange-and-savedata/1288/3 "2004-02-18T19:34:47Z")

</div>

For both. it would be nice to have a small example solution that demonstrates this.

for example, marcel, on which form is that field with data change?  
the main form or the related form in the tab?

---

<div class="post-metadata">

### Author: ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)
#### Post date: [February 18, 2004, 7:42pm UTC](https://forum.servoy.com/t/ondatachange-and-savedata/1288/4 "2004-02-18T19:42:02Z")

</div>

Johan, the field I try to change is on the main form, I will see if I can upload a test solution this evening…

---

<div class="post-metadata">

### Author: ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)
#### Post date: [February 18, 2004, 7:54pm UTC](https://forum.servoy.com/t/ondatachange-and-savedata/1288/5 "2004-02-18T19:54:15Z")

</div>

Here it is. test.servoy…

When you change the circled (if you can call it a circle) field without exiting and click in the left table you will see (9 out of 10 secure) that the field gets updated but the method is not fired…

---

<div class="post-metadata">

### Author: ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)
#### Post date: [February 18, 2004, 10:51pm UTC](https://forum.servoy.com/t/ondatachange-and-savedata/1288/6 "2004-02-18T22:51:42Z")

</div>

fixed in 2.0RC7  
The changed value didn’t never get saved..

---

<div class="post-metadata">

### Author: ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)
#### Post date: [February 18, 2004, 10:58pm UTC](https://forum.servoy.com/t/ondatachange-and-savedata/1288/7 "2004-02-18T22:58:31Z")

</div>

Thanks again Johan ![:D]( "Very Happy")

---

<div class="post-metadata">

### Author: ![wgknowles](https://avatars.discourse-cdn.com/v4/letter/w/ccd318/32.png) [@wgknowles](https://forum.servoy.com/u/wgknowles)
#### Post date: [May 4, 2004, 4:40pm UTC](https://forum.servoy.com/t/ondatachange-and-savedata/1288/8 "2004-05-04T16:40:52Z")

</div>

I have a checkbox setup to hide extra search options when unchecked.  
When I load the form for the first time and click on the checkbox, the check gets placed, but the method doesn’t fire.

However everytime I click the checkbox thereafter the method executes fine.

Sounds like this bug is back?!

---

<div class="post-metadata">

### Author: ![Jan\_Blok](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@Jan\_Blok](https://forum.servoy.com/u/Jan_Blok)
#### Post date: [May 6, 2004, 1:54pm UTC](https://forum.servoy.com/t/ondatachange-and-savedata/1288/9 "2004-05-06T13:54:23Z")

</div>

We tested this in the example crm addresses tab form on one of the checkboxes and are unable to reproduce this.  
Could you post a small sample solution demonstrating this problem?

---

<div class="post-metadata">

### Author: ![wgknowles](https://avatars.discourse-cdn.com/v4/letter/w/ccd318/32.png) [@wgknowles](https://forum.servoy.com/u/wgknowles)
#### Post date: [May 10, 2004, 6:12pm UTC](https://forum.servoy.com/t/ondatachange-and-savedata/1288/10 "2004-05-10T18:12:25Z")

</div>

Not sure what was causing it to happen, it may have been related to the form not properly loading due to a valuelist problem that was in another post. I think you are ok on this now.
