Skip to main content
Participant
September 16, 2024
Answered

Need help with calculation

  • September 16, 2024
  • 2 replies
  • 497 views

Very new to Adobe!!  I have a form that I am working on that I need help with from you awesome, more experienced people!  🙂

 

I have a field, total3 that is the sum of other fields.  (works perfect) I have another field, total6, that I need to be total3 divided by 6 IF total3 is greater than 300.  If total3 is less than 300, then total6 would be zero.

 

Any takers to help me out??

 

 

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer PDF Automation Station

Enter the following custom calculation script total 6:

 

var ttl3=this.getField("total3").value;

if(ttl3>300)

{event.value=ttl3/6}

else

{event.value=0}

 

This does not cover when ttl 3 is exactly 300.  If you want 300 included in the greater than statement us >=.  If you want the 300 result to be zero, leave as is.

 

 

2 replies

PDF Automation Station
Community Expert
Community Expert
September 16, 2024

Enter the following custom calculation script total 6:

 

var ttl3=this.getField("total3").value;

if(ttl3>300)

{event.value=ttl3/6}

else

{event.value=0}

 

This does not cover when ttl 3 is exactly 300.  If you want 300 included in the greater than statement us >=.  If you want the 300 result to be zero, leave as is.

 

 

Participant
September 17, 2024

Thank you so much!!  Worked like a charm.  🙂