Page tree

To summarize the contents of the record for the last 24 hours, you will iterate over the rows in the CSV file and use a couple of the temporary variables to count the number of approvals and rejections.

  1. In Rule Builder, from the Edit menu, select Manage Variables.
  2. Click the Temporary Variables tab.
  3. Click the Add Variable button.
  4. In the new row that appears, in the Name box, type Number_Of_Approved.
  5. In the Data Type list, select Integer.
  6. Click the Add Variable button again. and
  7. In the Name box, type Number_Of_Rejected and in the Data Type list, select Integer.
  8. To confirm the creation of the variables and to close the Manage Variable Editor, click OK.
  9. From the Flow tab, drag a Split action onto the link between the Read CSV action and the Disable Rule Set action.
  10. Double -click the Split action and edit the action's parameters as follows:
    1. For Items parameter, in the Value column, navigate to CSV Parsed OK > CSV Data (Page Approval Record) > row.
    2. For Per Group Delay parameter, in the Value column, click the Edit Value button and in the Minutes list, select 1. Such a long delay is fine, as a Next action is going to be appended to the end of the rule chain to ensure that each iteration of the split completes as quickly as possible.
    3. Click OK.
  11. In the Split action, disconnect the Disable Rule Set action from the Each Split event and connect it to the Done event by selecting the connecting link and dragging it from the Each Split event to the Done event.
  12. In the Changing Trigger Event message that appears, click OK.
  13. On the Flow tab, locate the Branch action and drag it to the Each Split event of the Split action.
  14. Set the Branch action's condition to Split (tableRow) > State Begins With Approved.
  15. From the Actions tab, drag a Set Variables action over the Yes event of the Branch action.
  16. Double-click the Set Variables action.
  17. In the Parameter column, click %triggerEvent%. Then in the list that appears, expand the Temporary Variables group and select the Number_Of_Approved variable.
  18. Use the Set Variables action to increment the Number_Of_Approved temporary variables value. The following expression can be used to increment the value—it must be pasted directly into the Number tab of the Parameter Value editor: 1+%@Number_Of_Approved%.
  19. From the Flow tab, drag the Next action over the Set Variables Changed event resulting action.
  20. From the Flow tab, drag the Branch action over the No event of the existing Branch action.
  21. Set the Branch action's condition to Split (tableRow) > State Begins With Rejected.
  22. From the Actions tab, drag a Set Variables action over the Yes event of the Branch action.
  23. Double-click the Set Variables action.
  24. In the Parameter column, click %triggerEvent%. Then in the list that appears, expand the Temporary Variables group and select the Number_Of_Rejected variable.
  25. Use the Set Variables action to increment the Number_Of_Rejected temporary variables value. The following expression can be used to increment the value—it must be pasted directly into the Number tab of the Parameter Value editor: 1+%@Number_Of_Rejected%.
  26. From the Flow tab, drag the Next action over the Set Variables Changed event resulting action.
  27. From the Flow tab, drag another Next action over the No event of the second Branch action. 
    The split loop of the rule chain should now look as follows: 

  • No labels