In a script, the DynamicBindings function binds parameters on a form: the input parameter Field 1 (String) and the output parameter Field 2 (Money). bindingStore is the code of a variable of an arbitrary type from the context of the bound form. Dynamic fields properties are described in TSSDK Help.
The script:
Code:
async function DynamicBinding(): Promise<void> {
ViewContext.data.bindingStore =
{ 'field1': { name: 'Field 1', type: DynamicFieldType.String, input: true, },
'field2': { name: 'Field 2', type: DynamicFieldType.Money, output: true, },
}
}
The script is run when a user clicks the button on the form.
Run settings:
- Add the Code widget to the form.
- Open widget settings.
- On the Main tab in the Event on click select the DynamicBinding client script.
- Save and publish the form.
You can learn more about setting dynamic binding in Activities in custom modules.