Skip to main content
stephaniez7378630
Participant
February 1, 2018
Question

Hi, I'm a designer and not a developer and I need major help with some custom calculation script.

  • February 1, 2018
  • 1 reply
  • 514 views

I basically need a formula involving two fields, let's name them Field1 and Field2.

So if Field1 is less than or equal to 2000 then Field2=150.

However, if Field1>2000 then Field2=Field1 multiplied by .075.

Any ideas what the script would look like??


Thank you!!

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
February 1, 2018

As the custom calculation script of Field2 enter this code:

var v1 = Number(this.getField("Field1").valueAsString);

if (v1<=200) event.value = 150;

else event.value = v1*0.075;

stephaniez7378630
Participant
February 1, 2018

thank you soo much this worked!!!!