Home » Developer & Programmer » Forms » Initial Value
Initial Value [message #450876] Sat, 10 April 2010 02:45 Go to next message
ghadeer
Messages: 25
Registered: February 2010
Location: ksa
Junior Member
Hi all,
how can I set initial value as sysdate plus 12 month????



thanks
ghadeer
Re: Initial Value [message #450877 is a reply to message #450876] Sat, 10 April 2010 02:55 Go to previous messageGo to next message
Michel Cadot
Messages: 68686
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ADD_MONTHS

Regards
Michel
Re: Initial Value [message #450890 is a reply to message #450877] Sat, 10 April 2010 04:30 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
"Initial value" is an item property; I don't have Forms installation here so I can't check, but I *think* that it is not possible to put a function in there.

However, Michel is right - you'll need to use ADD_MONTHS, just put it into one of triggers that will populate that item. It can be, for example, PRE-TEXT-ITEM or WHEN-NEW-ITEM-INSTANCE (or even WHEN-NEW-RECORD-INSTANCE etc.). See how they behave and choose the most appropriate one.
Re: Initial Value [message #451351 is a reply to message #450890] Wed, 14 April 2010 02:44 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
To have 'sysdate' as an 'Initial Vlaue' you actually need to use '$$date$$' or '$$dbdate$$'. But otherwise, yes, you need to populate the item in a trigger, not via the 'Initial Value' property.

David
Previous Topic: help (merged by CM)
Next Topic: Error in CSV file generation (merged by CM)
Goto Forum:
  


Current Time: Fri Sep 20 12:20:53 CDT 2024