Here is how I got it working finally:
I have a master field
Dance which lists all valid dances for the given song. I created a field for every single dance. So I got ~20 fields Named
Dance Abbreviation 1,
Dance Abbreviation 2, and so on. Every field is calculated to just look for ONE dance inside
Dance. It stays empty if it doesn't find this dance and outputs the abbreviation followed by ", " if it does. Then there is a second field called
Abbreviation wich just lists all abbreviations but removes the last two digits, so the last ", " isn't included in the output.
So it looks like this:
Field Name | | Field code |
Abbreviation SW | | If(IsEqual([Dance], Slow Waltz, 8),SW/, ,) |
Abbreviation SB | | If(IsEqual([Dance], Samba, 8),SB/, ,) |
... |
Abbreviation | | removeright([Abbreviation SW][Abbreviation SB] ... ,2) |
but this does Replace(Replace(Replace([Dance], Tango, TG),Slow Waltz,SW),Cha Cha,CC)
This indeed does a nice job! The differences between your and my implementation are:
- if Dance contains something I didn't consider in my list (eg. Bachata) it will be displayed if I use your suggestion and it won't if I use mine.
- Using my implementation I'm able to sort the abbreviations the way I want, instead of getting them sort as they are presented in Dance.
- well, don't know how important it is (at least for my use) but your suggestion just needs one field, I currently need ~20.
I don't know which one I will use finally, but I guess it could be easier to mess around with one giant field instead of messing around with ~20.
Thank you for taking the time to point me to this direction! Didn't know about the replace function (although I was looking for something like this in the wiki...).