Skip to main content
May 28, 2019
Question

Field calculation not being run as expected.

  • May 28, 2019
  • 2 replies
  • 440 views

I have the following script.  This script concatenation the first and last name into one field. When i run the application the first and last name are filled in.  The new field shows up blanks.  After opening the calculated function and closing it the data appears in the new field.  I need the calculated field to appear when I run the application.

var s1 = this.getField("insured.fields.first_name").valueAsString;

var s2 = this.getField("insured.fields.last_name").valueAsString;

event.value = s1 + " " + s2;

Message was edited by: Malcolm Thomson, updating title.

This topic has been closed for replies.

2 replies

Inspiring
May 29, 2019

Have you opened the JavaScript console to check for any errors?

You JavaScript should work if you have the correct field names, including spelling, special characters, and capitalization.

try67
Community Expert
Community Expert
May 28, 2019

Do the other name fields also have a calculated value?

May 28, 2019

There just single fields.  First Name and Last Name,  I am concatenating together to make a username in one field.  When I open the calculated editor the fields shows up with the correct name.

try67
Community Expert
Community Expert
May 28, 2019

You didn't answer my question, though.