Page 1 of 1

Create pointer value

Posted: Wed Nov 13, 2013 4:42 pm
by Robin Pedersen

Hi

My apps has a list and there are many items on that list. When creating new items i would like to fill out the "kobling"(pointer value) to point to the list. I have the "list" : _ID as a local variable, but i cant insert the _id of what list the items belong too. I have tryed many things.
Image

Image


Create pointer value

Posted: Wed Nov 13, 2013 5:27 pm
by Kateryna Grynko

Hi Robin,

The pointer should be in the following format:pre{"_id":"51b8c9a7e4b0e832dd8ff987","collName":"detail"}/preWhere 'detail' is a name of a depending collection.


Create pointer value

Posted: Wed Nov 13, 2013 6:12 pm
by Robin Pedersen

Sorry, I probably just aint good enough with this yet and have a hard time seeing it. But could not get it to work. Here is my try:
Image

So i copied {"_id":"51b8c9a7e4b0e832dd8ff987","collName":"detail"} and:'

inputed an ID that is correct.
Added "kobling" as this is the coloum it should be inserted too.
Added "item" as this is the name of the collection where I want to insert the value.

Cant see why i cant set this value= 52819f62e4b0a249b1286833 as my pointer value?


Create pointer value

Posted: Wed Nov 13, 2013 10:37 pm
by Alena Prykhodko

Hello Robin,

Don't replace collName with kobling.
According to first screen shot your collection is called 'wishlist' thus in your case should be:
pre
{"_id":"51b8c9a7e4b0e832dd8ff987","collName":"wishlist"} /pre


Create pointer value

Posted: Sat Nov 16, 2013 12:11 pm
by Robin Pedersen

Ahh. Thank you!


Create pointer value

Posted: Sat Nov 16, 2013 12:11 pm
by Robin Pedersen

Btw. Now im feeling very