New Mobile Guy
Posts: 0
Joined: Tue Jan 29, 2013 9:09 pm

How do I create a query service that pulls in data to an array?

Love the tool, and I think it's perfect what what I need. However, I'm having trouble figuring out how to build more complex connections to the backend services.

I need to do a query to the database and pull the resulting collection into an array. Each record will represent a picture. I then need to allow the user to cycle back and forth between each picture. I think the right way to do this is to put the result in an array of records, and then as the user goes back and forth, show a picture from a different index in the array.

I can pull them all in via the List control, but that shows them all at once, and I can't show/hide each one in the list individually (or at least I don't know how.) I tried the Navbar control, but that doesn't seem to work at all.

Any ideas?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How do I create a query service that pulls in data to an array?

Hello!

You cannot map data from response parameter to array.To do this you would need JavaScript.

You should create Run JavaScript action on success event, and use variable "data". Got from rest service JSON or XML object will be stored in "data" variable.

The image URL could be saved into local storage and then iterated over on button click.

Return to “Issues”