Setting properties per record in Forms MRB 20188367001

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.

' src=

Patrick Sinke

  • Install App

Oracle Forms

For appeals, questions and feedback, please email [email protected]

how to change block status

set_record_property in oracle forms

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

AskHareesh Blog | Oracle Apps | Fitness by Hareesh Pothuguntla

  • Procure To Pay
  • Order To Cash
  • Receivables
  • General Ledger
  • Conversions
  • Useful Links

How to set Item property dynamically in oracle forms

How to set Item property dynamically in oracle forms, www.askhareesh.com

IMAGES

  1. Testing Oracle Applications

    set_record_property in oracle forms

  2. Tangenz: Steps for Developing an Oracle Form

    set_record_property in oracle forms

  3. Tutorial Create Wizard Layout Oracle Forms 11g

    set_record_property in oracle forms

  4. Oracle Forms Htree

    set_record_property in oracle forms

  5. oracleforms

    set_record_property in oracle forms

  6. Register custom form on the Oracle application: ~ whereisstuff

    set_record_property in oracle forms

VIDEO

  1. Add icon on button in oracle forms 10g of your choice!

  2. Oracle Forms 10g: How to create iconic button or animated button

  3. Oracle part 5 Manual Lov and Record Group

  4. Creating Forms in Oracle

  5. Oracle Forms Lesson 6 part 3( Working with Alerts forms)

  6. 05 -Oracle forms 11g

COMMENTS

  1. Set_record_property and Database Value

    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 ...

  2. OraFAQ Forum: Forms » SET RECORD PROPERTY

    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.

  3. oracle10g

    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

  4. Setting properties per record in Forms MRB

    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.

  5. Creating a Master-Detail Form

    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.

  6. 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... Skip to Main Content. Forums. Search ... Oracle forms version - 6i. Comments. Please sign in to comment. Toggle Dismiss. Locked Post. New comments ...

  7. OraFAQ Forum: Forms » change records visual attribute depending on

    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.

  8. OraFAQ Forum: Forms » Changing Record group for LOV at runtime

    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]

  9. How to set Item property dynamically in oracle forms

    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 ...

  10. Enable Disable Current Record property

    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 ...

  11. PDF Oracle Forms 10 g

    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.

  12. plsql

    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);