DATE CHECKING [message #335835] |
Wed, 23 July 2008 22:56  |
fadhzone
Messages: 61 Registered: April 2008
|
Member |
|
|
Hi All,
anybody please help me...
a main form have a few rows.there is a date column.
the condition is if 1st row is 23-Jan-08,then the rest must in same month too.
i want write the script for the checking in when-validate-item but how?
my boss to see it this evening.
from what i know is must use cursor concept but i dont know how to do that coz i'm new in programming
Thanks.
[Updated on: Wed, 23 July 2008 23:49] Report message to a moderator
|
|
|
Re: DATE CHECKING [message #335856 is a reply to message #335835] |
Thu, 24 July 2008 00:42   |
gurupatham
Messages: 66 Registered: March 2008 Location: Chennai
|
Member |
|
|
If all the rows in multi record block,
use the following code in the when-validate-item trigger of date field.
IF :system.cursor_record = 1 then
:parameter.dummy := to_char(:Date_item6 , 'MM');
else
if :parameter.dummy <> to_char(:Date_item6 , 'MM') then
message('Month is not matched with first row');
raise form_trigger_failure;
end if;
end if;
|
|
|
|
|
Re: DATE CHECKING [message #335881 is a reply to message #335876] |
Thu, 24 July 2008 01:28  |
fadhzone
Messages: 61 Registered: April 2008
|
Member |
|
|
I know..but later i'll ask my boss about that..for the time moment i use trunc(:date_item, 'MM').
after i studied about cursor,the one that guru gave me the most easy.
thanks guru n littlefoot.
|
|
|