fgl_list_sort() sorts the items displayed in a combo/list control field in ascending/ descending order.
This function takes two arguments - field_name (CHAR(255)) and direction (INTEGER).
The second argument can have two values:
>=1 - for the sorting to be performed in the ascending order
<1 - for the sorting to be performed in the descending order
...
CALL fgl_winprompt(5, 2, "Enter sort order(>1 means ascending): ", "1", 20, 0) returning x
LET y = fgl_list_sort("f1", x)
IF x > 1
THEN MESSAGE "Items sorted in ascending order"
ELSE MESSAGE "Items sorted in descending order"
END IF
...
Here you can learn more about working with ComboBox in Lycia Form Designer.