Forum Academy Marketplace Showcase Pricing Features

Mathjs - returning text; need number

I have a Data Type ‘Rand’ with a Data Field ‘myNum’ and I’m trying to initialize the random number from mathjs as shown in the screen shot below. But, I’m getting an error that ‘myNum’ is expecting a number and mathjs is returning a string.
Is there a way around this?

Some options in no particular order …

A. Move the numerical calculations into the mathjs expression, then use it as a text field elsewhere.

B. Get the plugin author’s attention on this thread.

C. Use the API connector instead of the plugin and define the returning value as number.

D. Convert the returning string to number by setting it into an Input text’s value, then return as number.

I’m looking forward to see what direction you take.

I get it! (love this platform)

went with ‘C’ - totally didn’t know there was an API connector plugin


1 Like