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

Text Field not calculating properly

Engaged ,
Nov 17, 2020 Nov 17, 2020

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
2.1K
Translate
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.

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

Try check field calculation order. 

Translate
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

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

Translate
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

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.

Translate
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

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 😞

Translate
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

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

Translate
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

Sure, that's fine.

Translate
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

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

Translate
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

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

Translate
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
Translate
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

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.

Translate
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

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.pngexpand image

 

traceyc28668387_1-1605671594397.pngexpand image

Translate
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
Translate
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

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.pngexpand image

 

Translate
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

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

Translate
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
LATEST

Thank you Try67!!  It works now 🙂 

Translate
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

"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-toolsexpand image


Acrobate du PDF, InDesigner et Photoshoptographe
Translate
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

It works in Acrobat Reader DC and Adobe Acrobat DC.

Translate
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