The getNextSequence() provides the ability to keep track 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 the Unique Id widget with the main difference being the Unique Id widget will increment when it actually hits the server. getNextSequence() will increment locally on the device. Also, each user can have his or her own count on the same device.
With the new iFormBuilder function getNextSequence() we are now able to have unique IDs with the username of the logged in user placed into a field. Please following the instructions below to set this up.
STEP 1: Add a Read-Only or Tex Element to your form.
STEP 2: Add this to the Dynamic Value of the element: iformbuilder.username + " " +getNextSequence()
STEP 3: Test it out to make sure it performs as expected.
- If you delete and reinstall the iForm application on the device, the getNextSequence will start over.
- Currently, this feature only works on iOS devices.