Boolean - Output displays extra commas

I'm looking for a solution that allows me to have multiple boolean selections and what ever is in a true state will output this into a comma delimited output. Anything that is set to false shows doesn't included the comma.

#if ($param1STRING=="true")
#elseif ($param1STRING=="false")
#if ($param1STRING=="true")
#elseif ($param2STRING=="false")
#if ($param3STRING=="true")
#elseif ($param1STRING=="false")

This is the output that I would like to have:


This is an output that I can do not want. When a boolean option is not selected. It display an unnecessary comman.



1 answer

This widget could not be displayed.

I don't know what you need this for, but you could just add the comma to the strings itself (if they're not empty) instead of outputting "$1STRING,". This leads to the fact, that no comma will be displayed, if $2STRING is empty.



Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

447 views 5 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you