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

Text Field not calculating properly

Engaged ,
Nov 17, 2020 Nov 17, 2020

Copy link to clipboard

Copied

I'm hoping someone can help me figure out how to resolve my text field not calculating properly.

I have a text field name 'TotalOTHrsEmp1'.  I click on 'Calculate' and choose 'Value is the' and pick the fields I want to calculate the hours.  There is one particular text field I am having a problem with calculating.  It's a checkbox that populates '1' to another text field.  When I check the box the hour doesn't add up, but when I uncheck the box the hour does add up.  That's not what I want, I want the '1' hour to add up in the 'TotalOTHrsEmp1' text field when the box is ticked.  Here is what I have set up...

The checkbox is named 'TravelTimePdEmp1'.  The text field is named 'TTPdEmp1' and in this text field I have a custom calculation script as follows, 

var a ="";

if (this.getField("TravelTimePdEmp1").value == "Yes"){

a="1";

}

event.value = a;

Thank you in advance for any help with this!

 

 

TOPICS
Acrobat SDK and JavaScript

Views

1.3K

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

correct answers 1 Correct answer

Community Expert , Nov 18, 2020 Nov 18, 2020

You have to move "TTPdEmp1" above "TotalOTHrsEmp1" in that list, so that it calculates first.

Votes

Translate

Translate
Community Expert ,
Nov 17, 2020 Nov 17, 2020

Copy link to clipboard

Copied

Try check field calculation order. 

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
Engaged ,
Nov 17, 2020 Nov 17, 2020

Copy link to clipboard

Copied

Thank you for the reply, I tried that but it still only calculates after I uncheck the box 😞

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 ,
Nov 17, 2020 Nov 17, 2020

Copy link to clipboard

Copied

Can you share the actual file with us?

You can attach it to the original message using the tiny paperclip icon at the bottom when you edit it, or upload it to a file-sharing website (like Dropbox, Google Drive, Adobe Cloud, etc.), generate a share link and then post it here.

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
Engaged ,
Nov 17, 2020 Nov 17, 2020

Copy link to clipboard

Copied

I have employee names and numbers on there which I think would be private information.  I don't want to share something I'm not supposed to 😞

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
Engaged ,
Nov 17, 2020 Nov 17, 2020

Copy link to clipboard

Copied

I could make a more simple version with fake names and numbers and share it, it will just take me a while to do.

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 ,
Nov 17, 2020 Nov 17, 2020

Copy link to clipboard

Copied

Sure, that's fine.

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
Engaged ,
Nov 17, 2020 Nov 17, 2020

Copy link to clipboard

Copied

Okay, I simplified it and deleted all the names and codes.  I will figure out how to share with your instructions 🙂

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
Engaged ,
Nov 17, 2020 Nov 17, 2020

Copy link to clipboard

Copied

I think I did it.  I attached the Sample Copy and there's a paperclip next to it.  Did it work?

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
Engaged ,
Nov 17, 2020 Nov 17, 2020

Copy link to clipboard

Copied

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
Engaged ,
Nov 17, 2020 Nov 17, 2020

Copy link to clipboard

Copied

I don't know if that link worked.  I don't see any text fields when I open it.  I've never used dropbox before.

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
Engaged ,
Nov 17, 2020 Nov 17, 2020

Copy link to clipboard

Copied

I've tried Googe Drive as well and I can't get my file to upload to share it.  Anyways, this is a snapshot of the set field calculation order.  Is there maybe something in here I need to fix?  Or could it have something to do with the one hour that populates to the text field when checking the box for travel time?  I definitely selected all the fields for the calculation, but only the other fields add up. It's really frustrating that 1 hour isn't calculating when you check the travel time box.  

traceyc28668387_0-1605671230345.png

 

traceyc28668387_1-1605671594397.png

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
Engaged ,
Nov 17, 2020 Nov 17, 2020

Copy link to clipboard

Copied

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
Engaged ,
Nov 18, 2020 Nov 18, 2020

Copy link to clipboard

Copied

I don't seem to have that option, hopefully my last link worked.  I just tried it and it's still not adding up in OT Total Hours when I check the travel time box.

traceyc28668387_0-1605714086460.png

 

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 ,
Nov 18, 2020 Nov 18, 2020

Copy link to clipboard

Copied

You have to move "TTPdEmp1" above "TotalOTHrsEmp1" in that list, so that it calculates first.

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
Engaged ,
Nov 18, 2020 Nov 18, 2020

Copy link to clipboard

Copied

LATEST

Thank you Try67!!  It works now 🙂 

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 ,
Nov 18, 2020 Nov 18, 2020

Copy link to clipboard

Copied

"I've tried Googe Drive as well and I can't get my file to upload to share it"

You should try this: https://helpx.adobe.com/acrobat/using/sharing-pdfs.html

 

sharing-tools

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 ,
Nov 18, 2020 Nov 18, 2020

Copy link to clipboard

Copied

It works in Acrobat Reader DC and Adobe Acrobat DC.

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