1 Reply Latest reply on Feb 2, 2015 9:31 PM by philmodjunk

    How to set a date control to current date on OnLayoutEnter

    Vicspidy

      Title

      How to set a date control to current date on OnLayoutEnter

      Post

      I've a date control on my layout. How do I set it to current date when layout opens?

        • 1. Re: How to set a date control to current date on OnLayoutEnter
          philmodjunk

          What kind of control?

          If a variable: Set Variable [$$Date ; value: Get ( CurrentDate ) ]

          If a field: Set Field [YourTable::DateField ; Get ( CurrentDate ) ]

          Both of these can be in a script performed by the OnLayoutEnter script trigger found in Layout Setup.

          Or you can use the Insert Menu while in layout mode to insert layout text on your layout that will always display the current date and not need any script at all.