Event Action in Data Design
Last updated
Last updated
Use the Event Action in Data Design
block to take an action when the user interacts with elements that were generated using the Content from Data Design block and dynamically added to the page or form.
The behavior of the block is similar to the Event Action block, with some important differences:
Works only with elements generated using Content from Data Design block that are dynamically added.
Element Selection: You can only choose an element placed inside the selected Data Design element.
The block consists of the following (from top to bottom):
Event Name:Value Parameter that accepts a text value representing the name of the event you want to handle and take an action on. See the Event names section for more details.
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, for which you want to handle events.
ID: Optional Value Parameter that accepts a text value representing the unique value that was provided to the Content from Data Design block. See below for more details.
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.
Tasks: a Flow Parameter where you connect blocks that specify what you want done when the event occurs. Use the Action/Event Info block to get more information about the event. See Event Info section for more details about identifying the specific generated instance within which the event occurred.
NOTE: For the most common use cases, the ID and ID2 values need to be blank when using the Event Action in Data Design
block.
Some of the common event names are given below:
click
Mouse click on the selected element
contextmenu
Mouse right-click on the selected element
dblclk
Mouse double-click on the selected element
change
keypress
Key press when the selected element is in focus
blur
Selected element looses focus
focus
Selected element gains focus
For a more comprehensive list of event names please refer to:
NOTE: In general, the Event Action in Data Design
block can be used to handle any event not just the ones mentioned above or in the reference links.
The behavior of this block depends on the ID and ID2 value parameters and is detailed below:
ID and ID2 not provided: Operate on the selected element for all generated instances of the same Data Design element.
ID2 provided and ID not provided: Operate on the selected element for all generated instances of the same Data Design element with the same ID2 value.
ID provided and ID2 not provided: Operate on the selected element for all generated instances of the same Data Design element with the same ID value. Since we recommend the ID value to be unique, this would choose one from all the generated instances of the associated Data Design element.
ID and ID2 provided: Operate on the selected element for all generated instances of the same Data Design element with the same ID and ID2 value.
Within the blocks that are attached to the Tasks Flow Parameter, the Action/Event Info block can be used to get more information about the event.
Specifically in the context of dynamic content, the following additional information is provided (in addition to the standard properties):
id: Provides the ID value that was provided to the Content from Data Design block when generating this instance.
id2: Provides the ID2 value that was provided to the Content from Data Design block when generating this instance.
name: Provides the friendly name for the element.
design: Provides the element identifier of the Data Design element that was used to generate this instance.
NOTE: Please refer to the prerequisite information shown here before seeing the example.
The image below illustrates an example in which the ID and ID2 value parameters are left blank and the click event is being managed for the Button element (Button75, labeled "Update").
Because both ID and ID2 are blank, the system will handle the click event for the button across all generated instances of the selected Data Design (DataDesign8).
When the click event occurs, the Show Information Popup block is used to show a message containing the ID of the instance on which the Button element (Button75, labeled "Update") was clicked.
The image below shows the result of clicking the Button element (Button75, the Update button) for Company 2, which was rendered using the ID ST101.
Changes to the selection of a