Tips & Tricks: EcoSys Looping Actions
Looping Actions, introduced in EcoSys v8.2, were created to allow an action to run multiple times without requiring end users to manually run the action multiple times.
How Looping Actions Work
A Looping Action pulls a report to populate the parameter and then continues to run for each row in the report. This report is also known as the Looping Report.
To break this down, the Action loops based on the data returned in the Looping Report. The Looping Report provides a field value, which then feeds the Action’s parameter field, allowing the Action to run multiple times until the entire list is completed. Think of the report as a checklist that the action is running for each item on the list. If the Looping Report returns 1 row of parameter values, the Action will run once. If it returns 2 rows, the Action will run twice. When all of the multiple runs are complete and the list of data to loop by is exhausted, then the Looping Action is complete.
How Do Looping Actions Occur in Action Batches?
We might have a series of actions such as: A user wants the ability to run a multiple project snapshot as well as close the current period. This requires that we have a looping action with a list of projects that will Snapshot Project Data. When all of the snapshots actions in the Looping Report have been completed then it will move onto the next Looping Action of closing the current period of the multiple projects.
Looping Actions can be followed or preceded by either a standard action or a looping action.
With a set series of parameters, the actions will run multiple times until the actions are complete and then the next action in the Action Batch will run and so on until the Looping Action is complete.
Configuring Looping Actions
- Navigate to Configure > Actions
- Select the Action to loop.
- Select the Options
- Check: Loop using Report
- Select the Report Hyperlink
- Select your Looping Report.
The Looping Report must have a field ID that matches the Looping Action’s parameter ID (with the Screen Settings Save Mode set to None) in order for the Report to link to the Action.
For example, if the selected Looping Report has a field ID of LoopCostObject, then the Looping Action should have a parameter ID of LoopCostObject and a Screen Settings Save Mode set to None with a Data Type of Cost Object. The report’s field will pass to the LoopCostObject parameter ID in the Action. The Screen Settings Save Mode of None eliminates the passing of parameter values between screens, allowing for the parameter value to be populated by the report’s field ID. With this configuration, we now have a report and an action with a matching value. EcoSys will then tie the values that are produced by the report to the parameters present in the action. The action will run based upon the number of rows in the report.
Looping Action Sort
A feature that was released in EcoSys v8.4 for Looping Actions includes a new option to respect the sort order of the looping report. The Report will define the particular order of processes or query’s that have to run for the Action to run correctly. For example, you might have children of a Cost Object that have to be closed before the Parent Cost Object to update an attribute or the Status of a Cost Object.
In order to configure a Looping Action to Sort, a new field called Apply Report Sort Settings was added under the Loop using Report field in the Options tab.
To configure a Looping Action to sort requires a multi-step process:
- Navigate to Configure > Reports, to create a Report
- Verify that a field is configured to align with the parameter of your Looping Action
- Configure any required sorting under the Sort tab to display data in the order that you would like the action to run.
- Navigate to Configure > Actions
- Select or Create the Action that you would like to Loop and Sort.
- Verify that a parameter is configured to align with the field of your Looping Report
- Select the Options tab
- Check: Loop using Report
- Select your Looping Report
- Check: Apply Report Sort Settings
Use Cases:
- Multi Project Snapshot – Feed a list of Projects determined by an Organization through the Snapshotting process in one click.
- Multi Project Close Period – Feed a list of Projects determined by an Organization through the Close Minor Period process in one click.
- Updating Transactions that would typically be filtered on Related Objects – Now the filtering can be done at the best performing subject area and then feed corresponding attributes directly to transaction attributes to be filtered on. This in turn speeds up the read and writing of this data.
Looping Actions was a highly anticipated feature of EcoSys that now streamlines our clients’ processes with very positive results.