Sequences
Interface Feature Availability
When using Produce web interface the sequence will be claimed when shown on screen. Using Offline Apps the sequence will be claimed after submission.
Designers can now define sequences that can be leverage across SmartIQ forms. They will be created following a specified pattern during run time. Creating sequences requires Design permissions.
Create a new Sequence
- Navigate to SmartIQ Manage and click on Sequences on the right side menu.
- Click on New Sequence
- Provide to following information:
Property | Description |
---|---|
Name | User description of what the sequence represents |
Format | Pattern that the sequence number can be formatting into. If blank just a plain number will be returned from the sequence. Otherwise it will be included in the format string. |
Start Value | Start sequence number. |
Restart | The value of a sequence can be set to restart from 1 after a date has passed. This can be set to year, month, or day calculated in the provided timezone. This can be set to year, month, or day calculated in the provided timezone. |
Format Sequence Patterns
The following replacement tags are supported:
{{num}}
Sequence number.{{year}}
Current year.{{yy}}
Current 2 digit year.{{month}}
Current month.{{day}}
Current day.
Replacement tags can have numeric format options. For example {{num:0000}}
inserts the sequence number with leading zeros.
For the Format ABC{{year}}{{num}}
the first sequence value will be "ABC20191"
Usage in Design
Sequences can be used in Design via a variable question. The user sequences are added to the variable drop down list. Once a form instance has generated a sequence value for an answer it will be remembered and not regenerated for each call.
To get multiple numbers use multiple answers referencing the same sequence.
Note
Sequence and Guid variables are reset when reloading a completed answer file.
Step by Step
- Go to Manage > Sequences and create a new Sequence called "CustomSequence" with the following Format:
AP{{num:00000}}-{{yy}}-{{month}}-{{day}}
- Click Save.
- In Design, drag and drop a new Variable question and select the newly created Sequence.
- Add a label and reference the Variable.
Your project should look similarly to this
And every time a form is loaded it will display a sequence like: AP00009-19-11-19
Important
To guarantee consecutive sequences, do not display a sequence on screen or use in a calculation or variable assignment. This will allowSmartIQ to calculate the formula on transition/submission. If a sequence is displayed on screen or used in a calculation or variable assignment, it will considered as claimed.
Updated about 2 years ago