Retrieving data from a combo box
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Retrieving data from a combo box
Hello, Im new to using combo boxes I already figured out how to populate it with data from mysql database. However, but how can I determine or retrieve the selected option on the combo box, thanks.
Re: Retrieving data from a combo box
Hi hsh_636,
you are looking for:
...
put the label of btn "your combo box here..." into tCurrentSelection
...
Best
Klaus
you are looking for:
...
put the label of btn "your combo box here..." into tCurrentSelection
...
Best
Klaus
Re: Retrieving data from a combo box
Thanks for your reply the thing is I did exactly what you told me to do but when I retrieve it and insert it into my table nothing is inserted which means nothing is retrieved does the field type of the column (int) of the table Im inserting it to have anything to do with it?
Re: Retrieving data from a combo box
Hm, int = integer, right? That will surely not work if your label is a STRING!
Re: Retrieving data from a combo box
The combobox retrieved the value from the database and in the database its a number (integer), so the value for the combobox label is a number which means its in fact an integer, is there a command that will retrieve the value chosen because Im not sure how the label command work.
Re: Retrieving data from a combo box
Well, then it should work!
Hint:
There is no "label command" in Livecode!
But you can simply retrieve this "property" like in my example.
So if it does not work for you then the error must be somewhere else!
I need more info/scripts etc. to be more helpful.
Hint:
There is no "label command" in Livecode!
But you can simply retrieve this "property" like in my example.
So if it does not work for you then the error must be somewhere else!
I need more info/scripts etc. to be more helpful.
Re: Retrieving data from a combo box
Thanks Klaus for all your help.
Re: Retrieving data from a combo box
Solved it!!! the problem was in other piece of the code!!!
Re: Retrieving data from a combo box
Hello, everybody I have a similar question similar to the combobox one I already finished retrieving data from the combobox and I was thinking can I do the same thing for the scrolling list field I mean how can I retrieve the data selected in the scrolling list field and if its possible to begin with.
Thanks, in advance.
Thanks, in advance.
Re: Retrieving data from a combo box
Hi,
you want to:
...
put the selectedtext of fld "your listfield here..." into tUserSelection
...
Best
Klaus
you want to:
...
put the selectedtext of fld "your listfield here..." into tUserSelection
...
Best
Klaus
Re: Retrieving data from a combo box
Thanks for all the help again.
Re: Retrieving data from a combo box
I have one more question about the scrolling list field is it possible to activate an action once the user clicks on a choice in the scrolling list field and if so how?,
Thanks appreciate all the help.
Thanks appreciate all the help.
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Retrieving data from a combo box
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Retrieving data from a combo box
What I meant by an action I meant for example going to another card, the code that you gave me only put the selected choice into a variable I want a way that allow the user that once he/she clicks on a choice the user goes to another card.
Re: Retrieving data from a combo box
Hi hsh_636,
...
put the selectedtext of me into tVar
...
In the mouseup handler with
...
go cd "whatever"
...
will do what you want?
Best
Klaus
maybe replacinghsh_636 wrote:...the code that you gave me only put the selected choice into a variable I want a way that allow the user that once he/she clicks on a choice the user goes to another card.
...
put the selectedtext of me into tVar
...
In the mouseup handler with
...
go cd "whatever"
...
will do what you want?
Best
Klaus