Defining a link dynamically
Note
This feature was introduced in C24.10 - beginning of November, 2024.
To dynamically control a link element, the callback handler must respond with an object which defines link properties.
These object properties are mapped to the following link element properties:
{ "href": "string", "text": "string" }
where:
href
corresponds to the URL property.text
corresponds to the Text property.
Example
In this example, the root form contains a table element which displays an array of customer data.
An On row click action is created to trigger a callback called GetWebsite, , which has the request schema mapped to ref field in the user table.
The callback responds with data for the selected customer’s website link, which are mapped to the link element properties.
In this way, each time the user selects a different table row, the link element will be updated.
GetWebsite request schema
{ "type": "object", "$schema": "http://json-schema.org/draft-04/schema", "properties": { "items": { "type": "object", "properties": { "userid": { "type": "string" } } } } }
GetWebsite response schema
{ "type": "object", "$schema": "http://json-schema.org/draft-04/schema", "properties": { "items": { "type": "object", "properties": { "URL": { "type": "string" }, "text": { "type": "string" } } } } }