AnsweredAssumed Answered

Assemble calc field with words that replace checkbox selections (FM12)

Question asked by laura.bowyer on Dec 16, 2015
Latest reply on Dec 17, 2015 by Extensitech

Good morning folks!


I am in need of a custom function or calculation that will assemble a list of words separated by "/" based on selections that a user clicks on a checkbox field.


For instance, the checkbox field has values of letters:  Checkbox.JPG


The resulting calculated text should always be in the same order based on the above and be written out as: "White/Blue" if W and U are selected. If B is selected only, then "Black"


I have the calc making an array based on the above options then substituting the "/" between the words and removing the carriage return, but can't get it to remove the trailing "/" is one exists:


( Substitute ( If (PatternCount (PublishingReleaseItems::ColorIndicatorInput; "W") = 1; "White" & ¶ ;"") &

If (PatternCount (PublishingReleaseItems::ColorIndicatorInput; "U") = 1; "Blue" & ¶ ;"") &

If (PatternCount (PublishingReleaseItems::ColorIndicatorInput; "B") = 1; "Black" & ¶ ;"") &

If (PatternCount (PublishingReleaseItems::ColorIndicatorInput; "R") = 1; "Red" & ¶ ;"") &

If (PatternCount (PublishingReleaseItems::ColorIndicatorInput; "G") = 1; "Green"  ;"") ; ¶ ; "/" ))


What am I missing?