Make dropdown filter repeating group - show all by default?

I have a static repeating group which shows Events from around the UK. Users who upload a new event choose from a static list of locations, which is filtered via a dropdown. However, if the dropdown is not selected, then no events show! How do I make it so that all events show “unless” a filter choice is chosen?

Enable the “Ignore empty constraints” checkbox in your search.

1 Like

Thanks robhblake. This worked, but threw up another little issue!

My dropdown default field says ‘All UK’. That is what I want people to see when nothing is selected. But, after I select something from the list, I then see an empty default field, where I want to see “All UK”, Any ideas?

Hi Darren,

Yeah that’s awkward. Even when we use the “Default value” it does not include this additional value as a choice item so we can’t select it subsequently.

I have a workaround, not using the “ignore empty constraints” method. Demo here (editor and run mode).

  1. Dropdown with dynamic choices (not sure of your exact DB set up, I’ve just made some dummy data in the demo)
  • Trick here is to append the additional option “All UK” which I’ve done using the “:plus item” action
  • Then we want that to be at the top of the dropdown list, so sort the expression with “descending = no” (only potential issue here is if you have a town name that comes before “All UK” alphabetically.)
  1. Repeating Group (RG) same as you had it originally

  2. Include a condition in the RG that says "When Dropdown’s value is “All UK” → Search for all locations i.e. without a constraint

Wow thank you for taking the time to build a dropdown with a solution. In your demo, you have ended the ‘choices source’ with :plus item All UK:sorted.

Unfortunately I almost got there, but I have no :plus item All UK:sorted avaiulable to choose from.

Here’s your code;

and mine:

I am working through a demo on how to create your own custom dropdown which uses option sets. I am hoping that if I can get that to work I will find a solution. If you can see something I have missed with your demo then please let me know.

I see you have used Bristol, London, Manchester in your demo but I don’t see where you have stored that info? I looked all through your database and see no mention of them?

It won’t be an option - it’s actually manually inputted as “All UK”

Ah I see! I have tried to add that in but it won’t let me type anything, I can’t even add a ‘default value’?

I have figured out a simpler solution, albeit not perfect. I added a condition to the repeating group:

all

This leaves a blank space at the top of the dropdown, but I think this solves the issue good enough.

I do appreciate your input though and I am sure your idea would have been better but perhaps a little out of my current abilities. Ideally I want to make a Custom Dropdown but have been hitting issues with that also. I’ve posted a question related to that here.