Home » Developer & Programmer » Forms » Next date of sysdate as Initial Value (Forms 10g)
Next date of sysdate as Initial Value [message #353530] Tue, 14 October 2008 02:14 Go to next message
thirubalajiece
Messages: 7
Registered: October 2008
Location: Pudhucherry
Junior Member
How to set the tomorrows date (sysdate+1) as a initial value for the text item(with date datatype).
I dont want to use triggers for this purpose.

Anybody tried this?

Help me.
Re: Next date of sysdate as Initial Value [message #353555 is a reply to message #353530] Tue, 14 October 2008 03:04 Go to previous messageGo to next message
*munnabhai*
Messages: 157
Registered: March 2008
Location: Riyadh
Senior Member
You can use initial value in item property....

hope this will work Smile

Regards
Re: Next date of sysdate as Initial Value [message #353832 is a reply to message #353530] Wed, 15 October 2008 05:01 Go to previous messageGo to next message
thirubalajiece
Messages: 7
Registered: October 2008
Location: Pudhucherry
Junior Member
I can't give initial value as sysdate+1 or $$dbdate+1$$ or $$dbdate$$+1.
If i give like this it shows
FRM-11328: Initial value is invalid; Correct format is dd-mon-yyyy
Re: Next date of sysdate as Initial Value [message #353838 is a reply to message #353530] Wed, 15 October 2008 05:17 Go to previous messageGo to next message
emadjad
Messages: 3
Registered: October 2008
Location: Bahrain
Junior Member

I thought that there is way than you use a database or for trigger for that purpose.

Re: Next date of sysdate as Initial Value [message #353857 is a reply to message #353530] Wed, 15 October 2008 06:13 Go to previous messageGo to next message
*munnabhai*
Messages: 157
Registered: March 2008
Location: Riyadh
Senior Member
dear its a tricky question.....

have a look below method will solve your problem....

SQL> CREATE TABLE DATES
2 (TODAY_DATE DATE,
3 TOMMOROW_DATE DATE);

Table created.

create a form goto today_date property put $$date$$ in initial value format mask as you desire DD-MON-YYY this will put sysdate in your field on runtime....

goto tommorow_date property dont put anything in initial value except format mask DD-MON-YYYY goto calculation

calculation mode = formula
formula = sysdate+1

compile run and smile after watching the result.....

hope this will solve your problem 100%

Regards

Munna.... Cool
Re: Next date of sysdate as Initial Value [message #354075 is a reply to message #353857] Thu, 16 October 2008 06:22 Go to previous messageGo to next message
thirubalajiece
Messages: 7
Registered: October 2008
Location: Pudhucherry
Junior Member
Laughing
Thank you for replies.
Its working for me.

But i cant able to update the calculated value. If i give initial value i can use the initial value or i can change it at run time.
Is there any option to solve it.
Re: Next date of sysdate as Initial Value [message #354377 is a reply to message #353530] Sat, 18 October 2008 04:52 Go to previous messageGo to next message
*munnabhai*
Messages: 157
Registered: March 2008
Location: Riyadh
Senior Member
Dear you asked in your very first post
Quote:
I dont want to use triggers for this purpose


if youi are using this for anyother purpose or to calculate u have to use trigger. and i didnt get your logic for what you are using this?

Regards
Re: Next date of sysdate as Initial Value [message #354378 is a reply to message #353530] Sat, 18 October 2008 04:56 Go to previous messageGo to next message
*munnabhai*
Messages: 157
Registered: March 2008
Location: Riyadh
Senior Member
Dear you asked in your very first post
Quote:
I dont want to use triggers for this purpose


if youi are using this for anyother purpose or to calculate u have to use trigger. and i didnt get your logic for what you are using this?

Regards
Re: Next date of sysdate as Initial Value [message #354506 is a reply to message #354378] Mon, 20 October 2008 01:23 Go to previous messageGo to next message
thirubalajiece
Messages: 7
Registered: October 2008
Location: Pudhucherry
Junior Member
In one of my flow i have "Issue date" and "Maturity Date".
I want the initial value for Issue date as sysdate and Maturity Date as Tommorows date(or sysdate+15). If the user needs he can able to change the two dates. I can get this by triggers. But is there any option to achive it by using the initial value itself.
Regards,
Balaji.
Re: Next date of sysdate as Initial Value [message #354585 is a reply to message #354506] Mon, 20 October 2008 08:04 Go to previous message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

hi,

Quote:

But i cant able to update the calculated value. If i give initial value i can use the initial value or i can change it at run time.
Is there any option to solve it.



If this is the only reason that you want to use initial value property then why don't you simply write in When-Create-Record trigger?

:BLOCK_NAME.IssueDate := sysdate;
:BLOCK_NAME.MaturityDate := sysdate + 15; --sysdate+1 whatever

You can change the values at runtime also. This trigger will be on your block where your items reside.

regards,
Saadat Ahmad

[Updated on: Mon, 20 October 2008 08:14]

Report message to a moderator

Previous Topic: image in oracle 10g
Next Topic: from message
Goto Forum:
  


Current Time: Thu Dec 08 00:14:34 CST 2016

Total time taken to generate the page: 0.11072 seconds