This might be simple but I am new to Oracle. I am using Oracle 10g and have a form that lists our information from a linked table in a tabular Layout. The last column of data is a “list Item” item type that has the Element list of Enabled (T) and Disabled (F).
What I need is when a user changes this dropdown, to disabled, I want ONLY that row to have some of the columns be disabled and not the entire column.
This is also assuming on load of the form, it will disable and enable rows of data depending on what values are being pulled from the EnabledDisabled column in the database.
Thanks for the help!
Option 1: use the
ENABLEDitem property.Unfortunately Oracle Forms does not allow changing the
ENABLEDproperty of an item at the item instance level.What you can do, however, is enable or disable the whole item when the user enters a record – use the
WHEN-NEW-RECORD-INSTANCEtrigger – depending on the value of the current record’s value for the list item, the trigger would set theENABLEDproperty toPROPERTY_TRUEorPROPERTY_FALSE.Of course, your list item would also have the same code in its
WHEN-LIST-CHANGEDtrigger.The downside to this approach is that the whole column will “look” disabled to the user, and they will not be able to select a different record using those disabled items.
Option 2: use the
INSERT_ALLOWEDandUPDATE_ALLOWEDproperties.You can set these properties at the item instance level using
SET_ITEM_INSTANCE_PROPERTY. You would set them in the block’sPOST-QUERYtrigger, as well as in the list item’sWHEN-LIST-CHANGEDtrigger.This would not, however, change how the items look on the screen. To solve this, you could also set a visual attribute at the item instance level (e.g. change the items to use a dark gray background or something).
More comments.