- Introduction to WorkXpress
- Building Your Application
- Examples and Best Practices
- Technical Manual
A loop allows a series of actions to run over a selected group of actions. You will set up the loop and then inside of it nest the actions you wish to repeat. A loop's position starts with the index of 1 and increments by 1 for each iteration.
This is a simplified option to use the inherited query from a list. For example, when you've selected records in a list and click a mass action button.
Use the Query Builder that returns records. Then, create actions within this loop. The actions in this loop will be repeated once for each record that is returned by your query.
Set the number of times to repeat a series of actions by choosing a field that contains this number, or by building an expression that returns this number. The current loop count is available to actions in the loop. This is useful if you wish to create a specific number of records of a certain type.
This type of loop is used to split up a string of text, and perform automation based on the contents of each part of the string. For instance, in a scheduling app, you could create a multi-date field on a form, and prompt the user to select each date for which a certain task needs to be accomplished. You could then split the output of the multi-date field (in this case, split by a comma-space: “, “) and loop over the parts, creating one task record for each date that was selected.