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 the multiselect lookup component in page builder.
To configure an array data type, follow these steps:
- Enter the name for your array.
- Select the array data type and choose the subtype for items in the 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.
- Use Add object parameter and add as many parameters as you require. For example, in the following image, every object in the users array can contain
userName
anduserEmail
parameters:
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 including helpers, data variables as defined in the handlebars format in addition to context changing:
You can also test your configured JSON template by using the test with parameters feature. 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 with null during JSON body template processing. It is also possible to enforce value enquoting with the enquote Handlebar helper.
Examples:
Array examples:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论