Changing repeating group data source through URL parameter

Hi all,

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.

See below for the setup.

Anybody got some advice?

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.

Thank you for your response. It still does not work as intended. Even if I sent through the unique identifier of the category.

Well you must be doing something wrong…

Feel free to share some more info…

Let me add some additional info:

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

In display list workflow, when you click on datasource : Search for companies, you have to add a constraint.
Constraint : Category=Get name from url

Another way to do it.

  1. Set page 2 content type to Category .

  2. In Repeating group :
    Type of content : Company
    Data source : Search of companies ( Constraint : category= current page’s category)

  3. On page 1 , Workflow :
    Go to page Directory
    Data to send : Current cell’s category.

Suggestion: Categories should be an option set.

You don’t need a workflow for that… just put it as a constraint on the RG search (and ignore empty constraints)

But in any case… if it’s not working, you’re doing something wrong somewhere…

have you looked in the debugger?

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.

Thank you. Why would you recommend an option set instead?

Well if you want some help on the forum you’ll need to share a lot more info about how you’re currently doing things (screenshots and or links)…

Otherwise, just keep using the debugger to pinpoint the error.

I see that you send no data while navigation. May be that is the issue.