OUR NEWS

OUR NEWS

Oracle EPM Cloud: Groovy Templates - User Variables

Posted by Taysols on Aug 4, 2020 2:31:38 PM
Taysols
Find me on:

EPM Groovy Templates User Variables

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:

1 - Groovy Script User VariablesIn this script example; it will prompt the user to select a value and save it for a user variable called “Year”.

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):

  1. DTP for the dimension that’s associated with the user variable
  2. DTP for the user variable
  3. DTP for the value

2 - DTP Prompts

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.

3 - DTP ScriptNow we have the template ready.

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.

4 - UV EntityTo use the template in the business rule, drag and drop the object into the main rule body and select the DTP values. In this example, the DTP values are for the UV_Year and the business rule.

5 - SetUserVariable6 - User Variable ScriptOnce 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.

7 - User PreferencesFinally, let’s verify the business rule is working and select a member for Entity User Variable. The rule should prompt the user to choose a value from the Entity dimension.

8 - Set_UserVariable_EntityAfter successfully testing the business rules, we can verify the variables are successfully being updated by navigating to user preferences and seeing if the variables are listed, as seen below:

9 - Preferences-1And that’s it. You’ve successfully created a Groovy Template allowing for Planning users to set their User Variables and enhance standard out of the box function of your Oracle EPM Cloud.

Want to know more about maximising your Oracle EPM solution? Contact us.

 

 

 

 

 

 

 

 

Topics: EPM, Oracle