Home » Developer & Programmer » Forms » FORMS 6i Urgent Solution
FORMS 6i Urgent Solution [message #166038] |
Tue, 04 April 2006 03:39 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Sachin Khaladkar
Messages: 12 Registered: September 2004
|
Junior Member |
|
|
Hi,
1] Can we open form thru PL/SQL and run the form-level procedure on open form.
2] Can we create form-based procedure in PL/SQL for that
form name is the input parameter.
3] Can we call/open form in backend(not shown to user) and
do process the form-level procedure and exit form automatically.
Please revert back, its urgent matter.
Thanks in advance,
Sachin Khaladkar
|
|
|
Re: FORMS 6i Urgent Solution [message #166126 is a reply to message #166038] |
Tue, 04 April 2006 12:14 ![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) |
RJ.Zijlstra
Messages: 104 Registered: December 2005 Location: Netherlands - IJmuiden
|
Senior Member |
|
|
Hi Sachin,
1] Can we open form thru PL/SQL and run the form-level procedure on open form.
No, you cannot open a form from any kind of pl/sql stuff.
2] Can we create form-based procedure in PL/SQL for that
form name is the input parameter.
What is a form-based procedure? If it's a procedure in a form, you can of course take the form-name as a parameter to it.
3] Can we call/open form in backend(not shown to user) and
do process the form-level procedure and exit form automatically.
I don't know if this is possible ( maybe by setting forms width and height to 0?), but if you don't want to see that form, why use it for processing? Use a pl/slq package and you have no problems about this issue.
HTH,
Regards,
Rob Zijlstra
|
|
|
Re: FORMS 6i Urgent Solution [message #166162 is a reply to message #166126] |
Tue, 04 April 2006 22:42 ![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) |
Sachin Khaladkar
Messages: 12 Registered: September 2004
|
Junior Member |
|
|
Hi Rob,
I written the form level procedure for FORM blocks/fields documentation purpose, in procedure i am getting all the fields
necessary properties and insert into one table of each form, but
the problem is that i have to attach above procedure to each form and run thru some button or some trigger, but this procedure may be very lengthy, i have to dynamicaly process it,
Please advice me how to do it, i think u understand my problem,
so please let me know any other solution if u know.
Thanks for your reply,
Regards,
Sachin
|
|
|
|
|
|
|
Re: FORMS 6i Urgent Solution [message #166411 is a reply to message #166400] |
Thu, 06 April 2006 03:49 ![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) |
Sachin Khaladkar
Messages: 12 Registered: September 2004
|
Junior Member |
|
|
Hi David,
That form-level procedure having :system.<<built-ins>>, so it
should not compile in PL/SQL. Is ther any other way to compile in
PL/SQL or i have to change my procedure.
Thanks in advance,
Regards,
Sachin K
|
|
|
|
Re: FORMS 6i Urgent Solution [message #166833 is a reply to message #166531] |
Sun, 09 April 2006 22:47 ![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) |
Sachin Khaladkar
Messages: 12 Registered: September 2004
|
Junior Member |
|
|
Hi David,
As per SHYJU KT asked about code, i send herewith following is the code of procedure it will run in each individual form in when-new-form-instance trigger.Pl.study and tell me i have to change something for database procedure.
PROCEDURE chk_tab_columns IS
first_blk varchar2(50) := get_form_property(:system.current_form,first_block);
last_blk varchar2(50) := get_form_property(:system.current_form,last_block);
fld_name varchar2(50);
tab_name varchar2(50);
fld_data_type varchar2(50);
tab_column_type varchar2(50);
fld_data_length number;
tab_data_length number;
--- frm_name varchar2(50) := get_form_property(:system.current_form,form_name);
frm_name varchar2(50) :=:global.file;
BEGIN
delete from form_table_excep;
-----
go_block(first_blk);
loop
if last_blk != :system.current_block then
tab_name := get_block_property(:system.current_block,query_data_source_name);
-- message('table name 1'||tab_name);
-- message('block name 1'||:system.current_block);
if tab_name is not null then
go_field(:system.current_block||'.'||get_block_property(:system.current_block,first_item));
if get_item_property(:system.current_block||'.'||get_block_property(:system.current_block,first_item),required) = 'TRUE' then
set_item_property(:system.current_block||'.'||get_block_property(:system.current_block,first_item),required,property_false);
end if;
loop
if :system.current_block||'.'||:system.current_field != :system.current_block||'.'||get_block_property(:system.current_block,last_item) then
fld_name := :system.current_block||'.'||:system.current_field;
fld_data_type := get_item_property(fld_name,datatype);
if fld_data_type = 'CHAR' then
fld_data_type := 'VARCHAR2';
end if;
fld_data_length := get_item_property(fld_name,max_length);
-- message('field name 1'||fld_name);
-- message('table name 2'||tab_name);
-- message('field type 1'||fld_data_type);
begin
select data_type,decode(data_type,'VARCHAR2',data_length,
'NUMBER',data_scale+data_precision,
'DATE', 11,data_length)
into tab_column_type,tab_data_length
from user_tab_columns
where table_name =upper(tab_name)
and column_name = upper(substr(fld_name,instr(fld_name,'.')+1));
if tab_column_type != fld_data_type then
insert into form_table_excep
values(frm_name,:system.current_block,:system.current_field,fld_data_type,fld_data_length,
upper(tab_name),:system.current_field,tab_column_type,tab_data_length,
'FORM COLUMN DATA TYPE not MATCH with TABLE COLUMN DATA TYPE --->'||:system.cursor_field
);
--- message('FORM COLUMN DATA TYPE not MATCH with TABLE COLUMN DATA TYPE --->'||:system.cursor_field);
--- message('FORM COLUMN DATA TYPE not MATCH with TABLE COLUMN DATA TYPE --->'||:system.cursor_field);
--- raise form_trigger_failure;
end if;
if tab_data_length != fld_data_length then
insert into form_table_excep
values(frm_name,:system.current_block,:system.current_field,fld_data_type,fld_data_length,
upper(tab_name),:system.current_field,tab_column_type,tab_data_length,
'FORM COLUMN WIDTH not MATCH with TABLE COLUMN WIDTH----->'||:system.cursor_field
);
---message('FORM COLUMN WIDTH not MATCH with TABLE COLUMN WIDTH----->'||:system.cursor_field);
---message('FORM COLUMN WIDTH not MATCH with TABLE COLUMN WIDTH----->'||:system.cursor_field);
---raise form_trigger_failure;
end if;
exception when no_data_found then
insert into form_table_excep
values(frm_name,:system.current_block,:system.current_field,fld_data_type,fld_data_length,
upper(tab_name),:system.current_field,null,null,
'NON-BASE TABLES FIELDS --->'||:system.cursor_field
);
end;
next_item;
else
fld_name := :system.current_block||'.'||:system.current_field;
fld_data_type := get_item_property(fld_name,datatype);
if fld_data_type = 'CHAR' then
fld_data_type := 'VARCHAR2';
end if;
---message('field name 2'||fld_name);
--message('table name 3'||tab_name);
--message('field type 2'||fld_data_type);
fld_data_length := get_item_property(fld_name,max_length);
begin
select data_type,decode(data_type,'VARCHAR2',data_length,
'NUMBER',data_scale+data_precision,
'DATE', 11,data_length)
into tab_column_type,tab_data_length
from user_tab_columns
where table_name = upper(tab_name)
and column_name = upper(substr(fld_name,instr(fld_name,'.')+1));
if tab_column_type != fld_data_type then
insert into form_table_excep
values(frm_name,:system.current_block,:system.current_field,fld_data_type,fld_data_length,
upper(tab_name),:system.current_field,tab_column_type,tab_data_length,
'FORM COLUMN DATA TYPE not MATCH with TABLE COLUMN DATA TYPE --->'||:system.cursor_field
);
--- message('FORM COLUMN DATA TYPE not MATCH with TABLE COLUMN DATA TYPE --->'||:system.cursor_field);
--- message('FORM COLUMN DATA TYPE not MATCH with TABLE COLUMN DATA TYPE --->'||:system.cursor_field);
--- raise form_trigger_failure;
end if;
if tab_data_length != fld_data_length then
insert into form_table_excep
values(frm_name,:system.current_block,:system.current_field,fld_data_type,fld_data_length,
upper(tab_name),:system.current_field,tab_column_type,tab_data_length,
'FORM COLUMN WIDTH not MATCH with TABLE COLUMN WIDTH----->'||:system.cursor_field
);
---message('FORM COLUMN WIDTH not MATCH with TABLE COLUMN WIDTH----->'||:system.cursor_field);
---message('FORM COLUMN WIDTH not MATCH with TABLE COLUMN WIDTH----->'||:system.cursor_field);
---raise form_trigger_failure;
end if;
exception when no_data_found then
insert into form_table_excep
values(frm_name,:system.current_block,:system.current_field,fld_data_type,fld_data_length,
upper(tab_name),:system.current_field,null,null,
'NON-BASE TABLES FIELDS --->'||:system.cursor_field
);
end;
exit;
end if;
end loop;
end if;
next_block;
else
tab_name := get_block_property(:system.current_block,query_data_source_name);
--message('table name 4'||tab_name);
--message('block name 2'||:system.current_block);
if tab_name is not null then
go_field(:system.current_block||'.'||get_block_property(:system.current_block,first_item));
if get_item_property(:system.current_block||'.'||get_block_property(:system.current_block,first_item),required) = 'TRUE' then
set_item_property(:system.current_block||'.'||get_block_property(:system.current_block,first_item),required,property_false);
end if;
loop
if :system.current_block||'.'||:system.current_field != :system.current_block||'.'||get_block_property(:system.current_block,last_item) then
fld_name := :system.current_block||'.'||:system.current_field;
fld_data_type := get_item_property(fld_name,datatype);
if fld_data_type = 'CHAR' then
fld_data_type := 'VARCHAR2';
end if;
fld_data_length := get_item_property(fld_name,max_length);
--message('field name 3'||fld_name);
--message('table name 5'||tab_name);
--message('field type 3'||fld_data_type);
begin
select data_type,decode(data_type,'VARCHAR2',data_length,
'NUMBER',data_scale+data_precision,
'DATE', 11,data_length)
into tab_column_type,tab_data_length
from user_tab_columns
where table_name =upper(tab_name)
and column_name = upper(substr(fld_name,instr(fld_name,'.')+1));
if tab_column_type != fld_data_type then
insert into form_table_excep
values(frm_name,:system.current_block,:system.current_field,fld_data_type,fld_data_length,
upper(tab_name),:system.current_field,tab_column_type,tab_data_length,
'FORM COLUMN DATA TYPE not MATCH with TABLE COLUMN DATA TYPE --->'||:system.cursor_field
);
--- message('FORM COLUMN DATA TYPE not MATCH with TABLE COLUMN DATA TYPE --->'||:system.cursor_field);
--- message('FORM COLUMN DATA TYPE not MATCH with TABLE COLUMN DATA TYPE --->'||:system.cursor_field);
--- raise form_trigger_failure;
end if;
if tab_data_length != fld_data_length then
insert into form_table_excep
values(frm_name,:system.current_block,:system.current_field,fld_data_type,fld_data_length,
upper(tab_name),:system.current_field,tab_column_type,tab_data_length,
'FORM COLUMN WIDTH not MATCH with TABLE COLUMN WIDTH----->'||:system.cursor_field
);
---message('FORM COLUMN WIDTH not MATCH with TABLE COLUMN WIDTH----->'||:system.cursor_field);
---message('FORM COLUMN WIDTH not MATCH with TABLE COLUMN WIDTH----->'||:system.cursor_field);
---raise form_trigger_failure;
end if;
exception when no_data_found then
insert into form_table_excep
values(frm_name,:system.current_block,:system.current_field,fld_data_type,fld_data_length,
upper(tab_name),:system.current_field,null,null,
'NON-BASE TABLES FIELDS --->'||:system.cursor_field
);
end;
next_item;
else
fld_name := :system.current_block||'.'||:system.current_field;
fld_data_type := get_item_property(fld_name,datatype);
if fld_data_type = 'CHAR' then
fld_data_type := 'VARCHAR2';
end if;
--message('field name 4'||fld_name);
--message('table name 6'||tab_name);
--message('field type 4'||fld_data_type);
fld_data_length := get_item_property(fld_name,max_length);
begin
select data_type,decode(data_type,'VARCHAR2',data_length,
'NUMBER',data_scale+data_precision,
'DATE', 11,data_length)
into tab_column_type,tab_data_length
from user_tab_columns
where table_name = upper(tab_name)
and column_name = upper(substr(fld_name,instr(fld_name,'.')+1));
if tab_column_type != fld_data_type then
insert into form_table_excep
values(frm_name,:system.current_block,:system.current_field,fld_data_type,fld_data_length,
upper(tab_name),:system.current_field,tab_column_type,tab_data_length,
'FORM COLUMN DATA TYPE not MATCH with TABLE COLUMN DATA TYPE --->'||:system.cursor_field
);
--- message('FORM COLUMN DATA TYPE not MATCH with TABLE COLUMN DATA TYPE --->'||:system.cursor_field);
--- message('FORM COLUMN DATA TYPE not MATCH with TABLE COLUMN DATA TYPE --->'||:system.cursor_field);
--- raise form_trigger_failure;
end if;
if tab_data_length != fld_data_length then
insert into form_table_excep
values(frm_name,:system.current_block,:system.current_field,fld_data_type,fld_data_length,
upper(tab_name),:system.current_field,tab_column_type,tab_data_length,
'FORM COLUMN WIDTH not MATCH with TABLE COLUMN WIDTH----->'||:system.cursor_field
);
---message('FORM COLUMN WIDTH not MATCH with TABLE COLUMN WIDTH----->'||:system.cursor_field);
---message('FORM COLUMN WIDTH not MATCH with TABLE COLUMN WIDTH----->'||:system.cursor_field);
---raise form_trigger_failure;
end if;
exception when no_data_found then
insert into form_table_excep
values(frm_name,:system.current_block,:system.current_field,fld_data_type,fld_data_length,
upper(tab_name),:system.current_field,null,null,
'NON-BASE TABLES FIELDS --->'||:system.cursor_field
);
end;
exit;
end if;
end loop;
end if;
exit;
end if;
end loop;
commit;
end;
Thanks in advance,
Sachin K.
[Updated on: Mon, 10 April 2006 02:21] by Moderator Report message to a moderator
|
|
|
|
Re: FORMS 6i Urgent Solution [message #166882 is a reply to message #166880] |
Mon, 10 April 2006 02:37 ![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) |
Sachin Khaladkar
Messages: 12 Registered: September 2004
|
Junior Member |
|
|
Hi David,
Thanks for reply, As per your statement it is not possible to create database procedure is it right.
If i create a .pll file and attach each form and calling above procedure in when-new-form-instance trigger, this job again very hectic, If u have any short-cut to call each form auto run above procedure and give me output.
Thanks in advance.
Sachin K.
|
|
|
|
|
Re: FORMS 6i Urgent Solution [message #166960 is a reply to message #166905] |
Mon, 10 April 2006 08:58 ![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) |
bdrufner
Messages: 42 Registered: August 2005 Location: Home of the Mardi Gras, N...
|
Member |
|
|
Sachin,
Like David, I also find your PLSQL procedure interesting.
Please post description (columns, datatypes, etc) for table form_table_excep so that I might review code in debug mode.
Thanks,
Barry
|
|
|
|
Re: FORMS 6i Urgent Solution [message #167269 is a reply to message #167048] |
Wed, 12 April 2006 03:52 ![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) |
Sachin Khaladkar
Messages: 12 Registered: September 2004
|
Junior Member |
|
|
Hi David,
As per your reply,I have some doubt, please clear me.
1] Two diff .pll i have to create ? with diff name ?
2] Each form i have to call these two .pll procedures ?
3] How it will execute ?
Thanks in advance,
Sachin K.
|
|
|
Re: FORMS 6i Urgent Solution [message #167441 is a reply to message #167269] |
Thu, 13 April 2006 01:30 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/67467.jpg) |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Sachin Khaladkar wrote on Wed, 12 April 2006 18:52 | Hi David,
As per your reply,I have some doubt, please clear me.
1] Two diff .pll i have to create ? with diff name ?
2] Each form i have to call these two .pll procedures ?
3] How it will execute ?
Thanks in advance,
Sachin K.
| 1] Same name, this is a bit more difficult that if you had different names but each version only lives in one place. Big one in development, little one in production.
2] Each form calls only one PLL
3] In development you get the big code and in production the little code.
David
|
|
|
Goto Forum:
Current Time: Wed Feb 12 17:54:51 CST 2025
|