blank field when value in another field is 0

New Here ,
Jun 10, 2022 Jun 10, 2022

Copy link to clipboard

Copied

Hello everyone,

 

I have created a form where I have an "InputDate" field and a "DateDeducted" field. The "InputDate" being the day a deduction began and the "DateDeducted" is 7 days after to show a payment every week until the "Balance" field is $0.00.

 

var d = util.scand("mm/dd/yyyy", this.getField("InputDate").valueAsString);

var theTime = d.getTime();

var oneDay = theTime + 7*24*3600*1000;

var dd = new Date(oneDay);

event.value = util.printd("mm/dd/yyyy", dd);

 

this displays how many weeks it would take to pay off a certain amount.

I have a "Balance" field that is calculated up to $0.00

 

AmountOwed-AmountDeducted1

 

What I would like is the next "DateDeducted" field be blank once the balance reaches $0.00

 

Screenshot 2022-06-10 115358.png

 

 

TOPICS
How to

Views

16

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 10, 2022 Jun 10, 2022

Copy link to clipboard

Copied

LATEST

As the field's custom Validation script enter this code:

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines