Page 3 of 4

Add an item from one list on one page to another list on a different page.

Posted: Mon Nov 24, 2014 11:28 pm
by Yurii Orishchuk

Hi Sunita,

  1. CurrentID - is "_id" of item that you want to add to favorites.

  2. Yes. "favorites" - is storage variable(to be clear what is that).

  3. "A" is just a mode. It used to resolve type of "favorites"(array).

    Regards.


Add an item from one list on one page to another list on a different page.

Posted: Tue Nov 25, 2014 1:14 am
by Sunita

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.

Image

I mapped the lsv to the where clause for the goal page:

Image

And the code for the where clause:

Image

I am not sure where am i going wrong.

Could you please have a look and guide me through?

Regards


Add an item from one list on one page to another list on a different page.

Posted: Tue Nov 25, 2014 5:13 am
by Yurii Orishchuk

Hi Sunita,

Please take a look on the problem i've seen in your implementation:
http://prntscr.com/59w7nt/direct

Regards.


Add an item from one list on one page to another list on a different page.

Posted: Tue Nov 25, 2014 11:13 am
by Sunita

Hi Yuuri,

Should that be just:

var currentID = selectedveg;

I am a little confused here with the lsv, could you please suggest?


Add an item from one list on one page to another list on a different page.

Posted: Tue Nov 25, 2014 11:23 pm
by Yurii Orishchuk

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.


Add an item from one list on one page to another list on a different page.

Posted: Sun Nov 30, 2014 8:26 pm
by Sunita

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


Add an item from one list on one page to another list on a different page.

Posted: Mon Dec 01, 2014 12:57 am
by Yurii Orishchuk

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.


Add an item from one list on one page to another list on a different page.

Posted: Mon Dec 01, 2014 11:35 am
by Sunita

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


Add an item from one list on one page to another list on a different page.

Posted: Mon Dec 01, 2014 11:30 pm
by Yurii Orishchuk

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.


Add an item from one list on one page to another list on a different page.

Posted: Wed Dec 03, 2014 8:41 pm
by Sunita

Hi Yuuri,

Where can I e-mail you the public link with the steps to reproduce the error?

Regards