Have an idea?

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

Concatenate two data fields into pass in variable

I am attempting to concatenate 2 name fields together and merge them into 1 pass in variable with a space in between.

This is what I am trying, but it is not working.

[%SetValue(NAME, GetValue(FIRSTNAME).GetValue(LASTNAME)%]
asked Dec 7, 2017 by jonjepson (145 points)

1 Answer

+1 vote
Sawtooth Script uses "&" for concatenation.  You also had a missing close paren.  Try this:

[% SetValue(NAME, GetValue(FIRSTNAME) & GetValue(LASTNAME)) %]
answered Dec 7, 2017 by Zachary Platinum Sawtooth Software, Inc. (98,125 points)
Just to add the space in ...
[% SetValue(NAME, GetValue(FIRSTNAME) & " " & GetValue(LASTNAME)) %]