Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

Example of using pointers and include

Hi,

I'm just wondering if there's a working example of using pointers. Your documentation doesn't show fully how to do this.

https://devcenter.appery.io/documenta...

I have a jobs and expenses table. The expenses are attached to the jobs data and I want to know how to return both of these in one JSON dataset.

Thanks in advance.

Aeneas

Egor Kotov6832188
Posts: 0
Joined: Wed Nov 19, 2014 5:15 pm

Example of using pointers and include

Aeneas,

In documentation,

subtask - name of pointer column
todo - actual name of column which has id = 5458efdfe4b0c9bce12bd58a

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

Example of using pointers and include

Hi Egor,

Yes I know this part but the documentation doesn't show fully how to then return data from 2 tables in 1 call. The screenshot is only of the test tab body part of request. What about the entries for the other parts?

Could someone provide a working example of what we are trying to do? My expense table has the a jobID field linking to the _id in jobs so how do I pull jobs through with attached expenses in one JSON dataset?

Thanks,
Aeneas

Egor Kotov6832188
Posts: 0
Joined: Wed Nov 19, 2014 5:15 pm

Example of using pointers and include

Aeneas,

Don't worry, body part of request doesn't have parameters at all.

For expense collection click "Create New" - "import database service", select read or query service, all will be autogenerated for you

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

Example of using pointers and include

This doesn't make sense as the documentation says to use a POST request but the read service is a GET. Aso the GET request only returns one item and I want a list of jobs with the relevant expenses attached. The documentation doesn't show how to do this???

Egor Kotov6832188
Posts: 0
Joined: Wed Nov 19, 2014 5:15 pm

Example of using pointers and include

Aeneas,

You can import update service, and it also will be automated.
Next screen has post method and it updates item by id
http://gyazo.com/d9202b5c4e0755c9cd32... - shop_pointer - collection name which points to other collection's item

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

Example of using pointers and include

I already have the update service but I want to list items not update. How do I then use this pointer to pull all expenses for jobs? I read something about include but again the documentation is not clear.

We can go back and forward but a clear example would be very useful.

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

Example of using pointers and include

Is this being looked at?

Egor Kotov6832188
Posts: 0
Joined: Wed Nov 19, 2014 5:15 pm

Example of using pointers and include

Hello Aeneas,

Yes, you are right, in this case you should use include

1) Open your service
2) open request tab - Query string
3) add parameter include
4) set value of your column in this parameter

https://devcenter.appery.io/documenta...

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

Example of using pointers and include

Hi Egor, whilst I appreciate your help your answers are very short and refer back to documentation that doesn't show how to properly do what I want. Can you please provide clear example of showing 2 collections in one dataset and how it's done.

Thanks,
Aeneas

Return to “Issues”