How to populate other fields in Appian?

Hi Everyone,

Can anyone please tell me how can I populate other fields in interface based on value selected in one of the dropdown field?

Thank You

  Discussion posts and replies are publicly visible

Parents
  • HI ,

    Displaying other components in the interface based on the dropdown values depends on the scenario and you can use "showWhen" to control the display of components.

    For you reference i have attached a sample code , where based on the selected values you can see the text fields

    a!localVariables(
    local!showWhen,
    {
    a!dropdownField(
    label: "Drop Down",
    placeholder: "Select a value",
    choiceLabels: {"Yes","No"},
    choiceValues: {"Yes","No"},
    value: local!showWhen,
    saveInto: {
    local!showWhen
    }
    ),
    a!textField(
    label: "Filed when value is Yes",
    showWhen: local!showWhen = "Yes"
    ),
    a!textField(
    label: "Filed when value is No",
    showWhen: local!showWhen = "No"
    )
    }
    )

    Hope this can be helpful

Reply
  • HI ,

    Displaying other components in the interface based on the dropdown values depends on the scenario and you can use "showWhen" to control the display of components.

    For you reference i have attached a sample code , where based on the selected values you can see the text fields

    a!localVariables(
    local!showWhen,
    {
    a!dropdownField(
    label: "Drop Down",
    placeholder: "Select a value",
    choiceLabels: {"Yes","No"},
    choiceValues: {"Yes","No"},
    value: local!showWhen,
    saveInto: {
    local!showWhen
    }
    ),
    a!textField(
    label: "Filed when value is Yes",
    showWhen: local!showWhen = "Yes"
    ),
    a!textField(
    label: "Filed when value is No",
    showWhen: local!showWhen = "No"
    )
    }
    )

    Hope this can be helpful

Children