JavaScript Property Formulas within DRM

Steve Davis

By
July 29th, 2015


Data Relationship Management (DRM) v11.1.2.3 includes a cool feature that changes the way to write dynamic scripting using JavaScript for your custom derived property and validations. JavaScript has been around for over a decade, but it hasn’t been available to use within DRM until the release of v11.1.2.3. What this means to users is that they now have the option to use JavaScript instead of the legacy formula language within the property formulas. Users can use it to loop through your code and to create functions that can be called by the main routine. Sounds great, right? Well there’s a catch: Although robust, using the JavaScript language has a learning curve.

Oracle added the JavaScript functionality to DRM in order to provide a means to deriving properties.  This scripting option provides access to a real programming language, offering a lot of new possibilities along with significant performance improvements over legacy DRM formulas. On a visual note, it’s much easier to read because the scripts can contain carriage returns and indentations.

As you might expect, the JavaScript functionality comes with some disadvantages and offsetting advantages.

The disadvantages are as follows:

  1. It’s a new technology so it’s going to have bugs.
  2. Javascript properties don’t populate initially.
  3. Remove Duplicates doesn’t work on js props.
  4. js does not return globalNode values.
  5. isDefinedPropVal does not return value.

All of these are worth the advantages, which are many:

  1. Performance—always a good one!
  2. JavaScript is a well-known language—many users will already have a leg up because of this one.
  3. Create Variables—makes the return value becomes much simpler to understand.
  4. Create Functions—makes the formula more robust
  5. Looping—allows for more functionality

You’re also going to find differences between Legacy and JavaScript.

Legacy:
Excel Like FormatAdd(1,2)Result: 3Substring(acct:1234,1,4)Result: acct 
Javascript:
Javascript Formatreturn 1+2;Result: 3str=‘acct:1234’return str.substring(0,4);

Result: acct

 

The differences provide the flexibility of letting you decide which approach fits the scenario you are working in.

Keeping the above in mind, after working with JavaScripting since its release over a year ago, it’s clear there are some intricacies that are not intuitive. In addition, even with all the benefits of the feature, novices to experienced programmers will face a fairly steep learning curve and be willing to make some process changes. It’s definitely worth the effort, though.

To learn how to use JavaScript property formulas in DRM, watch this recorded webinar.


Watch Recorded Webinar




Steve Davis

About Steve Davis

Steve Davis is a Principal Architect with over 18 years experience in all phases of design, development, and implementation of computer applications. His work with DRM and EDMCS includes integration with HFM, FDM, Planning, Essbase, EPM Cloud apps (e.g., PBCS, EPBCS, FCCS, etc.) EBS, PeopleSoft, SAP, OBIEE, and Data Warehouse. Steven has developed and delivered end-user training and designed MDM solutions around specific company requirements, leading the upgrade of multiple technical infrastructure projects. Steven frequently presents on data governance, most recently at OAUG Collaborate, the Altamont Group Business Forecasting Summit, and Kscope.

Leave a Reply

Your email address will not be published. Required fields are marked *