Dynamic binding of input and output parameters of a custom activity

Discussion in 'Script Use Cases' started by kochetov, Oct 25, 2021.

  1. kochetov

    kochetov New Member

    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:

    async function DynamicBinding(): Promise<void> {
    ViewContext.data.bindingStore =
    'field1': { name'Field 1'typeDynamicFieldType.Stringinputtrue, },
    'field2': { name'Field 2'typeDynamicFieldType.Moneyoutputtrue, },
    The script is run when a user clicks the button on the form.
    Run settings:
    1. Add the Code widget to the form.
    2. Open widget settings.
    3. On the Main tab in the Event on click select the DynamicBinding client script.
    4. Save and publish the form.
    You can learn more about setting dynamic binding in Activities in custom modules.
    Last edited by a moderator: Feb 10, 2022