Microapps

Array data type

Use the Array data type to configure multiple returns in your service action’s configured JSON body. This is useful when developing your microapps to use themultiselect lookupcomponent inpage builder.

To configure an array data type, follow these steps:

  • Enter the name for yourarray.
  • Select thearray数据类型和选择子类型的物品array. Depending on your multi select lookup requirements, the array subtype can be a primitive data type or an object with multiple parameters. Primitive data types result in a list of values, and multiple parameters result in a list of objects with values.
  • UseAdd object parameterand add as many parameters as you require. For example, in the following image, every object in the users array can containuserNameanduserEmailparameters:

Array data type

Configure JSON body

When configuring the JSON body of your array, use mustache tags to reference parameter and template variable names. For example, {{parameterName}}.

For extra configuration options, the JSON body supports handlebars formatting includinghelpers,data variablesas defined in the handlebars format in addition tocontext changing:

Array JSON configuration

You can also test your configured JSON template by using thetest with parametersfeature. This provides feedback on whether your JSON body is configured correctly and valid JSON is generated during action execution.

Mustache tags are either replaced with actual values and enquoted automatically if needed or replaced withnullduring JSON body template processing. It is also possible to enforce value enquoting with theenquoteHandlebar helper.

Examples:

Enquote examples

Array examples:

Array examples

Array data type