What is getNextSequence()?
The getNextSequence() provides the ability to keep track of how many records a user has collected on his or her device. The count starts at 1, and for every record started, the count will increment by 1.
It is similar to the Unique ID element with the main difference being the Unique ID element will increment when it actually hits the server. With the getNextSequence() the count will increment locally on the device. Also, each user can have his or her own count on the same device.
How do I implement getNextSequence()?
STEP 1. With your form loaded in the Form Builder, add a Read-Only element. This can also be a Text, Text Area or Number element.
STEP 2. In the Dynamic Value field of the Read-Only element, place the following: getNextSequence()
STEP 3. Save your form.
STEP 4. Test the functionality on your device.
How do I restart the count?
If you delete and reinstall the iForm application on the device, the getNextSequence will start over.
Download the Form Package below to use as an example to get started.
Please sign in to leave a comment.