Primavera (MOSC)

MOSC Banner

Looking for ideas to convert 'array of string' to 'array of numbers' using OPPM advance function

edited Oct 27, 2019 5:02AM in Primavera (MOSC) 3 commentsAnswered

Product: OPPM - 18.0 SP1 (build: 9494)

I had a query, we are trying to build a logic where we need to convert 'array of String' to 'array of numbers' as the example below:

array of string A = ("9.25", "19", "78", "57.5", "0", "500")

- the above string needs to be converted to number as below:

array of number B = (9.25, 19, 78, 57.5, 0, 500)

This is possible in the Chrome Debugger when we are using the function 'str.map(Number)'; below is example tested in Chrome Debugger and is fetching required result:

var str=["10.3456"];

str.map(Number);

ans:[10.3456]

But when trying the same in OPPM on a text value type category then this function is not working and OPPM throws an error 'Calculation Error: Function expected'

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center