Get Toggle Switch State in Data Design
Block Information
Available in: Page Flow
Toolbox Category: Dynamic Input
Block Type: Output
Output Type: boolean (true/false)
Get Toggle Switch State in Data Design
is an output block that allows you to retrieve the state of Checkbox and Toggle Switch elements that were generated using the Content from Data Design block and dynamically added to the page or form.
The output is of type boolean (true/false) and is compatible with Value Parameters of type boolean (true/false) or of type any.
Checkbox and Toggle Switch elements, used inside a Data Design element, need to be initialized using the Initialize Toggle Switch in Data Design, after they are added to the page or form.
The behavior of the block is similar to the Get Toggle Switch State block, with some important differences:
Element Selection: You can only choose an element placed inside the selected Data Design element.
Works only with elements generated using Content from Data Design block that are dynamically added.
The block consists of the following (from top to bottom):
Data Design: Selectable Input to choose the Data Design element whose element you want to target.
Element: Selectable Input to choose the element, within the selected Data Design, you want to get the state of.
ID: Mandatory Value Parameter that accepts a text value representing the unique value that was provided to the Content from Data Design block.
ID2: Optional Value Parameter that accepts a text value representing the secondary identifier that can be used to identify the desired element. See below for more details.
Usage Example
NOTE: Please refer to the prerequisite information shown here before seeing the example.
The image below shows an example where the state of Toggle Switch element (Input51) for Company 1, which as rendered with the ID ST100, is retrieved and set as the value of variable b .
NOTE: The same examples also apply for a Checkbox element.
Last updated