• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

159

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
Community Expert ,
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 = "";

Votes

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