Connecting Oracle EPM Cloud Planning to Apex with Rest API: POST Substitution Variables ‘Extras’

In Part 2 of this blog series, HERE, we finished up connecting our Web Source Module Package and Interactive Report, and you should now be able to submit changes straight to your substitution variables in Oracle EPM Cloud Planning from Apex.

Here I’m just going to go through a few quality of life additions.

Let’s begin:

First off, we want to have Apex refresh the substitution variable table we’ve created so we don’t need to refresh the page every time we make a change, this is simply achieved by creating a dynamic action that triggers on the closure of a dialog page.

To do this, create a new dynamic action on the page with our Interactive Report and assign its event as ‘Dialog Closed’, selection type ‘Region’ and then select the Region that contains the report itself.

Then within that create a true ‘Refresh’ action, by choosing the ‘Refresh’ action on the right-hand panel, and once again selecting ‘Region’ and the Region that contains our report.

This should mean once you’ve edited a variable the table it will refresh automatically with any changes you have made.

Next, we want another button that allows you to add whole new variables to your Oracle EPM Cloud Planning application, although rare in a well-established application, this is still worth adding just in case.

The easiest way to go about doing this is to copy your existing page, that we created in post part 2, HERE, (our modal dialog). You will need to update the PL/SQL Code we wrote earlier however to take into account the new names for the text fields as demonstrated below.

 

We then want to make sure the Name and PlanType fields are not made read only for this version of the form as we will want to control these when we make a new variable.

The only other key difference between this and our last modal dialog is that here we don’t want it to remember the last substitution variable we entered when we go to enter another, we want these text fields to appear blank each time we go to create a new sub var.

To do this we go to each of our text fields ‘Source’ settings and change ‘Maintain Session State’ to ‘Per Request (Memory Only)’.

Once complete we just need to insert a new button back on our original Interactive Report that takes you to our new modal dialog page.

This now allows your Interactive Report to both edit existing Substitution variables and add entirely new ones to your Oracle EPM Cloud Planning application straight from Apex.

That’s it for this series of posts on Sub Vars for now, I hope this information proves useful to you, there is no way currently to delete Sub Vars via Rest API so that isn’t a possible function we can add here just yet, but as soon as it’s available I’ll make a new post and let you know how it’s done.

Thanks for reading.

Richard

You can read more of Richard’s blogs on his site HERE