Page 3 of 4

how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 7:40 pm
by John Herdean

yes, it only contains the 1st record.. see below (the raw test shows 2 records, the live test only displays 1 record) :

Image

Image


how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 7:41 pm
by John Herdean

i must be missing something... WHat else is needed to populate the full list from json?


how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 7:45 pm
by Kateryna Grynko

John,

You have incorrect Response parameters or mapping. As your Rest Service returns an array, there should be a parameter with tick "Array" among the Response parameters. You can create response structure using "Automatically Create from Sample Response" button on "Response" tab.

Then in Mapping create an arrow from array to Mobile List Item.


how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 8:04 pm
by John Herdean

yes i did that already. I even ticked the array box for '$' plus i tried it with and without the array box checked off for: 'id' and 'driver_name' - i tried it both ways and neither populates the list, just the 1st record...

see below:

Image

Image


how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 8:11 pm
by John Herdean

i found my problem.... I also needed to drag the '$' to 'menuselectitem_13'


how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 8:11 pm
by John Herdean

thank you all for your help...!!


how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 8:14 pm
by Kateryna Grynko

Glad it's finally solved :)


how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 8:16 pm
by John Herdean

the only thing is when the screen 1st arrives, the select menu is empty, but when you click on it - it then shows the list. How can i have the 1st record show automatically on arrival without clicking anything?

see below how it looks on arrival:

Image

once you click on it:

Image


how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 8:16 pm
by John Herdean

How can i have the 1st record show automatically on arrival without clicking anything?


how to populate a selectmenu from a json list response?

Posted: Thu May 23, 2013 8:42 pm
by Kateryna Grynko

On service Data tab add "Set property" action on Success event. In Action parameters choose component Select Menu, Property = "Selected", value = 1
Then after Mapping finishes the first Select Menu item will be selected.