Hello,

I'm calculating payment due dates.

I only need a second payment due date if the sales rep selects "Net 15" or "Net 30" as payment terms. If the Sales Rep selects "All Prior" the second due date should be displayed as blank but instead it's populating as "01/01/0001." Is there a way to display a date field as empty or blank? I feel like this is very basic but I'm missing it. **Right now I have the below calculation to display the first due date again (PaymentDue1).** I'm not really a fan of this. These dates are printed on proposals we give to clients and can't display 01/01/0001 - which is why I have it show the first payment due date again.

Case ( PaymentTerms = "Net 30" ; LoadInDate + 30;

PaymentTerms = "Net 15" ; LoadInDate + 15; PaymentTerms = "All Prior"; PaymentDue1

)

Also is there anyway to only display the 2nd Payment Due Date on the contract layout if and only if it has a value? (Once I fix the blank/empty situation). Attaching a screenshot of the printed dates on proposals.

Thank You in advance for all of your help.

Try:

Case

(

not IsEmpty ( PaymentDue2Overrride );

PaymentDue2Overrride ;

not IsEmpty ( PaymentDue2 ) ;

GetAsDate ( PaymentDue2 + Middle ( "1000002" ; DayOfWeek ( PaymentDue2 ) ; 1 )) ;

GetAsDate("")

)

Edit: By way of explanation, Case resolves in presentation order. If the first test is true, it stops. If not, it moves to the second test. If that's true, it stops, and so forth. That means this won't get to the second test unless the first test is false. So only if the PaymentDue2Override is empty AND the PaymentDue2 is also empty will it process the calculation.