In my app there’s a multidropdown where the user can choose one or more items:
Now I want to set a condition to set another color (light red) on my element’s background only if one or more selected items from the multidropdown matches to one or more matching items that appends the string " | yes". I thought I could do it this way, but nothing happens:
If the user selects “Bayern” in the multidropdown, then the condition should be false, because there’s no matching element in the list (bayern|no).
If the user selects “Alle Bundesländer” in the multidropdown, then the condition should be true, because there’s a matching element in the list (Alle Bundesländer|yes).
Remember: If just one of the elements in the list has a matching MULTIDROPDOWN|yes matching a db item, then the condition should be true.
Ideally
Parent group’s TAG woFeiertag-TOPDOWN :each item’s Display :filtered (This text :split by (|) :item #2 is yes) :each item’s Display :split by (|): item #1 :intersect with: Multidropdown’s value :count > 0
So, you’re filtering all the items in your DB that have yes after |
And then matching that with the Multi-dropdown’s value. The moment any item is encountered that’s common to both lists, the conditional gets activated
Your List: filtered [this text contains |yes|]
: each item extract with regex [ ^.*?(?=\|yes\|) ]
: intersect with Multidropdown value [Assuming this is set to type Text]
: count > 0
Note :filtered will give you list of Texts with |yes| and then using regex we are extracting the text before |yes|