Page 1 of 2

How can i get the value of an label in the loop feature? i want fetch each value and set each image by each value

Posted: Sun Sep 21, 2014 4:07 pm
by Norman Enmanuel

Hi team, i have a response with an array of json and i want to put an image by each id from the response, how can i do this? it's understood what i want to do?

I want fetch each value and set each image by each value


How can i get the value of an label in the loop feature? i want fetch each value and set each image by each value

Posted: Mon Sep 22, 2014 3:09 am
by Norman Enmanuel

Can anyone give me one answer?


How can i get the value of an label in the loop feature? i want fetch each value and set each image by each value

Posted: Mon Sep 22, 2014 3:16 am
by Vinny B

Hello

Code: Select all

I am not sure  if this helps but i get 30 urls from the database and it converts the url to an image saved in the app. I am very new at this.  

here is my thread https://getsatisfaction.com/apperyio/...

and my script

function getImage(dateName, imageLoc) {

for(i=0; i < data.length; i++) {
if(data.date == dateName) {
//You need to check this compone logic and modify it if it not rigth.
var imageUrl = data.image + data.dayofmonthimage;
//Logout to console - you can see result in browser console to debug it.
console.log("combined URL is = " + imageUrl);
//Set combine URL to component
Apperyio(imageLoc).attr("src", imageUrl);
}
}
}

//
// for(i=0; i < data.length; i++) {
// if (data.date == dateName) {
// Apperyio(imageLoc).attr("src", data.image);

// }
// }
//
//}
//getImage(''from date rown get URL from image column","image holder");
getImage("9/1/2014","sept1");
getImage("9/2/2014","sept2");
getImage("9/3/2014","sept3");
getImage("9/4/2014","sept4");
getImage("9/5/2014","sept5");


How can i get the value of an label in the loop feature? i want fetch each value and set each image by each value

Posted: Mon Sep 22, 2014 3:19 am
by Illya Stepanov

Hi Norman,

Could you clarify what have you tried and with what particular part you're having difficulties?


How can i get the value of an label in the loop feature? i want fetch each value and set each image by each value

Posted: Mon Sep 22, 2014 3:32 am
by Norman Enmanuel

I made a new question further here, I thought that I would not answer, maybe this second drew the attention of someone else, but if you ask me eliminate it without any problems https://getsatisfaction.com/apperyio/...


How can i get the value of an label in the loop feature? i want fetch each value and set each image by each value

Posted: Mon Sep 22, 2014 3:33 am
by Norman Enmanuel

Thanks for reply and for the code idea, i'll try to take the idea of this piece of code.


How can i get the value of an label in the loop feature? i want fetch each value and set each image by each value

Posted: Mon Sep 22, 2014 5:20 am
by Evgene Karachevtsev

Hello Norman,

We are working on it and if you don't mind we'll post our reply in this thread.


How can i get the value of an label in the loop feature? i want fetch each value and set each image by each value

Posted: Mon Sep 22, 2014 6:06 am
by Norman Enmanuel

Sure do and thanks


How can i get the value of an label in the loop feature? i want fetch each value and set each image by each value

Posted: Mon Sep 22, 2014 6:26 am
by Anil Sagar

How can i get the value of an label in the loop feature? i want fetch each value and set each image by each value

Posted: Mon Sep 22, 2014 6:00 pm
by Norman Enmanuel

My problem is as follows:

I have a ServiceProducts, this service returns me 30 products that match your search:
"brand": "String",
"field": "String",
"category": "String" ...

But that service does not return me pictures of each product, then they say on their web site to retrieve the image that you need to use the id of each of the products, I have no problem retrieving a single image.

What I try is that when a service ends, I call another service to get pictures, but if a test the service just return me a single image, i need know: how can I recover 30 products with 30 images?

For pictures I use another "ServiceImage" but this does not return me an array of images! only return a picture by request, One image by request id.

Using Node.js I have solved a loop, it was easy, but as I do in Appery?

Sorry for my English, but I would appreciate a solution, I have 2 days in this.