Expression Manager and Multiple Token Attributes

More
4 years 6 months ago - 4 years 6 months ago #91535 by dweisser
dweisser created the topic: Expression Manager and Multiple Token Attributes
Apologies if this is in the forum somewhere already.

I'm trying to concatenate two strings in this expression:

Welcome to {if(TOKEN:ATTRIBUTE_4=='Self', 'your Self',join(',',TOKEN:ATTRIBUTE_1,TOKEN:ATTRIBUTE_2))} assessment.

The "join()" segment is getting an unsupported syntax warning. Just to see, I've tried:

Welcome to if(TOKEN:ATTRIBUTE_4 == 'Self', 'your Self', TOKEN:ATTRIBUTE_1 TOKEN:ATTRIBUTE_2)) assessment.

And it blows up as well. Any ideas?

David
Last Edit: 4 years 6 months ago by dweisser.

Please Log in to join the conversation.

More
4 years 6 months ago #91545 by dweisser
dweisser replied the topic: Expression Manager and Multiple Token Attributes
Found the solution,

Hello, Welcome to if(TOKEN:ATTRIBUTE_4 == 'Self', 'your Self', TOKEN:ATTRIBUTE_1 + ' ' + TOKEN:ATTRIBUTE_2 + 's') assessment.

You have to use "+" to join the strings. Now, I have to figure out how to concatenate the " 's ". ;)

Please Log in to join the conversation.

More
4 years 6 months ago #91548 by dweisser
dweisser replied the topic: Expression Manager and Multiple Token Attributes
And appending the *apostrophe s* ala *'s* was simple.
Just use double quote in the equation.

Welcome to if(TOKEN:ATTRIBUTE_4 == 'Self', 'your Self', TOKEN:ATTRIBUTE_1 + ' ' + TOKEN:ATTRIBUTE_2 + "'s") assessment.

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now