Dropdown issue
Hi , Can anyone help on how to achieve this please . Thank you in advance for your help.
a!localVariables(
local!values: { true(), false() },
local!labels: { "Yes", "No" },
local!dropd1: null(),
local!dropd2: null(),
a!columnsLayout(
columns: {
a!columnLayout(
contents: a!dropdownField(
label: "Dropdown 1",
choiceLabels: local!labels,
choiceValues: local!values,
placeholder: "Select a value",
value: local!dropd1,
saveInto: {
local!dropd1,
a!save(
local!dropd2,
a!match(
value: local!dropd1,
whenTrue: fv!value,
then: false(),
default: null()
)
)
}
)
),
a!columnLayout(
contents: a!dropdownField(
disabled: and(local!dropd1, not(local!dropd2)),
label: "Dropdown 2",
choiceLabels: local!labels,
choiceValues: local!values,
placeholder: "Select a value",
value: local!dropd2,
saveInto: { local!dropd2 }
)
)
}
)
)------- This works but
Hi , For example If i have local!labels: { "Yes", "No" ,"Others", "Not required"} -- If i select dropdown 1 values as yes , in dropdown 2 its should auto fill value to Others and if dropdown value is no , then it should populate value as " yes " on the field . The catch here is even after populating the values the user should still have and option to change the values by selecting any value from dropdown.
