Build a wishlist


#1

Hi guys!
I want to make a wishlist wiht a list of all the selected Table Cells.
What I thought is something like this:
The user tap a button and send the objectId of its Table Cell Item in a device variable.
The device variable collect the all selected objectIds
Than wenn the user load the wishlist page will be loaded also an api call filtered with the objectIds in the device variable.

What du you think?
And How can I get it?

Thanks for your suggetions.
Mario


#2

Hi @m.canevarollo… The trick I’m seeing here is the inability to create an array like that in Dropsource. This is a limitation. You would have to make a separate API call with each tapped cell to send the object id’s 1 at a time I believe unless I’m not quite understanding here.


#3

Why do you think that is not possible to make what I described above?


#4

1 way I can think of could be that with each cell selection, send an API call to the backend and fill an array there. Then when the user loads the wishlist page, ask the backend to send you all the info and the backend can use the list you built up on your backend to send the relevant info forward.


#5

In your backend, I would suggest doing something like this…

   /API/
     Users/
       {userID}/
          Lists/
              {listID}/
                  Item1
                    ItemUIName
                    ItemID
                  Item2
                    ItemUIName
                    ItemID
                  Item3
                    ItemUIName
                    ItemID


example.com/api/mackenlyj/lists/04745/ returns:

8531
  Samsung s10
  1876884
8758
  60 inch TV
  8716765
1897
  New Car
  8976789

To my knowledge there isn’t a way to do this on your device without storing your list via API.`


#6

Ok I got it! Thanks Wade!
I’ll try although I am not a developer :smile:


#7

Thanks @mackenly.j!
I’m on Backendless, can you do this for me? Just for my MVP? Do you want to earn some $?


#8

@m.canevarollo one way to think about this is like a shopping cart.
So you have a temporary list (cart) saved on an entity (e.g. User).
So anytime an item is checked (added to cart) you add the item to the list at the backend.
So at any point in time can query for the cart (list of items).
Basically this is the same thing both @mackenly.j and @wade has mentioned above. Just wanted to rehash what they said with a practical example (shopping cart).
Now if you search for how to implement shopping cart on this forum you will have further info.


#9

Thanks a lot for your well explained solution.


#10

Excellent Collaborative efforts all over this. Thanks everyone for coming together!