Page 1 of 1

How map a [i] from array on label in a list item

Posted: Tue Sep 15, 2015 8:20 pm
by Bruno Grenier

How i map the (0,1,2,3,4...100) from a array in localstorage.

Image

Image


How map a [i] from array on label in a list item

Posted: Wed Sep 16, 2015 6:25 am
by Serhii Kulibaba

Hello Bruno,

"i" is a virtual variable, so you have to use your custom JS.


How map a [i] from array on label in a list item

Posted: Wed Sep 16, 2015 4:48 pm
by Bruno Grenier

Can I have an example?


How map a [i] from array on label in a list item

Posted: Wed Sep 16, 2015 7:17 pm
by Evgene Karachevtsev

Hello Bruno,

Unfortunately custom JS is outside the scope of our support: http://devcenter.appery.io/support-po...
You may consider purchasing Advisory Pack to get more in-depth help on this question. Here is more information about it: http://appery.io/services/#Advisory_Pack


How map a [i] from array on label in a list item

Posted: Thu Sep 17, 2015 2:50 pm
by Bruno Grenier

I am not asking support for custom JS. What I don't know (or find in support) is HOW I GET THE that is being processed AND RETURN TO LABEL.

Is not working doing something like this IN CUSTOM JS:

var personsOnLocalStorage = Apperyio.storage.personsList.get();

for (i=0;i<personsOnLocalStorage.length;i++){
.......
retun i
}


How map a [i] from array on label in a list item

Posted: Fri Sep 18, 2015 1:14 pm
by Serhii Kulibaba

You can put it on the complete event with JS:

prevar arr = $("[name=listitemName]");

for (var i = 0; i < arr&#46;length; i++){
$(arr)&#46;find("[name=labelName]")&#46;text(i);
});/pre


How map a [i] from array on label in a list item

Posted: Fri Sep 18, 2015 1:25 pm
by Bruno Grenier

It worked! Thanks!