Hi there, it's first time for me and I want to thanks who can help me.
I'm approaching for first time to MIT App from Visual Studio, and I should want to create an app that read data from an access db and charge them on a spinner.
So I have created a php file to connect via odbc to my access db and it functions perfectly, so we have to pass to the app.
I have created a simply screen in which I have a web control, a label and a spinner.
When I connect I obtain the full list like this
array(1336) {
[1]=>
string(10) "First Name"
[2]=>
string(11) "Second Name"
[3]=> etc
I'm not able to extract from Array the ID and Name to charge on spinner to using successively.
Someone can help me?
Where is the ID and where is the name? What should the spinner data look like? Show a longer example of data, preferably copied after reading from the server, because the details can matter. Also show an example of how it should look like in a spinner.
Is Id [1], [2] etc? And name is "First name", "Second name" etc?
It should look like this in the spinner?
[1] First name
[2] Second name
Thanks for your answer, the spinner shoud have only name, eg.
First Name
Second Name
once I select the name, the index (1,2...etc) should be used to identify the unic name.
Thanks, i have tryed to change the array string in this way
[{"userId":1,"nome":"pippo"},{"userId":2,"nome":"pipppo"},{"userId":3,"nome":"pio"}]
but i get this error
Lookup in pairs: the list [{"nome":"pippo","userId":1}, {"nome":"pipppo","userId":2}, {"nome":"pio","userId":3}] is not a well-formed list of pairs
So, based on ABG's suggestion, I modified the structure of the JSON string getting the array in the box without errors. The thing is, I have no idea how to accomplish what I need, which is to load names into the spinner and if I select a name, collect the associated ID.
Absolutely amazing! It's what I wanted to get and that I can adapt to my needs. However I'm trying to figure out how to transfer the array that comes from the Web1 call, because in your example you have preconfigured the array with a ready list, in fact, as you can see, I had inserted the Web1.Got text block
should I assign the responsecontent to your json variable?
That's exactly what I did. I add the result for those who have the same problem as me. Thank you very much for the support, I have read several of your posts and they are always helpful.