Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

using delta to manually preserve form state on save


Level 3


I see some help information about using something called "delta" to preserve form state upon save, but I haven't had much luck tracking down instructions or examples on how to do that.

I have a form that uses certain programmatic data controls.  They do things like lock fields and gray out their captions or borders to show that they are inactive.  But if a user saves, closes and re-opens the form, they get back the form with the original states for all objects, which defeats the data controls.

I'd really appreciate any insight on what "delta" is and how I can use it here (if indeed I can).

Note that I've already tried using the File>Form Properties>Defaults>Automatically setting (since the security of this form is not very critical) to preserve my form's state upon save, but that setting worked only intermittently.  It preserved the state of some objects, and not other objects.  And the objects whose states were preserved changed from test to test.  Seems to be some kind of bug with that Automatically setting.

And I am saving in dynamic XML.

Thanks in advance,

2 Replies


Level 10

Actually, I don't think the manual restore is going to do much different than the Auto setting.

You're need to script against the values that control your objects for when the form is opened again. The values of checkboxes, etc., are maintained when re-opening a file but the events don't fire again.

So you can fix this quite often by copying the script that controls an object into the form:ready event of the same object. That way when the form is opened the event will fire.

For example if you have a checkbox that is controlling a subform's visibility (probably on the Change event):

if (this.rawValue==1){



Also put that script in the form:ready event.

You can also put a script on the object being controlled to check the value of the object that is controlling it - if checkboxA==1 then I should be visible - that sort of thing.

Hope that makes sense!