You are viewing limited content. For full access, please sign in.

Question

Question

Function Formula

asked on December 11, 2024

Hi, this is probably really easy, but I can't figure it out.

I have this:

As you can see, I have a large number in the "Expires in" box.  the formula I have is:

In the "Expiration Date" (the user enters the date something expires) - the date on the top of the form (today's date).  that should then give you the # of days until expiration in the 2nd box.

My question is what do I put in the formula to either have nothing in the second box or "0" until something is entered into the first box.

Currently, I hide the box until a date is entered, but I have about 150 rules which slows the form to a crawl.

Any help would be greatly appreciated.

Donnie

0 0

Answer

SELECTED ANSWER
replied on December 12, 2024

I would handle this a bit differently. I'd wrap your calculation in an IF statement that looks to see if the Expiration Date field has been populated. Something like:

=IF(expiration_date <> "", [your calculation], "")

That's: if the expiration date is not blank, return the calculated value, else do nothing.

0 0
replied on December 12, 2024

Jennifer,

 

That's it! Thanks so much!  Now I can delete about 100 field rules!

1 0

Replies

replied on December 11, 2024

You can use the IF function to either use one value (0) or the other (calcualtion).

IF(booleanValue,value1,value2)

So =IF(date,[my calculation],0)

0 0
replied on December 12, 2024

Chad,

Thanks for helping me.  I'm getting "invalid syntax" as shown:

what have I done wrong?

Donnie

0 0
replied on December 12, 2024

It is difficult for me to see, but try a simplified test first

=IF(date, 1, 0)

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.