Let's take the To Do app as an example. It has two related tables: Task and User. Each entry in Task is associated with one User entry. When a record in the user table is clicked, set up a BP that will open all tasks associated with the clicked user.
Setting up a landing page
Create a new page and place it in the App components section. Let’s call it Task_user and set the URL of the page /taskuser/:id.
With the help of :id, we’ll keep track of the post clicked on.
Transition setup
Go to the Workflow of the User table and set up the BP for the onRowClick trigger.
Let's add a Navigate block. In the Page field, set the URL – Task_user, and in the Record ID field, pass the Record ID from the trigger.
Thus, when clicking on a row, we will go to the Task_user page; its URL will always contain the ID of the record on which the click occurred.
Reading an ID from an address
Now, create a BP that will receive an ID from the URL and return it in integer format.
To do this, go to the Business Processes tab and click Add Business Processes.
Let's use the Get Current Page block. It gives the Title and URL of the page in string format.
As only the ID from the URL is needed, split the string using the Split String block. Pass the URL value from the Get Current Page block into it. The “/” symbol separates the ID in the URL, so we will specify it as the Separator.
As a result, we will get a string array containing all the URL elements, separated by “/” and numbered in order starting from 0.
The ID is between the two last “/” characters; therefore, subtract two from the array size to get it. Do this by using the Array Size and Subtract blocks.
We have a list of URL elements and the number of the element that contains the ID.
We can get the ID using the Array Element block. Let's pass the list from the Split String block and the result from the Subtract block into it.
Since the ID is needed in integer format, we use the To integer block and store its result as a variable in the END block.
Now let's move on to the Workflow of the table on the Task_user page. Add the received data from the database to it, as in this instruction. Before the GET block, insert the BP for getting the ID from the URL.
Pass the value from the pageid field to the user field.
When you click on a row in the User table, we will see a table of all tasks associated with this user.