I need some help with the following. I have an application with a database with companies and categories. Categories have a name and companies can have more than one category attached to them.
Now one one page there is a list of companies with text labels stating their categories, those text labels are clickable and go to a page where a repeating group is that filters all companies based on the category that has been clicked. So I have been working with URL parameters to achieve this. Whenever a user clicks on a category text label on the index page, I open the new page and send through the url parameter NAME with key = current categories name. On the filter page I have an action on page load that it tries to read the URL parameter and use that to filter the repeating group. Unfortunately this does not seem to work, the parameter is passed through but on the 2nd page it is not being retrieved.
If you’re using the Category’s Name in the URL then that is a ‘Text’.
You can only directly Get A Thing from the URL using it’s Unique Id
So, if you want/need to use the name instead, you’ll need to do another search somewhere to find the Category based on it’s name - and for that you’ll need to use Get Data From URL with the type ‘Text’ (not category).
But, you might be better off putting the Category’s Unique ID in the URL instead if it’s name - that way you can retrieve it directly using Get Data From URL as type Category.
So we have an index page where users can click on a text (current companies category), this will need to send the category that is being clicked on as a url parameter to the page directory.
When the page directory is loaded, there is a workflow that checks whether or not the url parameter is empty, if not it needs to change the data source of the repeating group in the directory page to do a search and filter based on the url parameter.
Database design:
Category with a name
Companies with a list of categories
Yes, I know. But if put it into the RG search directly, I get trouble with the other filtering options available on that page. Because on the directions page, users can filter themselves per category too. If they choose to do so, I need to reset the RG list. The debugger shows that sending the url parameter goes alright, but on the directory page it is empty.