1 2 3 Previous Next 34 Replies Latest reply on Jan 20, 2016 2:34 PM by Extensitech

    Date Displayed as 01/01/0001

    LeilaRegan

      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.

        • 1. Re: Date Displayed as 01/01/0001
          siplus

          use hide when

          • 2. Re: Date Displayed as 01/01/0001
            Mike_Mitchell

            Well, it's hard to tell exactly what you've got because you haven't told us what PaymentDue1 is. But a date field can certainly be forced to blank; just enter "" in the calculation where it resolves (or, to be really picky, you can use GetAsDate ( "")).

             

            As far as displaying the other field, just use the Hide Object feature (Inspector, Data tab) to set a calculation that evaluates to "True" when you want the object hidden. Example:

             

            Case ( IsEmpty ; Self ; 0 )

             

            HTH

             

            Mike

            • 3. Re: Date Displayed as 01/01/0001
              Extensitech

              LeilaRegan wrote:

               

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

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

              )

              Case (

                   PaymentTerms = "Net 30"

                   ; LoadInDate + 30

               

                   ;PaymentTerms = "Net 15"

                   ; LoadInDate + 15


                   ; PaymentTerms = "All Prior"

                   ; PaymentDue1

              )

               

              According to this,

               

              If the Sales Rep selects "All Prior" the second due date should be displayed as blank

              is not actually reflected here. If PaymentTerms = "All Prior", you're getting the value in PaymentDue1... which is apparently "1"... which in a date field shows as 1/1/001.


              If the result should be blank, then the simplest way is to leave off the last condition or result. (If no condition in the case is blank, the result is blank.) Or, you could replace "PaymentDue1" with "".


              Chris Cain

              Extensitech


              • 4. Re: Date Displayed as 01/01/0001
                LeilaRegan

                PaymentDue1 is not relevant to my question but it is the first payment date. Basically if a Sales Rep says the payment is due "All Prior" the PaymentDue1 is 7 days prior to the ShipDate. As I stated in my paragraph prior to my calculation "Right now I have this calculation to display the first due date again." That first due date again is PaymentDue1 this calculation is for PaymentDue2 and I had it set as " " and even GetAsDate ( "") and it still displays 01/01/0001. This field is set to make the calculated result a date. The duplicate first payment due date (PaymentDue1) is also reflected in my attached screenshot.

                 

                I apologize for not making that clear in my post. I edited my post to hopefully make it clearer.

                • 5. Re: Date Displayed as 01/01/0001
                  LeilaRegan

                  Actually, no. I never said according to this calculation, if the Sales Rep selects "All Prior" the second due date should be blank what I said was "Right now I have this calculation to display the first due date again. I'm not really a fan of this." The field "PaymentDue1" is the first payment due date. Right now I have it duplicated into the second payment due date (PaymentDue2) because we can't have 01/01/001 on a proposal we hand over to a client. If I change the calculation to:

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

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

                  )

                   

                  The field second payment due date returns "01/01/001" same happens if I make the calculation

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

                  PaymentTerms = "Net 15" ; LoadInDate + 15; PaymentTerms = "All Prior"; GetAsDate ( "" )

                  )

                   

                  I get a 01/01/001

                   

                  So right now the second payment due date displays the first payment due date because I can't have 01/01/001.

                   

                  I have tried making this field result not a date but a text and it gets much much worse. So how do I have a field defined as a date display blank or empty instead of an actual date?

                   

                  Thank You!

                  • 6. Re: Date Displayed as 01/01/0001
                    Mike_Mitchell

                    Can't reproduce. See attached.

                    • 7. Re: Date Displayed as 01/01/0001
                      LeilaRegan

                      Okay. Ah, I think I know the issue. Apologies. I have forgotten a key calculation. The actual display field calculates the date to make sure it falls on a weekday. So this calculation comes into play.

                       

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

                       

                      I'm so sorry I forgot to mention this. I think this calculation might be the issue but I'm not sure how to fix it, but still ensure the displayed date falls on a weekday. I'm so sorry to leave this out.

                      • 8. Re: Date Displayed as 01/01/0001
                        Mike_Mitchell

                        How does this plug into the other calculation?

                        • 9. Re: Date Displayed as 01/01/0001
                          LeilaRegan

                          Field:

                          PaymentDue2 =

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

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

                          )

                           

                          Field Displayed on Layout:

                          PaymentDue2Weekday =

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

                           

                          This returns 01/01/0001 displayed on the layout.

                          • 10. Re: Date Displayed as 01/01/0001
                            Mike_Mitchell

                            Still can't reproduce. What kind of date formatting / system formats are you using?

                            • 13. Re: Date Displayed as 01/01/0001
                              Mike_Mitchell

                              Does the second file I posted process normally on your system?

                              • 14. Re: Date Displayed as 01/01/0001
                                LeilaRegan

                                No. Only has a load in date.

                                1 2 3 Previous Next