populate select list from database
How do I connect the items in my select list to populate with items in a collection of a database I created? It seems to be a simple GET request. Somehow struggling with this, would appreciate any help!
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
How do I connect the items in my select list to populate with items in a collection of a database I created? It seems to be a simple GET request. Somehow struggling with this, would appreciate any help!
Hi Matt - in which particular part you are having trouble? What do you have done already?
Well I'm having trouble from what I think is pretty early in the steps to accomplish it. I have the select list in the design. I have the database and a collection of items that I want to be in the select list.
I understand that there needs to be a service, which would grab the information from the database, and an event, to invoke the service. I think I'm having the most trouble in two areas. First, the mapping. I don't completely understand if I need requests or responses or both. As well as how to map it when my select list is in a grid. Second, what the exact event should be in terms of click, key down, etc.
I've attempted it many times, making a service and an event, but then when I test it, the grid and the select list inside, disappear.
Thank you for your help!
You need both the request and response. Please read the section: Working with Services: http://docs.appery.io/documentation/a.... I also recommend you try a few of our tutorials: http://docs.appery.io/tutorials -- most show how to work with services.
Lastly, please show us exactly what you tried and what doesn't work (service URL, mapping, etc)
Hi Matt,
These references may help you:
https://getsatisfaction.com/apperyio/...
https://getsatisfaction.com/apperyio/...
i've read through them and done the tutorials. I think what I am trying to do is a little different than the twitter, todo, etc apps used as examples. In these examples, the user writes something and then there is an output. However, mine differs where the user doesn't need to do anything except click on the select list and see it populated from the database. I do not think there is a request needed to be mapped, since there is no inputs for the user that should bring up the list. thanks for your help!
thanks for directing me to these forums! I would love to understand using queries since I am most familiar with SQL. However, the commands like:
"You can retrieve multiple objects at once by sending a GET request to the collection URL. Without any URL parameters, this simply lists objects in the collection:
curl -X GET
-H "X-Appery-Database-Id: Jqh5I4hekNHe1yuDOr6p1ys....."
https://api.appery.io/rest/1/db/colle... "
where would I put something like this? or is this just showing what is going on in the background of a service.
thanks for your help. i am so pleasantly surprised by the support.
You probably still need to map request as you need to pass the id of the item -- in order to retrieve the correct record.
Hello! cURL is a computer software command-line tool for transferring data using various protocols
see http://en.wikipedia.org/wiki/CURL and http://curl.haxx.se/docs/manpage.html. Besides that if you understand CURL syntax and try to use examples above you can create REST service, REST requests with any tools to check how it works.