Hi Igor,
new error, on green save button
Michael,
Could you clarify please about app logic, how should it works? It seems that you save service responce to the localStorage variable and on "Save" button click you are trying to put the same data to the same DB.
Hi Igor,
OK, the app logic is what I checked first with Katya, at the begining of this thread,
what I am trying to do is,
I have a collections of companies in db,
on choose screen the user chooses a town and then a company,
when he clicks save Green button the 5 labels are saved to localstorage and then run js to create array,
then it runs post service to favorites in db,
the reason for the js in mapping is to allow mapping of the labels to the collapsible block when the button favorite taxi button is clicked
hope that makes sense
thx
Please share DB with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a.
shared Igor
I don't know all app logic but as for me it will be better if you have additional field "favorites" in you collection and when user click "save" you increase this counter field. After that you can use simple where clause query to get the most favorites data that you need.
Another way you can save only id to another collection not all five fields and get data using id from main collection.
Thanks Igor,
this is bad news, this is why I checked logic 5 days ago.
if i save companies id to user collection in col, would it need to be an array? can I query the five col within an array of ids and map them to labels in collapsible block?
thanks for your time on this
We'll find the way how to fix this error but unfortunately it will take some time.
OK Igor,
please try not to take too much time, I'm late and I may loose this one
thanks again
Would this would work,
when user clicks save "green button" labels are saved to localstorage along with user id,
run put service to favorites collection and map to 5 cols and user id
then when user clicks favorite taxis, run where on user id to "favorites collection",
map response to collapsible block grid and labels.