Skip to main content
This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer try67

You can use this code as the custom calculation script of your field, then:

var v = Number(this.getField("Same_Day_Miles").valueAsString);

if (v<=10) event.value = 16.68;

else event.value =16.68+((v-10)*1.67);

4 replies

try67
Community Expert
Community Expert
May 3, 2019

What's the name of the "A4" field in the PDF?

benkoolAuthor
Participant
May 3, 2019

"Same_Day_Miles"

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
May 3, 2019

You can use this code as the custom calculation script of your field, then:

var v = Number(this.getField("Same_Day_Miles").valueAsString);

if (v<=10) event.value = 16.68;

else event.value =16.68+((v-10)*1.67);