No items found.

Usage Scenario: Creating Dynamic Attributes with Data Type Selection

In an administrator panel, users can define their own custom fields (attributes). During this process, the user is asked to select the data type of the field they want to create. This scenario is a common application that uses the Get Attribute Data Type action dynamically in conjunction with the Create Attribute action.

Application Steps:

  1. Creating Dynamic Form Elements

The following components are created on the UI Design screen:

  • Text InputAttribute Name (e.g. ‘reference_number’)
  • Select BoxData Type Selection
  • Text Input (Optional)Description
  • Checkbox / SwitchRequired Field?
  • Text / Number InputDefault Value
  • Button‘Create Field’
  1. Add Get Attributes Data Type Action
    • Select the ‘Data Type Selection’ Select Box element.
    • Value as:
      • + ADD ACTION > Add the Get Attribute Data Type action.
      • The action result is linked to the SelectBox element.
      • The returned data is processed as Label and Value.
        • Example:
          • Label: ‘String’
          • Value: “String”
  2. Linking the Select Box Selection to the Create Attribute Action
    • The Create Attribute action is added to the action sequence that runs when the ‘Create Field’ button is clicked.
    • The parameters are defined as follows:
      • Name → Taken from Text Input.
      • DataType → Data type selected in the Select Box component (SelectedValue)
      • Description → Description from the input component
      • IsRequired → From the Switch / Checkbox component
      • DefaultValue → From the default value entered by the user
  3. Displaying the Result or Feedback
    • When the attribute is successfully created, an informative toast message can be displayed to the user.
    • Pre-checks can be performed for incorrect entries (e.g. empty Name, DataType not selected).