Page 3 of 3

How do I add a record with a pointer in it.

Posted: Tue Jun 10, 2014 8:32 pm
by Evgene Karachevtsev

Hello Sander,

Could you please share your application and database with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a, send us their names and write steps how to reproduce issue http://docs.appery.io/documentation/s...


How do I add a record with a pointer in it.

Posted: Sat Jul 04, 2015 1:39 am
by Jack Bua

I too am having an issue when creating a new record for a collection that has a pointer to another collection.

Service request with collName pre-populated
Image

Mapping with _Id coming from LSV that was set onClick of the desired account
Image

I am able to create a record, but it just does not populate the pointer field with the id, no matter what I try. Even during testing I cannot get it to put a static id into the pointer field.

Image

the code that is suggested in this post does not work but I did not expect it to. As you can see in my mapping it looks like the collName and the _id are two separate values, so adding that code to the mapping of the _id doesn't make sense.

I am invoking the service with a button click.
I have no acl as I want everyone to see everything.

Any suggestions?


How do I add a record with a pointer in it.

Posted: Sat Jul 04, 2015 4:43 am
by Illya Stepanov

Hi Jack -

This is because Pointer is just a pointer to an id of a collection.

Here is basically explained how this works: https://youtu.be/RGGxTy4ilmM?t=15m33s


How do I add a record with a pointer in it.

Posted: Sat Jul 04, 2015 6:29 am
by Jack Bua

I'm sorry but I did not see what I was looking for in that portion of the video.

I am sure what I am asking for is possible since it seems so simple.

I just want to create a new record in a collection and place in its pointer field an ID from local storage, but the mapping just is not working when I try to do that. Could you help me with this?


How do I add a record with a pointer in it.

Posted: Sat Jul 04, 2015 6:36 am
by Jack Bua

https://www.youtube.com/watch?v=RGGxT...

He mentions the linking of the two collections but doesn't actually show the mapping. nor does he show the create service.


How do I add a record with a pointer in it.

Posted: Tue Jul 07, 2015 2:06 am
by Jack Bua

I did solve this issue. It looks like I was using a service that was outdated since I changed the name of the pointer column.