Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table with many columns on my dashboard, the table format and content is similar to this one (trying to show with dummy data):
Country_Category1 | City | Street | Country_Category2 | City | Street |
---|---|---|---|---|---|
Spain | Madrid | street1 | Sweden | Stockholm | street4 |
Germany | Bremen | street2 | Denmark | Copenhagen | stree5 |
Belgium | Brussels | street3 | Norway | Oslo | street6 |
Sweden | Stockholm | street4 | Spain | Madrid | street1 |
I want to add a filter for countries but rather than adding filters per each Country_Category, I would like to have a flag called e.g. 'Country_Flag' in a list box with values: Country2 and Country2, etc.. and then to have another list box for countries which can dynamically be changed according to the flag in 'Country_Flag' list box.
Wanted to test with two countries, created a list box (called 'Country_Flag') with two values: Country1 and Country2. Then I created another list box (called 'Country' with field as an expression, here is the script for the expression:
If((GetFieldSelections(Country_Flag)='Country1') ,Country_Category1,
If((GetFieldSelections(Country_Flag)='Country2') ,Country_Category2))
Now switching between flag values changes the displayed lists in 'Country' list box. If I allow multiple selections in 'Country_Flag' list box and I select a country from 'Country' list box, both flags (Country1 and Country2) get activated. If click 'Always One Selected Value' from the 'Country_Flag' list box properties, the 'Country' list box does not work.
Note: in my table similar countries can occur both under Country_Category1 and Country_Category2
Any idea?
Added sample files with both scenarios: when multiple or a single value is selected in the list box.
Exactly
Peter,
I made this suggestion above
Well, you post more rapidly than I can. Was still typing...
It was some time ago 😛
Ok one way around this is to load your country flag field with the same name as the fields you want to use and then use this formula in the list box:
=$(='['&Only({<$Field=Country_Flag>}[$Field])&']')
If you want to use different names then obviously you can use this as a base and create a mapping table to do this
Here is an example of the latter, using the mapped column
Awesome Adam and Peter! This works now.
Thanks and aprreciate your kind help.