Some forms require a long time to fill out (think: 150-point inspection that takes hours). If a user takes a break and/or the session times out, all entries to that point could be lost. But there is a better way.
The following methodology allows users to enter and save as they go, risking nothing. If the session times out they can log back in and resume where they left off, with no data loss.
Summary:
Instead of entering data directly into a form, the user will enter data into an action that writes to the form.
Implementation:
Create the object and form as you normally would.
Place an invisible button over one of the entry fields on the form.
- This means you will have two controls stacked on top of each other, i.e., an entry field and a button. Be sure the button is on top and fills up the cell.
- Do not give the button an image; it needs to be invisible.
- Check the “Enable in read mode” box so the action works all the time, not just in Edit mode.
Back in the object, create an action for the button.
- Make it hidden.
- Give it an alias (usually the same as the name, but without spaces). You need an alias for the form binding.
- The action property is for the entry field. The default value should be the database value so it shows whatever was previously entered.
- The XML should write the user-entered value to the database.
Back on the form, bind the button to the action. You can get the binding from the action menu.
Now when the user touches the form they get a prompt. They enter the value(s) and save, which writes their entry to the database. Then it re-displays the form with the value they just entered. It doesn’t matter if the user shuts off their device or it times out or whatever – the data has been entered and is safe. When they sign back on it will all be there.
Notes:
We described having one button for one entry field because it’s easy to explain. Depending on the form it may make more sense to group several entry fields into one action, such as all the entries in a row or section of the form. If you do this you may need to create a lot of buttons, all with the same binding, so no matter what entry field the user touches the same action appears.
Since the actions are hidden you can name them whatever is most helpful for you as the designer.
You can also create a simple form for the action if you want it to have the same UI as the form.
The first time you do this we suggest you get help from one of our Application Consultants. Your account rep can help arrange it.