Good Day Community,
I have a table similar to the one above. The objective is to display messages based on the checked Flagged in an expression. Note that there is more than 3 flags but for the sake of presentation I only showed 3.
The expression I currently have is
If(GetFlags.List.Current.Flags.isRedFlagged,
"Red Error","") + ", "
If(GetFlags.List.Current.Flags.isBlueFlagged,
"Blue Error","") + ", "
If(GetFlags.List.Current.Flags.isOrangeFlagged,
"Orange Error","") + ", "
(and the expression continues by the way)
Results obtained
(R,B checked) Red Error, Blue Error,
(R checked) Red Error,
The issue is the comma. I wanted to condition it to only appear when it is necessary (if there is a word after).
Any tips will highly be appreciated.
Regards,
Pens
Hi,
In your case you can not use replace function so use this expression -
"Red Error","") + If(GetFlags.List.Current.Flags.isRedFlagged,", ","") +
"Blue Error","") + If(GetFlags.List.Current.Flags.isBlueFlagged,", ","") +
"Orange Error","") + If(GetFlags.List.Current.Flags.isOrangeFlagged,", ","") +
You need to check condition for commas as well.
Hope this will help you.
Hi Pens,
here's an option : have a separate assignment for each checkbox, one after the other, adding a comma in front of the next color only if there is already something before, each goes like this :
result =
result + If ( GetFlags.List.Current.Flags.isFlagged , If ( result<>"", ", ", "" ) + " Error", "")
Dorine