Bruno Grenier
Posts: 0
Joined: Thu Aug 20, 2015 9:41 pm

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

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

Image

Image

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

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

Hello Bruno,

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

Bruno Grenier
Posts: 0
Joined: Thu Aug 20, 2015 9:41 pm

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

Can I have an example?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

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

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

Bruno Grenier
Posts: 0
Joined: Thu Aug 20, 2015 9:41 pm

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

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
}

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

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

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

Bruno Grenier
Posts: 0
Joined: Thu Aug 20, 2015 9:41 pm

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

It worked! Thanks!

Return to “Issues”