Skip navigation
_OGD_
Currently Being Moderated

Update or not Time() in a PDF FormCalc?

Aug 14, 2012 2:44 PM

I would like to use Time() in an object (Invoice Number) to generate a number, but every time I open a "saved" pdf, the Invoice number changes or Updates because the Time(). This is normal. I have been trying to insert an if statement to test the object and insert Time() if the object is empty (new Invoice) or not (not empty) as when the invoice is stored to record a sale.

 

This is my guess but does not work!

 

 

<script>if (txtInvoiceNum eq Null) then (txtInvoiceNum = Time()) end if

 

Please help!

 

 
Replies
  • Currently Being Moderated
    Aug 15, 2012 9:58 PM   in reply to _OGD_

    you do not need the brackets after the 'then' and also 'endif' is one word in formcalc.

     

    if (txtInvoiceNum.isNull) then

    txtInvoiceNum = Time()

    endif

     

    should work.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points