Hi,
I have a repeating group that shows several fields, and a drop down outside the repeating group that allows a user to select a choice between various values for one of the fields (e.g., the things are drinks, one field is ‘type’ and can be coffee, tea, juice, etc., and i have a drop down that allows the user to select either coffee, tea, juice, etc.).
I want to show only the drinks that have a ‘type’ field = that selected in the drop down. I have tried this using the repeating group to show ‘drinks’ and do a search whereby the constraint is ‘type’ = drop down - however i can’t as it won’t let me select the drop down as the source. What am I doing wrong please?
Many thanks
Simon
Can you post a screenshot of the situation, with the repeating group search in the property editor?
The names of the Things and Fields etc. are different in this but it is the same situation. I have the Thing ‘Shops’ which has a field ‘Member of Chain’ and also the Thing ‘Chains’ which are a collection of Shops run by one company. The field ‘Member of Chain’ is defined as type ‘Chain’. Then each ‘Chain’ is meant to have a list of ‘Shops’ (although I am having trouble with this too so will make another topic on this when I can).
a) See the drop down in the top right (Select Chain) - this is to allow the user to select only those ‘Shops’ that have ‘Member of Chain’ = whatever is selected in the drop down (e.g., Starbucks).
b) Then the repeating group should show only those ‘Shops’ where ‘Member of Chain’ = whatever is selected
However as the picture shows, it does not allow me to reference the Drop Down. I had a work around where I could say ‘Any field’ = the drop down selection but this no longer works as I had to change the other field that it was picking up.
Hope this is clear.
Thanks
Simon
Your problem here is the type of data the dropdown returns. You’ve set it to text, and the list if the list of names of the chains. So if you do so it’s not a chain any more, that is returned. On the other hand, you want to set a constraint on the ‘chain member’ field, which is a chain. That’s why you don’t see the dropdown, because Bubble won’t show you the fields that aren’t compatible.
The way to solve that is very simple. Change the dropdown to being a list of chains, make the list a search for chains (and not a search of chains’s names), and make the expression for the caption ‘current option’s name’. Then you’ll be able to reference the dropdown.
Makes sense?
Yes that works now, thanks very much.