Page 1 of 1

Collection not "looping" after applying javascript toLocaleString

Posted: Sun Sep 27, 2015 8:13 pm
by jason2192839

He,

I'm getting the first results with Appery which is super cool!
Unfortunately I'm also running into a bit of trouble. I'm using a external Rest API which fills a list in my app. The list is filled with dates formatted in ISO8601 which I want to convert to plain english by using the "toLocaleString" function.

To do this i added this javascript to the parameter on the "success mapping" section by clicking the green "JS" button: return Date('value').toLocaleString();
This is where the problem occurs: the value is converted to "plain english" but every list item is the same now.

So my question is: how do I convert each list item individually so that I have a list of plain english individual dates?

Cheers,
Jason.


Collection not "looping" after applying javascript toLocaleString

Posted: Sun Sep 27, 2015 8:38 pm
by Illya Stepanov

Hi Jason -

Could you please show us your mapping structure that you using?


Collection not "looping" after applying javascript toLocaleString

Posted: Mon Sep 28, 2015 9:07 am
by jason2192839

Sure,

Please see this image:
http://i61.tinypic.com/a0uglv.png

Thanks for getting back to me so quickly.


Collection not "looping" after applying javascript toLocaleString

Posted: Thu Oct 01, 2015 11:13 am
by Serhii Kulibaba

Hello Jason,

Could you check are there any errors in console? This (http://devcenter.appery.io/documentat...) should help.

What is service's response?