Skip to main content
Inspiring
September 15, 2017
解決済み

Is there a way to make box B take the number from box A and divide it by 8 then round to the nearest .25 in the simplified field notation?

  • September 15, 2017
  • 返信数 2.
  • 928 ビュー

Is there a way to make box B take the number from box A and divide it by 8 then round to the nearest .25 in the simplified field notation? Im trying to create a PDF for our medical staff to log their hours and I've hit a wall with my limited adobe knowledge. Any help is appreciated

このトピックへの返信は締め切られました。
解決に役立った回答 try67

It requires a custom calculation script. Try this one:

var a = this.getField("A").valueAsString;

if (a=="") event.value = "";

else {

    var v = Number(a)/8;

    v = Math.round(v / 0.25) * 0.25;

    event.value = v;

}

返信数 2

try67
Community Expert
try67Community Expert解決!
Community Expert
September 15, 2017

It requires a custom calculation script. Try this one:

var a = this.getField("A").valueAsString;

if (a=="") event.value = "";

else {

    var v = Number(a)/8;

    v = Math.round(v / 0.25) * 0.25;

    event.value = v;

}

dibz1077作成者
Inspiring
September 15, 2017

thank you so much, I give this a try then let you know how it went

dibz1077作成者
Inspiring
September 15, 2017

And if this cannot be done in the simplified field notation, how would I do it in the custom calculation script?