• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Field calculation not being run as expected.

New Here ,
May 28, 2019 May 28, 2019

Copy link to clipboard

Copied

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.

TOPICS
Acrobat SDK and JavaScript , Windows

Views

207

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 28, 2019 May 28, 2019

Copy link to clipboard

Copied

Do the other name fields also have a calculated value?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 28, 2019 May 28, 2019

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 28, 2019 May 28, 2019

Copy link to clipboard

Copied

You didn't answer my question, though.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 28, 2019 May 28, 2019

Copy link to clipboard

Copied

No I don't have any calculated fields.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 29, 2019 May 29, 2019

Copy link to clipboard

Copied

Then it should work fine. Can you share the actual file with us (via Dropbox, Google Drive, Adobe DC, etc.)?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 29, 2019 May 29, 2019

Copy link to clipboard

Copied

Is there an email address, I can mail the file?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 29, 2019 May 29, 2019

Copy link to clipboard

Copied

If you wish you can send it to me directly to try6767 at gmail.com .

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 29, 2019 May 29, 2019

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines