Page 1 of 1

How to access multiple values from JS editor

Posted: Tue May 26, 2015 10:00 pm
by gabriele vidali

Image

I have multiple values linked to a single field as shown in the image and want to show both.
I tried:
item = items.array[name] + items.array[quantity];
return item;

I also tried:
item = name + quantity;
return item;

The tried:
item = value[0] + value[1]
return item;

Or:
item = value[name] + value[quantity]
return item

but I obtain the quantity only.
How do I get to name and quantity values in the editor ?

thanks


How to access multiple values from JS editor

Posted: Wed May 27, 2015 5:43 am
by Serhii Kulibaba

Hello Gabriele,

Please JS to the mapping items_array-mobilelistitem_3

here you get access to all values of items_array via variable "value":

E.g.:
var name = value.name;
var quantity = value.quantity;


How to access multiple values from JS editor

Posted: Thu May 28, 2015 8:49 pm
by gabriele vidali

Thanks.
Visual explanation was here http://i.imgur.com/KvRyJov.png