Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Array in FormCalc

Avatar

Former Community Member

Hi,

Could someone please let me know how to use array in FormCalc? Any example or reference notes will be of great help.

Thanks,

VJ

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

FormCalc is a simple scripting language and does not support objects like arrays.

The only function that come close to an array in JavaScript is Choose(),

This first parameter selects the nth value of the following comma separated strings.

Choose(3, "String1", "String2", "String3", "String4")

returns String3

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Hi,

FormCalc is a simple scripting language and does not support objects like arrays.

The only function that come close to an array in JavaScript is Choose(),

This first parameter selects the nth value of the following comma separated strings.

Choose(3, "String1", "String2", "String3", "String4")

returns String3

Avatar

Level 1

already google it  and test a few suggestions, cannot find it