Discussion posts and replies are publicly visible
You have to simply take the variable as text and pass the choice values as text which you are using in labels.
a!localVariables( local!selectedDepartment, local!labels: { "Corporate", "Engineering", "Finance", "Human Resources", "Professional Services", "Sales" }, a!sectionLayout( label: "Example: Cascading Dropdowns", contents: { a!dropdownField( label: "Department", choiceLabels: local!labels, choiceValues: local!labels, /*pass same as labels of whatever you want to store*/ placeholder: "-- Select a Department -- ", value: local!selectedDepartment, saveInto: { local!selectedDepartment, } ), } ) )
thanks Ujjwal. it works