Expand my Community achievements bar.

SOLVED

Beginner question

Avatar

Level 2

Hey everyone,

I'm making a form where we pull in some customer information and one of the fields we can pull in is CUSTOMER_NAME.  What I'm trying to do is to pull that in and add a comma at the end of the string (ex. Dear CUSTOMER_NAME,).  I believe that CUSTOMER_NAME is being pulled in as an object with a string value of whatever the customer's name is.  So far I have created a textfield named customername, and on the calculation I have

customername = (a + ","); where a is a variable that equals string(CUSTOMER_NAME).  All I can get it to output is 0, and I'm not sure what I'm missing here.  Any help is greatly appreciated.

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

Maybe an easier route would be to use the Display Pattern for the textfield (See the Object > Field palette and click Patterns).

The following Dispaly pattern can be used to display fixed text before and after the value:

text{'Dear 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX', '}

Note the use of single quotes for the 'Dear ' and the ', '.

This solution does not require script.

See an example here: http://assure.ly/pAZsjS.

Hope that helps,

Niall

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

Maybe an easier route would be to use the Display Pattern for the textfield (See the Object > Field palette and click Patterns).

The following Dispaly pattern can be used to display fixed text before and after the value:

text{'Dear 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX', '}

Note the use of single quotes for the 'Dear ' and the ', '.

This solution does not require script.

See an example here: http://assure.ly/pAZsjS.

Hope that helps,

Niall

Avatar

Level 2

Thanks!  That works perfectly.