-->
Page 2 of 2

Re: Dropdown passing a numeric from the selected text in the

PostPosted: Mon Jul 25, 2016 5:01 am
by Oldbod
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...

Re: Dropdown passing a numeric from the selected text in the

PostPosted: Wed Jul 27, 2016 11:39 am
by Ecoli-557
Did'nt want to show the numbers but in re-reading the string-handling capability in the basic, I think your 2nd idea will be the way I shall try.
Thanks.