Skip to main content
Participant
July 25, 2023
Question

Find avg of value with special parameters

  • July 25, 2023
  • 2 replies
  • 588 views

Greetings!

I am trying to make the number value in the blank box align with the rules listed below the blank box. I am aware of how to make it just show the percentage points. However, I am looking for a way for those percentage points to be translated into a value of 0,1,2, or 3.

Any help would be greatly appreciated!

 

 

This topic has been closed for replies.

2 replies

Nesa Nurani
Community Expert
Community Expert
July 25, 2023

What are the name of the fields?

Participant
July 25, 2023

The name of the top box is sum

The name of the bottom box is value

Nesa Nurani
Community Expert
Community Expert
July 25, 2023

Try something like this as custom calculation script of 'value' field:

 

var score = Number(this.getField("sum").valueAsString);

if(score<7)
event.value = 0;
else if(score>=7&&score<9)
event.value = 1;
else if(score>=9&&score<11)
event.value = 2;
else if(score>=11)
event.value = 3;

 

Amal.
Community Manager
Community Manager
July 25, 2023

Hi @Courtney285825774ayp 

Hope you are doing well and thanks for reaching out.

The workflow you are trying to achieve is might be possible using JavaScript. For more information please check the help pages listed below:
https://acrobatusers.com/tutorials/javascript_console/
https://helpx.adobe.com/acrobat/using/applying-actions-scripts-pdfs.html

Hope it will help

Regards
Amal