when ever you want answer just ask Mr TOM
Mohammed Al-moayed, March 12, 2001 - 1:13 pm UTC
Well I think that Mr tom is ding his best for answering the
Question for all individuals in the world, and the answers are Very good and confident, and I really thank him and all his coworkers.
Review in Forms In Developer & Items Property Function
Mohammed Al-moayed, March 12, 2001 - 1:15 pm UTC
Well I think that Mr tom is ding his best for answering the
Question for all individuals in the world, and the answers are Very good and confident, and I really thank him and all his coworkers.
SOS - Need your help
Nayan J. Sarma, June 11, 2004 - 9:19 am UTC
Hi Tom,
I'm working with Forms6i and having this strange problem.
I've a form with multiple canvases all on the same window. CNV_main is the content canvas and rest are
all stacked canvases (STK_CNV1 to STK_CNV5). The navigation to these canvases are done conditionally.
Before modifying this form everything was working perfectly.
I added a new Radio Group with 6 radio buttons in STK_CNV3 and resized it to fit the group. The form ran
perfectly showing everything correctly & the navigation was also fine.
THen I added a few lines of code to an already existing procedure, which is called from the
WHEN-NEW_FORM_INSTANCE trigger to hide a set of fields conditionally
------------------------------------------
PROCEDURE L_SET_FIELDS IS
BEGIN
IF :GLOBAL.M_PARA_1 = 'RES' THEN
SET_ITEM_PROPERTY('OAS_FM_CHARGE_CODE' , VISIBLE,PROPERTY_FALSE);
SET_ITEM_PROPERTY('OAS_FM_CHARGE_CODE' , ENABLED,PROPERTY_FALSE);
SET_ITEM_PROPERTY('OAS_TO_CHARGE_CODE' , NAVIGABLE,PROPERTY_FALSE);
SET_ITEM_PROPERTY('OAS_TO_CHARGE_CODE' , VISIBLE,PROPERTY_FALSE);
SET_ITEM_PROPERTY('OAS_TO_CHARGE_CODE' , ENABLED,PROPERTY_FALSE);
SET_ITEM_PROPERTY('OAS_TO_CHARGE_CODE' , NAVIGABLE,PROPERTY_FALSE);
SET_ITEM_PROPERTY('OAS_CHARGE_AREA_NUM', VISIBLE,PROPERTY_FALSE);
SET_ITEM_PROPERTY('OAS_CHARGE_AREA_NUM', ENABLED,PROPERTY_FALSE);
SET_ITEM_PROPERTY('OAS_CHARGE_AREA_NUM', NAVIGABLE,PROPERTY_FALSE);
-- THese 3 are the new lines added, the following Item is a check box in the content canvas
SET_ITEM_PROPERTY('OAS_FORCE_PARTY_CODE_YN_NUM', VISIBLE, PROPERTY_TRUE);
SET_ITEM_PROPERTY('OAS_FORCE_PARTY_CODE_YN_NUM', ENABLED, PROPERTY_TRUE);
SET_ITEM_PROPERTY('OAS_FORCE_PARTY_CODE_YN_NUM', NAVIGABLE, OPERTY_TRUE);
ELSIF :GLOBAL.M_PARA_1 = 'CAA' THEN
SET_ITEM_PROPERTY('OAS_FM_REASON_CODE' , VISIBLE,PROPERTY_FALSE);
SET_ITEM_PROPERTY('OAS_FM_REASON_CODE' , ENABLED,PROPERTY_FALSE);
SET_ITEM_PROPERTY('OAS_FM_REASON_CODE' , NAVIGABLE,PROPERTY_FALSE);
SET_ITEM_PROPERTY('OAS_TO_REASON_CODE' , VISIBLE,PROPERTY_FALSE);
SET_ITEM_PROPERTY('OAS_TO_REASON_CODE' , ENABLED,PROPERTY_FALSE);
SET_ITEM_PROPERTY('OAS_TO_REASON_CODE' , NAVIGABLE,PROPERTY_FALSE);
-- THese 3 lines are also added afresh
SET_ITEM_PROPERTY('OAS_FORCE_PARTY_CODE_YN_NUM', VISIBLE, PROPERTY_FALSE);
SET_ITEM_PROPERTY('OAS_FORCE_PARTY_CODE_YN_NUM', ENABLED, PROPERTY_FALSE);
SET_ITEM_PROPERTY('OAS_FORCE_PARTY_CODE_YN_NUM', NAVIGABLE, PROPERTY_FALSE);
END IF;
END;
--------------------
After this whener I tried to run the form, the form will exit automatocally whever we try to navigate to
the STK_CNV3, explicitly using the SHOW_VIEW() built-in, or implicitly.
It is navigating fine among all other canvases.
To further investigate into the problem, I took a dump of the forms runtime navigation and events using
the Forms Runtime Diagnostics and this is what I found out...
-----------------------------------------------------------------------
Executing FIND_VIEW Built-in:
In Argument 0 - Type: String Value: STK_CNV3
Out Argument 0 - Type: Integer Value: 4
Executing SET_VIEW_PROPERTY Built-in:
In Argument 0 - Type: Integer Value: 4
In Argument 1 - Type: Number Value: 1401
In Argument 2 - Type: Oracle Number Value: 4.000000
In Argument 3 - Type: Oracle Number Value: 0.000000
# OM3028:OM_OPERATIONS_ACNT_SETUP.OAS_TO_TXN_CODE
ERROR FORMS_ERROR "Forms encountered unexpected signal -1073741819"
-----------------------------------------------------------------------
I searched for a solution in google.com where I found out that its a Windows XP specific problem. well,
I'm running the form on Windows XP, but even after restarting my system, the problem remained same.
Now I'm all at sea... please help me out.
June 11, 2004 - 4:15 pm UTC
sorry, haven't touched forms in going on 9 years -- wait, more than 9 years.
sorry -- try the discussion forums on otn.oracle.com
count items on canvas
Veera babu, October 17, 2008 - 8:06 am UTC
Hi tom,
i want count the number of items are there on canvas.
i don't want canvas is null items, i wrote this code
i have so many colums are there. please tell me simpaly way
DECLARE
tmp_lstqry VARCHAR2(10000) := :System.Last_Query;
tmp_index NUMBER:=0;
tmp_where VARCHAR2(10000);
lvcanvas varchar2(200);
I NUMBER:=1;
curr_item varchar2(200) := :GLOBAL.FIRST_ITEM1;
lvitem_type varchar2(200);
lvattrb1 varchar2(200);
lvattrb2 varchar2(200);
lvattrb3 varchar2(200);
lvattrb4 varchar2(200);
lvattrb5 varchar2(200) := NULL;
lvattrb6 varchar2(200) := NULL;
lvattrb7 varchar2(200) := NULL;
lvattrb8 varchar2(200) := NULL;
lvattrb9 varchar2(200) := NULL;
lvattrb10 varchar2(200) := NULL;
BEGIN
tmp_index:= NVL(INSTR( tmp_lstqry,'WHERE'),0);
if tmp_index<>0 then
tmp_where := SUBSTR(tmp_lstqry, tmp_index + 6);
else
tmp_where:= tmp_lstqry;
end if;
go_block('APL');
FIRST_RECORD;
GO_ITEM( curr_item );
curr_item := :GLOBAL.FIRST_ITEM1;
--message(:GLOBAL.LAST_ITEM1);pause;
LOOP
I:=1;
LOOP
lvcanvas := get_item_property(curr_item,item_canvas);
IF lvcanvas IS NOT NULL THEN
lvitem_type := get_item_property( curr_item,item_type);
IF lvitem_type<>'BUTTON' AND lvitem_type<>'CHART ITEM' AND lvitem_type<>'CHECKBOX' AND lvitem_type<>'OLE OBJECT' THEN
curr_item := :System.Cursor_Item;
if i=1 then
lvattrb1:= get_item_property(curr_item ,DATABASE_VALUE);
elsif i=2 then
--lvattrb2 := curr_item ;
lvattrb2:= get_item_property(curr_item ,DATABASE_VALUE);
elsif i=3 then
--lvattrb3 := curr_item ;
lvattrb3:= get_item_property(curr_item ,DATABASE_VALUE);
elsif i=4 then
--lvattrb4 := curr_item ;
lvattrb4:= get_item_property(curr_item ,DATABASE_VALUE);
elsif i=5 then
--lvattrb5 := curr_item ;
lvattrb5:= get_item_property(curr_item ,DATABASE_VALUE);
end if;
end if;
end if;
EXIT WHEN (curr_item=:GLOBAL.LAST_ITEM1);
IF i=5 Then
EXIT;
ELSE
i := i+1;
END IF;
next_item;
curr_item := :System.Cursor_Item;
End LOOP;
INSERT INTO log_tables VALUES(:GLOBAL.SCREEN, :GLOBAL.TAB,:GLOBAL.CURR_CANVAS,:GLOBAL.iv_client_ip ,:GLOBAL.server_ip,lvattrb1 ,lvattrb2,lvattrb3,lvattrb4,lvattrb5,lvattrb6,lvattrb7,lvattrb8,lvattrb9,lvattrb10,tmp_where);
COMMIT;
EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
NEXT_RECORD;
END LOOP;
EXCEPTION
WHEN OTHERS THEN
Message('HI '||SQLERRM);pause;
END;