Page 5 of 9

saving labels to array

Posted: Wed Sep 25, 2013 9:25 pm
by Michael4771079

OK Katya,
I will try that.

thank you very much


saving labels to array

Posted: Thu Sep 26, 2013 9:05 am
by Michael4771079

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


saving labels to array

Posted: Thu Sep 26, 2013 11:26 am
by Maryna Brodina

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.


saving labels to array

Posted: Thu Sep 26, 2013 1:07 pm
by Michael4771079

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


saving labels to array

Posted: Thu Sep 26, 2013 2:22 pm
by Maryna Brodina

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.


saving labels to array

Posted: Thu Sep 26, 2013 2:33 pm
by Michael4771079

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


saving labels to array

Posted: Thu Sep 26, 2013 4:01 pm
by Michael4771079

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


saving labels to array

Posted: Thu Sep 26, 2013 8:38 pm
by Kateryna Grynko

Hi Michael,

Could you please share the app and database with us?


saving labels to array

Posted: Thu Sep 26, 2013 8:43 pm
by Michael4771079

Thx Katya,
both shared, app name NEWCASTLETAXIios


saving labels to array

Posted: Fri Sep 27, 2013 10:24 am
by Michael4771079

any news here