Hi Sunita,
CurrentID - is "_id" of item that you want to add to favorites.
Yes. "favorites" - is storage variable(to be clear what is that).
"A" is just a mode. It used to resolve type of "favorites"(array).
Regards.
Hi Sunita,
CurrentID - is "_id" of item that you want to add to favorites.
Yes. "favorites" - is storage variable(to be clear what is that).
"A" is just a mode. It used to resolve type of "favorites"(array).
Regards.
Hi Yuuri,
Thank you for your reply and your patience.
I have followed everything you have said above but I have a problem again though. The way you have described above seems to add nothing to the favorites list.
What could possible be going wrong?
I have set up the storage as array:
http://prntscr.com/59uoqc
http://prntscr.com/59uouh
I added the first block of code for a "Add to favorites" button on a page.
I mapped the lsv to the where clause for the goal page:
And the code for the where clause:
I am not sure where am i going wrong.
Could you please have a look and guide me through?
Regards
Hi Sunita,
Please take a look on the problem i've seen in your implementation:
http://prntscr.com/59w7nt/direct
Regards.
Hi Yuuri,
Should that be just:
var currentID = selectedveg;
I am a little confused here with the lsv, could you please suggest?
HI Sunita,
You should use here current veg _id that you want to add to this collection.
I don't know where you store this information. If you store it in LSV you can use following code:
pre
//Where "lsvName" is your lsv name.
var currentID = localStorage.getItem("lsvName");
/pre
Regards.
Hi Yuuri,
It still does not add any items to the favourites page.
Is it possible for you to look at my app and suggest?
Regards,
Akshay
Hi Sunita,
Please try to debug your app.
Open browser debugger on "console" tab.
then type in console:
pre
var selectedveg = Apperyio.storage.selectedveg.get();
console.log("selectedveg = ");
console.log(selectedveg);
/pre
In this storage you should find your selected item.
If you can not find this item here - that's mean you did not added this item to the storage.
Regards.
Hi Yuuri,
I tried the debugging and it gives me a message saying
"ReferenceError: Can't find variable: Apperyio"
What can be the error here?
Also, when I inspect Element to check for my local storage, it does show the specific items added to favourites _id from database, but does not list it in the favourites page.
Regards,
Akshay
Hi Sunita,
It's strange error.
Please give us your app public link and describe steps to reproduce this problem(to see this error message).
Regards.
Hi Yuuri,
Where can I e-mail you the public link with the steps to reproduce the error?
Regards