Dynamic fields RPC
The dynamic fields RPC generates dynamic fields inside a module. You can do this by adding a couple of properties to the output
with some modification to match the syntax of the app builder.
Details to consider
Pay close attention to the
type
. For example, Make doesn't accept"type": "string"
. In this case, you need to change it to"type": "text"
.Specify the
name
for a field. Otherwise, you will not be able to access it in the communication of a module.Properly convert field types between your service types and Make types. One of the ways to resolve it is to use custom IML functions.
The rest of the properties (like options
, default
, nested
, etc.) are also available and can be used according to the selected parameter type. The only difference is that instead of creating parameters manually you create dynamic parameters.
{
"response": {
"iterate": "{{body}}",
"output": {
"name": "{{item.key}}",
"label": "{{item.label}}",
"type": "text",
"required": "{{item.isRequired == 1}}"
}
}
}
Examples
RPC with only dynamic parameters
[
"rpc://nameOfMyRemoteProcedure"
]
RPC with custom fields (additional dynamic parameters)
[
{
"name": "defaultField",
"label" : "Default Field",
"type": "text"
},
"rpc://nameOfMyRemoteProcedure"
]
Select parameter with nested dynamic parameters under a specific option
[
{
"name": "param",
"label": "Parameter",
"type": "select",
"options": [
{
"label": "Option 1",
"value": 1,
"nested": "rpc://NameOfMyRemoteProcedure"
}
]
}
]
Last updated