I am creating a directory listing app and am using MySQL as the datasource.
I have a page that runs a query against 2 tables using a join to display
Customer, Vehicle, Date Hired.
John Brown, Toyota Sienna, 1-Jul-2024
Jane Hadley, Nissan Leaf, 3-Jul-2024
What I would like to do is to create dynamic hyperlinks associated with each of these results, so if I click on customer’s name, I go to a page which will run a query on that customer id and display the data. Same for the vehicle.
Hi @SynopsisLabs You can use our listing block (to display customers) and then once they click on that row, you can create a record details page which includes all of that customers data and showcase it there. This is all native functionality.
If that doesn’t work for some reason, you can look at pre-assembling URLs in your SQL database which you then use to trigger on page navigation to go to those pre-made URLs with your users data.
The first option might not work as I want to be able to go to different pages depending on which column in the row is selected. So if the user clicks John Brown, his details are shown. If they click Toyota Sienna, those details are shown, etc.
Would need some guidance on the pre-assembly. As I mentioned, the links have to be dynamic depending on the id of the data, so for example if I was using php it would be
When clicking on the detail block, click on “action” and create “item buttons”, one button for each record. Then, when you click the button, have it navigate to the proper details page for each record.
So I don’t need a button which would be an additional component - I want each cell to be a hyperlink to another table passing either customerId, vehicleId or some other identifier.
It also means that the query for the called table must be able to accept the id that is passed.
Given your example, if you wanted to be able to click on the order date to show all orders from that date, or on the price to show all products with that price, how would you accomplish that?