Page 1 of 2
Example of using pointers and include
Posted: Mon Mar 23, 2015 7:00 pm
by Aeneas McBurney
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
Example of using pointers and include
Posted: Tue Mar 24, 2015 9:55 pm
by Egor Kotov6832188
Aeneas,
In documentation,
subtask - name of pointer column
todo - actual name of column which has id = 5458efdfe4b0c9bce12bd58a
Example of using pointers and include
Posted: Tue Mar 24, 2015 10:10 pm
by Aeneas McBurney
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
Example of using pointers and include
Posted: Wed Mar 25, 2015 9:08 pm
by Egor Kotov6832188
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
Example of using pointers and include
Posted: Wed Mar 25, 2015 9:23 pm
by Aeneas McBurney
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???
Example of using pointers and include
Posted: Wed Mar 25, 2015 9:34 pm
by Egor Kotov6832188
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
Example of using pointers and include
Posted: Wed Mar 25, 2015 9:45 pm
by Aeneas McBurney
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.
Example of using pointers and include
Posted: Thu Mar 26, 2015 7:49 pm
by Aeneas McBurney
Example of using pointers and include
Posted: Sat Mar 28, 2015 9:15 pm
by Egor Kotov6832188
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...
Example of using pointers and include
Posted: Sun Mar 29, 2015 1:28 am
by Aeneas McBurney
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