jason2192839
Posts: 0
Joined: Wed Sep 23, 2015 10:34 am

Collection not "looping" after applying javascript toLocaleString

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.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Collection not "looping" after applying javascript toLocaleString

Hi Jason -

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

jason2192839
Posts: 0
Joined: Wed Sep 23, 2015 10:34 am

Collection not "looping" after applying javascript toLocaleString

Sure,

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

Thanks for getting back to me so quickly.

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

Collection not "looping" after applying javascript toLocaleString

Hello Jason,

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

What is service's response?

Return to “Issues”