Question
How can we split a comma-separated string fetched from the database (e.g : "Java,Python,SAIL,Dart") into a list and display it as a dropdown in an Appian interface?
A
Anonymous
December 8, 2025

Answer

Will use the split function to divide string to list

a!localVariables(
local!data: "Java,Python,Sail,Dart",
split(local!data, ",")
)

Output

1765217745727-4az8cacygkv.png


Save this rule and call this interface:

Final Code

a!localVariables(
local!data: "Java,Python,Sail,Dart",
local!list: split(local!data, ","),
{
a!dropdownField(
choiceLabels: { local!list },
choiceValues: { 1, 2, 3, 4 },
label: "Dropdown",
labelPosition: "ABOVE",
placeholder: "--- Select a Value ---",
saveInto: {},
searchDisplay: "AUTO",
validations: {}
)
}
)

Output

1765217745730-9n3yeszxpfo.png

JuniorExpressions#sailcoding#interface
Loading comments...