|
|
Re: PB_CANCEL masterbutton [message #563773 is a reply to message #563684] |
Fri, 17 August 2012 00:03 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/fcc3aa4f6bf1216d7843b8a707820e3e?s=64&d=mm&r=g) |
oraclehi
Messages: 41 Registered: July 2012 Location: India
|
Member |
|
|
i am using 10g form version.
my coding on cancel button is just only to clear the form as:
clear_form(no_validate);
and in property
current record visual attribute group: null
and my coding on show button is:
declare
qry varchar(200);
begin
if :control.regno is not null and :control.name is not null and :control.reason is null and :control.qtr_type is null then
Message('Kindly select either Regno or Name.');Message(' ');
clear_form(no_validate);
raise form_trigger_failure;
end if;
------------------------------if all null then-----------------------------------------------------------------------------------
if :control.regno is null and :control.reason is null and :control.name is null and :control.qtr_type is null then
go_block('DEBAR_REG_VU');
clear_block(no_validate);
execute_query;
end if;
--------------------------------------------------------------
if :control.regno is not null and :control.reason is null and :control.name is null and :control.qtr_type is null then
qry := 'regno=:control.regno';
go_block('DEBAR_REG_VU');
clear_block(no_validate);
set_block_property('DEBAR_REG_VU', default_where,qry);
execute_query;
end if;
----------------------------------------------------------------
if :control.name is not null and :control.regno is null and :control.reason is null and :control.qtr_type is null then
qry := 'name like ''%'||:control.name||'%'' order by regno ';
go_block('DEBAR_REG_VU');
clear_block(no_validate);
set_block_property('DEBAR_REG_VU', default_where,qry);
execute_query;
end if;
----------------------------------------------------------------
if :control.reason is not null and :control.regno is null and :control.name is null and :control.qtr_type is null then
qry := 'reason=:control.reason order by regno ';
go_block('DEBAR_REG_VU');
clear_block(no_validate);
set_block_property('DEBAR_REG_VU', default_where,qry);
execute_query;
end if;
----------------------------------------------------------------
if :control.qtr_type is not null and :control.regno is null and :control.reason is null and :control.name is null then
qry := 'qtr_type=:control.qtr_type order by regno ';
go_block('DEBAR_REG_VU');
clear_block(no_validate);
set_block_property('DEBAR_REG_VU', default_where,qry);
execute_query;
end if;
----------------------------------------------------------------
if :control.qtr_type is not null and :control.reason is not null and :control.regno is null and :control.name is null then
qry := 'qtr_type=:control.qtr_type and reason=:control.reason order by regno ';
go_block('DEBAR_REG_VU');
clear_block(no_validate);
set_block_property('DEBAR_REG_VU', default_where,qry);
execute_query;
end if;
-----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
if :control.debar_over='YES' then
if :control.regno is null and :control.reason is null and :control.name is null and :control.qtr_type is null then
qry:= ' debtodt<sysdate order by regno ';
go_block('DEBAR_REG_VU');
clear_block(no_validate);
set_block_property('DEBAR_REG_VU', default_where,qry);
execute_query;
end if;
--------------------------------------------------------------
if :control.reason is not null and :control.regno is null and :control.name is null and :control.qtr_type is null then
qry := 'reason=:control.reason and debtodt<sysdate order by regno ';
go_block('DEBAR_REG_VU');
clear_block(no_validate);
set_block_property('DEBAR_REG_VU', default_where,qry);
execute_query;
end if;
----------------------------------------------------------------
if :control.qtr_type is not null and :control.regno is null and :control.reason is null and :control.name is null then
qry := 'qtr_type=:control.qtr_type and debtodt<sysdate order by regno ';
go_block('DEBAR_REG_VU');
clear_block(no_validate);
set_block_property('DEBAR_REG_VU', default_where,qry);
execute_query;
end if;
if :control.qtr_type is not null and :control.reason is not null and :control.regno is null and :control.name is null then
qry := ' qtr_type=:control.qtr_type and reason=:control.reason and debtodt<sysdate order by regno ';
go_block('DEBAR_REG_VU');
clear_block(no_validate);
set_block_property('DEBAR_REG_VU', default_where,qry);
execute_query;
end if;
end if;
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
if :control.debar_over='NO' then
if :control.regno is null and :control.reason is null and :control.name is null and :control.qtr_type is null then
qry := ' debtodt>=sysdate ';
go_block('DEBAR_REG_VU');
clear_block(no_validate);
set_block_property('DEBAR_REG_VU', default_where,qry);
execute_query;
end if;
--------------------------------------------------------------
if :control.reason is not null and :control.regno is null and :control.name is null and :control.qtr_type is null then
qry := 'reason=:control.reason and debtodt>=sysdate order by regno ';
go_block('DEBAR_REG_VU');
clear_block(no_validate);
set_block_property('DEBAR_REG_VU', default_where,qry);
execute_query;
end if;
----------------------------------------------------------------
if :control.qtr_type is not null and :control.regno is null and :control.reason is null and :control.name is null then
qry := 'qtr_type=:control.qtr_type and debtodt>=sysdate order by regno ';
go_block('DEBAR_REG_VU');
clear_block(no_validate);
set_block_property('DEBAR_REG_VU', default_where,qry);
execute_query;
end if;
----------------------------------------------------------------
if :control.qtr_type is not null and :control.reason is not null and :control.regno is null and :control.name is null then
qry := ' qtr_type=:control.qtr_type and reason=:control.reason and debtodt>=sysdate order by regno ';
go_block('DEBAR_REG_VU');
clear_block(no_validate);
set_block_property('DEBAR_REG_VU', default_where,qry);
execute_query;
end if;
end if;
---------------------------------------------------------------------------------------------------------------
end;
|
|
|
Re: PB_CANCEL masterbutton [message #563806 is a reply to message #563773] |
Fri, 17 August 2012 04:33 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
As CLEAR_FORM clears all form items, maybe some of them were initialized (set) in PRE-FORM or WHEN-NEW-FORM-INSTANCE trigger. CLEAR_FORM deleted them too, so - maybe you should (at the beginning of the SHOW button's trigger) re-run PRE-FORM and/or WHEN-NEW-FORM-INSTANCE (or possibly some other triggers or procedures - you'll know that better).
|
|
|