Page 1 of 1

Data from different database collections

Posted: Sat Jan 04, 2014 9:52 pm
by Vaidotas Ražaitis

Hey,

I got a question regarding data from different collections.
I developing an application where users can place their orders.
Currently i'm getting all the data from application into database collection named "Orders_DB". But you all know that device_id's default storage is predefined collection called "Device Data". What i want to do is to get the Device_id stored in "Orders_DB" collection near the order details. This is to know which order was sent from which device.
Because afterwards i want to send Push Notification to the user's device so he would know that his order was started to be processed.

Maybe i can store Device_id as local storage variable and upload it with all other data?

Please advice :)


Data from different database collections

Posted: Sun Jan 05, 2014 12:38 am
by Alena Prykhodko

Hello!

You can use localStorage in this purpose.
The following will be useful
http://docs.appery.io/documentation/b...
https://getsatisfaction.com/apperyio/...


Data from different database collections

Posted: Sun Jan 05, 2014 6:45 pm
by Vaidotas Ražaitis

Guys,

I am still struggling with this one :P
I am still trying to get DeviceID stored as local storage variable, but that doesn't seem to work for me :P

Image

As you can see from the image above i am using Push_Service_Registration service to get deviceID stored into local storage variable Device_ID.

Image

Here i am using Customers_DB_Orders_DB_create_service service to store all local storage variables along with Device_ID into database.

I get all other variables stored into Database, except Device_ID...

Please help me out :D What am i doing wrong? :D


Data from different database collections

Posted: Sun Jan 05, 2014 11:31 pm
by Illya Stepanov

Hello,

It's not clear how exactly you are saving 'Device_ID' in localStorage -- on your screenshots you are mapping it to Reqest parametr only. Can you show the code you using for initialyzing localStorage variable 'Device_ID'?