Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing item properties on multiple items selected by a query 1

Status
Not open for further replies.

tropics48

Programmer
Jan 8, 2004
5
US
I want to change the item properties (or "set" them) on several "items" I've selected from a query, but am not sure how to go about doing that. For instance, I am doing a query to find a certain type of transaction, then I am querying to find out what columns belong to that transaction. I want to change the item properties on the user screen that are equal to the columns that belong to that transaction, but the name of the items on screen will be 'block.column name' whereas the columns from the table will just be 'column name'. Thanks!
 
Your requirements are a bit vague.

I assume from your descriptions you are using Oracle Forms. Have you looked at SET_ITEM_PROPERTY and SET_ITEM_INSTANCE_PROPERTY?
 
I am using forms developer.
I plan on using set_item_property, but you usually have to name the specific item - I want to try and set the item property on all items involved at the same time, instead of having to go through and name, for each transaction type, each field that is used for that transaction and then set the properties (4 different properties) for each item. Since I have 35 transaction types that could use 1 - 30 fields, that's a lot of going round and round. I thought there might be an easier way.

Ie:
BEGIN
SELECT cdtrans
INTO l_cdtrans_s
FROM table
WHERE cdtranstyp = 'THIS'
AND nuchange = :b_ctrl_1.nuchange;

SELECT decolumn
INTO l_decolumn_s
FROM table
WHERE cdtrans = l_cdtrans_s;



Set_Item_Property ('block.l_cdtrans_s',Navigable,Property_true);
Set_Item_Property ('block.l_cdtrans_s',Insert_allowed,Property_true);
Set_Item_Property ('block.l_cdtrans_s',Update_allowed,Property_true);
Set_Item_Property ('block.l_cdtrans_s',Visual_attribute,'VA_OPT_ITEM');


END;

rough idea - basically, I'm not sure what to use for 'block.l_cdtrans_s'?
 
If your item names are unique within the form you do not need to specify the block name. Also, you can use the contents of a variable instead of using a string value like 'block.field' for the first parameter of SET_ITEM_PROPERTY.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top