Merging two fields into one field

I have created a document that has first and last name fields to complete. I would like to have the first and last name merged to a 'Full Name' field later in the docuemnt.

Below is the script I tried but was unsuccessfull.

// Get the field values, as strings
var s1 = this.getField("Delegating Physician First Name").valueAsString;
var s2 = this.getField("Delegating Physician Last Name").valueAsString;
// Combine values, separated by a space = s1 + " " + s2;

Please help!!

Denise Cavender

1 Answer

I assume you are using this as a custom calculation script for your full name field. Change the last line to this:

event.value = s1 + " " + s2; 

Then it should work.

Karl Heinz Kremer   

Please specify a reason: