Problem when create sequence [message #377411] |
Mon, 22 December 2008 22:12 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
aorlunla
Messages: 20 Registered: March 2008
|
Junior Member |
|
|
Hello everybody,
I try to make sequence with each record when I'm in first record line number will show '1' and when I'm in second record line number will show '2'. for my problem I use when-new-record-instance with this code
BEGIN
if :DT_BLOCK.LINE_NO is null then
if :DT_BLOCK.CNT_LINE is null then
:DT_BLOCK.LINE_NO :=1;
end if;
else :DT_BLOCK.LINE_NO := :DT_BLOCK.CNT_LINE +1;
end if;
END;
(:DT_BLOCK.CNT_LINE is use for sum record)
but my line number will change when I click to another record like if I want to change line number to '2' in second record I have to click to first record or clike 'detail button' to change to another page so line number will change to '2'
In another way I try to use another trigger
I use when-new-record-instance with this code:
if :DT_BLOCK.LINE_NO is null then
:DT_BLOCK.LINE_NO:=:DT_BLOCK.CNT_LINE +1;
end if;
and when-mouse-click with this code:
if :DT_BLOCK.LINE_NO is null then
if :DT_BLOCK.CNT_LINE is null then
:DT_BLOCK.LINE_NO:=1;
end if;
end if;
with this when I go to second record line number will change to '2' but when I choose customer_name from LOV line number will always return to '1'
how can I solve this problem? please help.
Regards,
aorlunla
|
|
|
|
|
|