I have successfully concatenated the first and last name fields in form design but when I open/run the form the concatenated field (FullName) defaults to "null null" on the form. I want it to be blank until the user enters data in the FirstName and LastName fields.
I am not an experienced Java scripter and need to have the full script exactly as it needs to be entered from start to finish.
Here is what is in the script editor the current script:
form1.Subform1.FullName::calculate - (JavaScript, client)
var first = form1.Subform1.FirstName.rawValue;
var last = form1.Subform1.LastName.rawValue;
this.rawValue = first + " " + last;
LiveCycle Designer ES2
Windows 8
Message was edited by: PenEliz1 I added a screen shot.
Solved! Go to Solution.
Views
Replies
Total Likes
You just need to do a Null check .
var first = form1.Subform1.FirstName.rawValue;
var last = form1.Subform1.LastName.rawValue;
if(first != null && last != null){
this.rawValue = first + " " + last;
}
Vjay
Views
Replies
Total Likes
You just need to do a Null check .
var first = form1.Subform1.FirstName.rawValue;
var last = form1.Subform1.LastName.rawValue;
if(first != null && last != null){
this.rawValue = first + " " + last;
}
Vjay
Views
Replies
Total Likes
Thanks. Copied your code but at first didn't work but realized that in copying, some spaces were added that when deleted, resulted in the form working they way I wanted it to.
Views
Replies
Total Likes
Hi I have just used the same code but have come across a problem. If someone deletes or changes an entry in one of the fields, it doesn't change the full name field back. any ideas?
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies