Here's a handy tip to combine an "IF" statement with "Else" conditional formatting using ADOBE ACROBAT PRO DC 2023.
This example uses an invoice where we have to calculate the total with a discount if it is applicable. Otherwise, the total value will be shown as it is.
Please don't skip and watch the entire video for better results.
Don't forget to like and Subscribe to our channel: / @sarservices
------------------------------------------------------------------------------------------------------------------------
JAVASCRIPT:
var A = this.getField("Text1").value;
var B = this.getField("Text2").value;
var D = ((A*1000*B/100));
if(B==0) event.value=((A*1000));
else event.value=D