The Loop through Grid action is used to apply a number of actions to a set number of records within a grid.
For example: You have a table with an Active status field. Using a checkbox column, a user can select a set of records within the grid and have an action to update these records to a status of Yes.
- Select a grid: a grid, available on the current screen, to loop through
- Only select rows that are checked: Normally, the loop will go through the entire grid. Checking this, it will only loop through the checked rows
If rows are not selected, this action will loop through all the records in the grid. However, the view filters are preserved.
So, if your grid has multiple pages, the action will loop through all the records on each page.
However, if your filtering your grid (i.e. a view filter to show only active records), only the records available in the grid will be affected by the action.
Any record not shown on any page of the grid will not be touched by the Loop through Grid action.
Note: The Loop through Grid action will do the same thing as the Loop through Table action, however Loop through Grid allows the user to manually select which records to include in the loop.
Actions are embedded within the Loop Through Grid action. When you hover over the action, the plus sign will add an action indented underneath the Loop Through Grid action.
You can also drag and drop other actions within the Loop Through Grid action.
These actions will be applied to every record being looped through.
In this example, the action is set up to go through all the records in a grid with a yes/no field called IsActive.
Embedded in the loop is another action, Update Fields in Table. Note the line which groups it to the Loop.
Within Update Fields in Table action, you can set the criteria to compare values to what is available from the grid loop.
The Update Fields in Table function will take the action result and update the Name field in the table. Which record will it choose? Within the Criteria Builder, again, you can use the Record ID under the Loopsection, which is the Record ID of the current record within the loop.