List Input in Custom Functions (Managed Package)

For the managed package runtime, if an input to your custom function is of the type List<Object>, the input is saved to a VLOCITY-FORMULA-LIST key. To retrieve the input, use code that retrieves this key.

Managed Package app icon This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.

For example:

static List<Map<String, Object>> FUNCTION(List<Object> inputs)
{
       List<Object> listInput = ((Map<String, Object>)inputs[0]).get('VLOCITY-FORMULA-LIST');
       Object variableInput = inputs[1];

      // Rest of Function
}

For a full working example, see the toObjArray function in Sample Apex Code for a Custom Function in Omnistudio for Managed Packages (Managed Package).