Leaving and Returning to a Form While Editing

While you are editing a new or existing record on a VPME form, you can leave the form and bring up another form before you save your changes. When you return to the form you were editing, the default VPME behavior is to present a warning message that looks like this:

When you click OK, you can continue editing and then save or cancel your changes when you are ready.

Most developers want the warning message so that users are reminded upon returning to a form that changes were previously made that need to be dealt with. However, some developers do not want the warning message and default behavior. Therefore, instead of the default Leave-Return behavior, you can change the behavior to one of the following alternative behaviors:

       No Message Automatic Save: When you return to the form, no warning message is displayed and any changes you made before leaving the form are saved automatically.

       No Message No Save: When you return to the form, no warning message is displayed and no save is performed. You can continue editing and then save or cancel your changes when you are ready.

       No Message First Time No Save: The first time you return to the form, no warming message is displayed and no save is performed. If you leave and return to the form again, the behavior returns to the default behavior of a warning message and no save.

How to Modify Leave-Return Behavior

You can choose the Leave-Return behavior you want through the three logical form properties shown in the following table. The first column of the table shows the property settings required for the default and alternative behaviors. If you want an alternative behavior when you create a form, set these form properties to obtain the Leave-Return behavior you want.

Property Settings

Leave-Return Behavior

lAutoSaveOnReactivation = F (default)
lMessageOnReactivation = T (default)
lMessageOnReactivation_NotThisTime = F (default)

Default behavior.
Warning Message - No Save

lAutoSaveOnReactivation = T
lMessageOnReactivation = T
lMessageOnReactivation_NotThisTime = F

No Message Automatic Save.

lAutoSaveOnReactivation = F
lMessageOnReactivation = F
lMessageOnReactivation_NotThisTime = F

No Message No Save.

lAutoSaveOnReactivation = F
lMessageOnReactivation = T
lMessageOnReactivation_NotThisTime = T

No Message First Time No Save.

Special Related Forms Situation

When you are editing a Related Forms parent and open a form that is a child of the parent form, the behavior is a little different. To prevent the possibility of creating orphan child records, the parent form is automatically reactivated immediately and you must save your changes on the parent form. Whatever Leave-Return behavior you have set up for the parent form is activated.

More:

Defining Data Dictionary Properties for Non-Data Controls