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

saving labels to array

OK Katya,
I will try that.

thank you very much

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

saving labels to array

Hi Marina,
I created a service to read favorites from db
I cant map as Katya suggested
I dont have $ in mapping to map to collapsible block

here are screen shots of service and mapping

Image Image Image Image

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

saving labels to array

Hello! You need to parse response using JS because favorites is an array and values in array may be only a simple types. In your case it's string and thus you can't parse it automatically.

You can make favorites field not array, but an object and store data this way:
pre{"arr":[{"taxicompanyname":"Airport Taxis","town":"NEWCASTLE UPON TYNE","taxiemail":"frank@airport-taxis.co.uk","taxiphone":"0191 4880751","textback":"Text Back"}, {"taxicompanyname":"other/pre
In such case you can parse it automatically in mapping.

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

saving labels to array

Marina,

You can make favorites field not array, but an object and store data this way:

I dont know where you mean to save data as object

the labels are stored in array in localstorage and in the db.

do you mean I need to change field in db

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

saving labels to array

Does your service readfavorites on the last screenshot call the db? You want do mapping for this service, right? You need to change column name, but you would need also change function of saving to collection.

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

saving labels to array

so do you mean I should not be using array at all

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

saving labels to array

Katya,
I really need help here, there is some confusion regarding array.
with your help I got the array into the db
I now need to populate the 5 items in the array to a collapsible block

I dont follow what Marina meant,

I'm in trouble now, already a week late, I will loose client if I cant show this feature working

hoping you can help

thx

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

saving labels to array

Hi Michael,

Could you please share the app and database with us?

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

saving labels to array

Thx Katya,
both shared, app name NEWCASTLETAXIios

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

saving labels to array

any news here

Return to “Issues”