Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

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

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.

Sunita
Posts: 0
Joined: Sat Nov 15, 2014 2:40 pm

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

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

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

Hi Sunita,

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

Regards.

Sunita
Posts: 0
Joined: Sat Nov 15, 2014 2:40 pm

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

Hi Yuuri,

Should that be just:

var currentID = selectedveg;

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

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

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.

Sunita
Posts: 0
Joined: Sat Nov 15, 2014 2:40 pm

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

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

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

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.

Sunita
Posts: 0
Joined: Sat Nov 15, 2014 2:40 pm

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

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

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

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.

Sunita
Posts: 0
Joined: Sat Nov 15, 2014 2:40 pm

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

Hi Yuuri,

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

Regards

Return to “Issues”