Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

LISTLABELSARRAY Alternative

Hi,

I'm using the function LISTLABELSARRAY to display a list that is built using the AIC function based on another question. This works fine except for the brackets surrounding the options displayed with LISTLABELSARRAY. Is there anyway to display the members of a list as simple text, maybe separated by commas?

Thanks.
asked Apr 22 by cdaniel Bronze (550 points)

1 Answer

0 votes
 
Best answer
I see two alternatives that can assist here ...

DisplayListLabels(ListName,"SeparatorText", "FinalSeparatorText")

FormatListLabels(ListName,"BeforeText","AfterText")

I tend to use both from time to time.

Here's an example that may interest you ...
[%DisplayListLabels(ListName,", ",".")%]

In this example, if you had Product A, Product T and Product X to be displayed from your list, it would appear as follows ...

Product A, Product T, Product X.

And in this second example ...
[%DisplayListLabels(ListName," / ",".")%]

Product A / Product T / Product X.

You can also use HTML code within the parameters like <br> and <li> and </li> etc.
answered Apr 22 by Paul Moon Platinum (89,880 points)
selected Apr 22 by cdaniel
Perfect. Thank you for such a quick answer.
...