In our previous post, we demonstrated using a Groovy template for data validation. In this blog, we will explain another Groovy Template for User Variables within Oracle’s EPM Cloud.
User Variables are commonly used in EPM applications from dynamic filters in data forms to business rules. User Variables are created by system administrators and are associated with a specific dimension. Once User Variables are defined and implemented in the application, users will need to update their values. This is done by accessing User Preferences.
In this demonstration, we will show how we can make a Groovy Template to let Planning users set their User Variables by accessing a Task List instead of the standard interface. Allowing users to set their variables via Task List offers flexibility and consistency when navigating Planning tasks.
To start with the Groovy script, we will need to define a Calculation Manager variable to prompt users to select a member value for their variable. Then, we need to retrieve the User Variable and set the values based on user selection.
The script will look like this:
What if we need to set more than a user variable?
If that is the case, then it’s best to use a template to create a Groovy script that can be used to update any user variables.
Like in the previous post, we will create a text-based template and modify the script to make it dynamic.
To do so, we will need three Design Time Prompts (DTP):
- DTP for the dimension that’s associated with the user variable
- DTP for the user variable
- DTP for the value
The same script can be used in the template with few changes to include the DTP variables, making the script more dynamic and reusable for any user variable.
We will create a business rule for every user variable that needs to be updated. In this example, we have two variables for Entity and Year dimensions, so we need to create two business rules and use the Groovy template.
Once the Business Rules are created, validated and deployed, we can assign them to a Task List. By giving Planning users access to the Task List and assigning launch access to the business rules, Planning users will be able to select their User Variables directly from the Task List.
Want to know more about maximising your Oracle EPM solution? Contact us.