Skip to main content
Nintex Community Menu Bar
Knowledge Base

How to iterate actions over multiple model rows (SFX, NLX)

  • August 28, 2024
  • 0 replies
  • 50 views

Forum|alt.badge.img+10

Topic

Although you can use a mass action to make the same change to multiple table rows at once, a mass action cannot iterate its action sequence separately over each selected row. You may sometimes want to offer end-users an action sequence that will run from start to finish for each selected row.

 

Instructions 

Add a checkbox field:

  1. Add a UI-only checkbox field to the table's model, and give it a descriptive label.
  2. Add a model action to the table's model that will run any time a field the UI-only checkbox field is changed.
  3. In this model action's Actions tab, set up the action sequence that should iterate over each row the end-user has selected.

Set up a mass action on the table:

  1. Add a mass action to your table.
  2. In the mass action's action sequence, add an action to "Update Rows" in your table's model. 
  3. For "Rows to use," select "Rows in context."
  4. Click Add field to update option from the more options menu (
     button) to add a field to be updated. Select the UI-only checkbox field you added in step 1.
  5. Set the field value source to "Single specified value" and set the Value to 'true' by checking the box.

Now, when users select rows in your table and run this mass action, each row's checkbox will be checked. This will cause the model actions you added earlier to run start-to-finish once for each selected row. 

 

Additional Information

Considerations

  • This approach is appropriate for smaller or simpler processes. For larger data sets or more complex processes, consider server-side options like Salesforce Flows or Nintex Automation Cloud.
  • Be conscientious about how complex your action sequences are. If your users are going to trigger them to run on many records, this may take a while to complete. You may want to add an action to your mass action to block the UI or hide certain page components while the action sequence is in progress to prevent users from accidentally interrupting the process.
  • If there are too many selected records, or too many actions involved the operation may time out or cause unexpected behaviors.
  • The checkbox field you add to the model doesn't need to be visible in the UI to perform its function.

Documentation: Action Framework