Setting properties per record in Forms MRB
This is probably described many times before, but you just can’t have enough example code snippets.
Imagine you want to restrict users to update records which end-dates are in the past in a Multi record block. Strangely, there is no way you can set the property for a record at once, so each item’s Update Allowed property must be set seperately. This can be done with the Set_Item_Instance_Property built-in which only affects the current record in the multi record block.
The code in the Post-query trigger might look something like this:
I had to add some code to make sure only displayed items of specific types had their properties altered, thus avoiding errors concerning item types that are not displayed or of inappropriate type (like buttons). The combination of a loop and the Get_item_property( <item>, NEXTITEM ) lets me loop through all items in the block programmatically.
Remember that the Post-query trigger fires for each record, so the enddate is checked every time a new record is fetched into the block. In the same code the visual attributes (like background color) of individual records can be set.
Share this:
Related posts, programmatically accessing the oracle bpel pm workflow tasklist from java applications, android puts oracle on the (google) map, the world of soa governance according to oracle – introducing the enterprise repository, about the author.
Patrick Sinke
- Install App
Oracle Forms
For appeals, questions and feedback, please email [email protected]
how to change block status
How to change block status of non database block with non database items from QUERY to CHANGED?
I cant change record property as
SET_RECORD_PROPERTY(GET_BLOCK_PROPERTY(:SYSTEM.Cursor_Block, CURRENT_RECORD ), :SYSTEM.Cursor_Block,STATUS, CHANGED_STATUS);
because record status is "Inserted" and i get frm-40742 error.
This block can be committed by custom key-commit trigger. Logic of commit cant be linked to database tables.
So, I need in standard message as .. "Data was changed. Would you like to exit from form without saving? OK NO"
Oracle forms version - 6i
[Updated on: Tue, 02 December 2008 22:11]
Report message to a moderator
- Procure To Pay
- Order To Cash
- Receivables
- General Ledger
- Conversions
- Useful Links
IMAGES
VIDEO
COMMENTS
and If I comment out set_record_property (:system.trigger_record,'blk',status,query_status);, its working fine and always returning correct database_value. So it seems like set_record_property (:system.trigger_record,'blk',status,query_status); is corrupting database_value of item. Can you please suggest if this is a bug, or there is some ...
When using a forms built-in it pays to look up what it does in form builder help. Look up set_record_property in it and see what it really does. Then look up the update_allowed property and see which built-ins allow you to set it. Then you should be able to write some code that actually works.
Use SET_ITEM_INSTANCE_PROPERTY instead. Its usage is described in Forms Online Help System. Have a look, as it doesn't have the same parameters as SET_ITEM_PROPERTY built-in, e.g. set_item_instance_property(item, record, property value); In your case, that might be
This can be done with the Set_Item_Instance_Property built-in which only affects the current record in the multi record block. The code in the Post-query trigger might look something like this: lv_itemname VARCHAR2( 200); IF :block.enddate < sysdate. THEN.
In the Property Palette for the new block, set Name to CONTROL and set Single Record to Yes. The Single Record property is appropriate for a Control Block because it does not contain multiple records. Note: Single Record must be set to Yes for a Control Block that contains a summary calculated item. 4.
How to change block status of non database block with non database items from QUERY to CHANGED?I cant change record property as SET_RECORD_PROPERTY(GET_BLOCK_PROPERTY(:SYSTEM.Cursor_Block, CURRENT... Skip to Main Content. Forums. Search ... Oracle forms version - 6i. Comments. Please sign in to comment. Toggle Dismiss. Locked Post. New comments ...
I have set current record visual attribute as 'PINK'. Then I have put two triggers on form level: 1.WHEN-NEW-ITEM-INSTANCE and code for this "SET_ITEM_INSTANCE_PROPERTY (:SYSTEM.CURRENT_ITEM,CURRENT_RECORD,VISUAL_ATTRIBUTE ,'YELLOW')" this is to change the background color of current item not whole record.
You can also use the LOV_NAME if you don't want to use the ID. For more information, refer to the help system of forms builder by looking for "SET_LOV_PROPERTY". Rajy. Report message to a moderator. Re: Changing Record group for LOV at runtime [ message #362749 is a reply to message #362627]
How to set Item property dynamically in oracle forms For restrict Insert/Update in item: SET_ITEM_PROPERTY('TRANS_ID',INSERT_ALLOWED,PROPERTY_FALSE); ... Set_Item_Instance_Property( 'TRANS_ID', CURRENT_RECORD,VISUAL_ATTRIBUTE,'VISUAL_ATTRIBUTE_NAME'); Posted by Hareesh Pothuguntla Follow us on Facebook ...
oracle, discussion. previoustoolboxuser (previous_toolbox_user) December 12, 2006, 11:54am 1. Hi, I need to enable or disable current record property and item property as well, set_item_property (item_id,enabled,propert_false) then it disable entire column value which I don't want. For instance an employee has taken current month salary then ...
Choose the menu Resize option or press the shift+R key . Buttons show on the bottom of the LOV table that allow the application user to either shrink or increase the column size. Select the LOV table and open the context menu. Choose Search column from the list of available options or press shift+S.
User is able to go back to block B2 by pressing escape key, close button and by save button. The thing is, that I'm not able to change the record_status back to the state before leaving block B2. Code sample: /*. B2 OPEN_BTN WHEN-BUTTON-PRESSED. */. set_record_property(:system.trigger_record, 'B2', STATUS, QUERY_STATUS);