Hi everyone,
I am trying to filter a repeating group using a location state and I’m getting some unexpected behaviour.
This seems to work ok until I try to filter using one of the other states on the repeating group.
This is what I have set up, which has been working fine:
I have a repeating group which shows users listings.
This repeating group has a category state, which users can then select from a side menu, where the categories can be added or removed from the category state:
I have the group filtered per below:
The RG will show all listings until a category is clicked, should the user wish to narrow down the search. This all works perfectly.
Now, I have added an additional location state to this repeating group, which contains the value of a filter search box.
The way I have set this up is:
When a user chooses a location, and enters search, this creates a new data type: ‘search listing’
I have then set up a workflow for a separate filter bar (filter bar listing) to display the location of this state (this works fine, as I can see the location being displayed)
And also to set the state of the repeating group to the value of this location state:
For some reason, the above workflow to set the location state does not seem to be working unless I actually trigger the category state workflow.
So, when the user searches the listings, my repeating group will show all listings, however when I click on a category, it seems to work ok i.e. that it correctly only shows listings in that location.
When I remove the category states / workflows, the location state seems to work fine but they don’t like to work together for some reason…
What I want to happen is; when a user searches using a location, the RG will only display listings in this location (and have the option to select a category once all available listings in this location are displayed). At the moment, it seems that this location state only works when the category state is triggered…
When I use the debugger, I know that there is no issue with the location state, I just cant understand why my RG wont display these listings only.
Hoping someone can help point out what I’m doing wrong. I’ve tried so many different conditionals / filter searches that I can bear to think at this stage.