Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

saving labels to array

Hi Marina,
I made changes from Igor, but I am still getting an error
here are some screenshots

Image

Image

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

saving labels to array

Hello! We'll take a look.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

saving labels to array

Do you specify object_id? because without this parameter PUT method returns 405 Method Not Allowed.
Also you should set X-Tiggzi-Session-Token, without this parameter method PUT returns 401 Unauthorized

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

saving labels to array

Thanks Marina,

I have these set in mapping, the login and other services in the app work in apperyio tester, here is the mapping

Image

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

saving labels to array

In mapping from localStorage variable favorites to parameter favorites add the following code:
prereturn JSON.parse(value);/pre

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

saving labels to array

Cheers, thanks alot,
array is now saving to db.

The next part I dont know is,
how I am going to map the array to each of the labels in the collapsible block,
there are 5 labels.

screenshot

Image

thx for your patience

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

saving labels to array

Hi Michael,

It depends on response structure.

If this is an array of objects take a look at here please: http://docs.appery.io/documentation/u...

If this is an array of simple values you would need JavaScript code to process the array.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

saving labels to array

Thanks Katya,
this is an entry in the array
{"taxicompanyname":"Airport Taxis","town":"NEWCASTLE UPON TYNE","taxiemail":"a href="mailto:frank@airport-taxis.co.uk" rel="nofollow"frank@airport-taxis.co.uk/a","taxiphone":"0191 4880751","textback":"Text Back"}

there are 5 labels, so I guess I will need to use js,

do you have a sample of the code for this

Is it correct that I need to map the array to localstorage and then run the js to populate the labels in the collapsible block?

thanks

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

saving labels to array

hello

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

saving labels to array

Hi Michael,

There are objects in your array so you can use mapping and the process will be automated. You can find an example on the link above.

Return to “Issues”