General area when it fits no where else

Moderator: Mmiscool

User avatar
By Oldbod
#51469 I'm not quite sure - are you asking if there's a builtin function that does this, or because you're not sure how to get an equivalent number for a given text value?

If it's the second, a very simple way is change your text for the drop down list to include the numbers you want at the start (eg "1 Monday", "2 Tuesday") etc then just convert the first character in the returned string to a number for your index.

If you don't want to show numbers, you could for example load the strings you want to display into an array, then lookup the position of the returned string variable in the array. Or many other ways...