This is a simple thing, but cannot figure out how to do this in Wappler. Using Node JS. I have a working database query that gets a single flight by id ok. I also have a server connect on my page which will return all the flights to my page when I take the “WHERE” out of the query. When I filter by id, I cannot figure out how to pass the id to the URL ($_GET) variable. I have been doing this for years with Wappler and PHP, but cannot make it happen with node.
How do I pass the id to the url?
The database query works fine
I have a “id” variable in the app as well as the server connect.
The value picked there is wrong. You are not using a query parameter here, but a value of id returned by the first record of your serverconnect1 server action. To get the query parameter named id, the value there should just be query.id
Sorry for my newness to this. I tried manually changing it with no luck. in the server connect id field it does not show my app variable “id” to select. I also don’t know how the url should be formatted. (example?id=2525).
You are again picking the server connect value as a value instead of the URL param …
To be able to see the URL param there, you need to define it on the main page:
the only thing that the define query param option does is to make the query (URL) param available in the data picker. You can always just enter it manually in the code and it will still work.
Anyway - your code should look like:
You need to define it on the main page, not on the content page!
Not sure i understand your question about the route and how is any route related here.
Mobile apps will not follow the routing as in the posted instructions. this is a workaround. (Example: /main/id/:id will not pass the variable. Have to use /?id=111 at the end to work)