I have a “Reports” page, displaying a list of reports. The url is “mydomain/reports”
By clicking any report, I would like to open that report on a sub page, making the url look like
“mydomain/reports/642784” (the number is the report’s ID).
** I obviously don’t have a dedicated page for every report. The data of the specific page needs to be sent to a single sub page.
This structure is crucial since this link will be shared outside the app, and users would be able to navigate to it directly.
I would like to send data from a REPORTS (plural) page that is showing a list of reports and is structured differently from a single report page, to a REPORT page that is showing just one report. This page should be a sub-page of the REPORTS page
I’ve used this configuration before: Instead of using a subpage, you can use 2 groups. Use 1 group for an overview of reports (f.i. a repeating group) and a group for the report details. Make the group report details is not visible on page load:
When you click on a report title in the repeating group, add the report ID to the URL using the “go to page”-action:
Then use the “page is loaded” event together with a couple of actions to hide/show the relevant groups:
First get the report id from the urlinto a custom state “id” using the logic in field Value below:
Second, as long as a user has not clicked on a report title the custom state “id” will be empty so use this to show/hide the repeating group Reports and group Report Details:
You can use this same logic to show/hide the group with the details for a report
The result is that when the page is opened you will see a report overview (notice the URL):
And when a report title is clicked (notice the URL):