DYNAMICALLY SETTING ITEM PROPERTY [message #115564] |
Tue, 12 April 2005 12:15  |
AAKHEEB
Messages: 9 Registered: June 2004
|
Junior Member |
|
|
HI ,
I HAVE A TABLE HAVING FOLLOWING COLUMNS
WHICH STORING ITEM PROPERTY AND ITS VALUE .
I AM USING PROCEDURE WHICH
WILL SET ALL ITEM PROPERTYS DYNAMICALLY
FIELDS_INFO
FILEDNAME FTYPE PROPERTYS VALUE FORMNAME
ENAME TEXTITEM VISIBLE PROPERTY_TRUE EMP
PROCEDURE VALIDATE_FIELDS(FNAME VARCHAR2)
IS
CURSOR C1 IS SELECT * FROM FIELDS_INFO WHERE FORM_NAME=FNAME;
BEGIN
FOR I IN C1
LOOP
SET_ITEM_PROPERTY(I.FIELDNAME,I.PROPERTYS,i.val); -- LINE 7 ERROR
--SET_ITEM_PROPERTY(I.FIELDNAME,VISIBLE,i.val); -- LINE 8 NO ERROR
END LOOP;
END;
IN THIS PROCEDURE IT'S NOT ALLOWING TO SET THE PROPERTY DYNAMICALLY
AT LINE NO 7
CAN ANYBODY HELP ME
|
|
|
Re: DYNAMICALLY SETTING ITEM PROPERTY [message #115603 is a reply to message #115564] |
Tue, 12 April 2005 19:27   |
 |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
I am not sure of your objectives. However, if you want to load multiple values you may want to look at set_item_instance_property and then increment the row number as part of your loop.
ps. Please stop 'SHOUTING'. Write your entries in mixed case, it is much easier to read.
[Updated on: Tue, 12 April 2005 19:28] Report message to a moderator
|
|
|
Re: DYNAMICALLY SETTING ITEM PROPERTY [message #115621 is a reply to message #115603] |
Wed, 13 April 2005 02:31   |
AAKHEEB
Messages: 9 Registered: June 2004
|
Junior Member |
|
|
Hi
Thanku For Replay .
My Exact problem is like this
i am Storeing fieldname ,fieldtype ,fieldpropertys,fieldvalue,formname
in table named as fileds_info
i am creating procedure
suth that it will fetch filedname,fieldpropertys,filedvalue
from the table and it will set.
for that my statement
set_item_property(cursor.fieldname,cursor.filedpropertys,cursor.fielvalue)
-- erorr
Default
set_item_property(itemname,property,value);
Here what i observed is my propertys column having varchar2 value
but in syntax
set_item_property(
itemname item,
property number, -- table value varchar
value varchar2(5)
)
Now how to find the equal number for visible ,enable propertys
so that i can assign this value in the loop
Thanku
|
|
|
|
|
Re: DYNAMICALLY SETTING ITEM PROPERTY [message #243235 is a reply to message #115564] |
Wed, 06 June 2007 10:23   |
hemavb
Messages: 103 Registered: May 2007 Location: Dubai , UAE
|
Senior Member |
|
|
dunno if this will help.
when you way
SET_ITEM_PROPERTY(i.item_name, i.property_name, i.property_setting);
what happens here is that all the three values are posted as STRINGS.
Now the first argument.. i.item_name, the name of the item can be a string. Unless you pass the ID of the item.
The last argument should be a Boolean value if its of true/false style or it can also be a string value.
when it comes to the 2nd argument, this argument is NOT a string. Forms has a NUMBER for each of is properties (for those of you who have done C++, Forms uses Enumeration) Each property name co-incides with a number which is actually passed to the set_item_property an get_item_property functions.
That is why you always write:
SET_ITEM_PROPERTY('emp.ename', VISIBLE, PROPERTY_FALSE); -- Correct
not as...
SET_ITEM_PROPERTY('emp.ename', 'VISIBLE', PROPERTY_FALSE); -- Wrong
So using " SET_ITEM_PROPERTY(i.item_name, i.property_name, i.property_setting) " will actually not work. as the cursor value gets passed as a string and not as the number.
Hope it helps.
[Updated on: Wed, 06 June 2007 10:25] Report message to a moderator
|
|
|
Re: DYNAMICALLY SETTING ITEM PROPERTY [message #243572 is a reply to message #243235] |
Thu, 07 June 2007 15:13   |
NizamUlMulk
Messages: 11 Registered: May 2007 Location: Paraguay
|
Junior Member |
|
|
set_item_property(i.itemname, i.property_name, i.value) is wrong
1.- i.itemname must include blockname {'BLOCK.'||i.itemname};
2.- i.value dosn´t work when it must be PROPERTY_TRUE or PROPERTY_FALSE.
you must put the question:
if i.value = 'PROPERTY_TRUE' then
set_item_property('BLOCK.'||i.itemname, i.property_name, PROPERTY_TRUE);
elsif i.value = 'PROPERTY_FALSE' then
set_item_property('BLOCK.'||i.itemname, i.property_name, PROPERTY_FALSE);
else -- a char property
set_item_property('BLOCK.'||i.itemname, i.property_name, i.value);
end if;
That works!
|
|
|
|
|