Loop Mapping for Dynamic Object Passing
I want to pass a value to a label in a list depending on another value in the same LSV object. the object in the LSV for the date is the same as the status object value+ _date, lowercased. So if the status of one list item is Pending then its date is in the object pending_date. Status is also in the LSV along with the dates.
I have this code on the mapping from the LSV's object:
var stat = value.status;
var code = stat+"_date";
code = code.toLowerCase();
var t = value
Code: Select all
;
var d = new Date(t);
var date = (d.getMonth() + 1) + "/" + d.getDate() + "/" + d.getFullYear();
return date;
and it works, but only on the first list item
[url=https://d2r1vs3d9006ap.cloudfront.net/s3_images/1251061/2015-08-0503_08_36-MobilePreview.png?1438762935][img]https://d2r1vs3d9006ap.cloudfront.net/s3_images/1251061/2015-08-0503_08_36-MobilePreview_inline.png?1438762935[/img] [/url]
How can I get this to work for all the items in the list?