How to enable update of an item within disabled block (disabled for update) [message #425144] |
Wed, 07 October 2009 14:42 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sindikalac
Messages: 52 Registered: November 2008 Location: Europe
|
Member |
|
|
Hi,
I have a data block, and I had to disable that block for updates if condition is satisfied.
So I included this code into When-New-Forme-Instance
IF :MYBLOCK.STATUS=1 THEN
Set_Block_Property('MYBLOCK',UPDATE_ALLOWED,PROPERTY_FALSE);
This works fine. But, now I need to allow just one item to be updateable within that block. Other items shouldn't be updateable. So I tried this:
IF :MYBLOCK.STATUS=1 THEN
Set_Block_Property('MYBLOCK',UPDATE_ALLOWED,PROPERTY_FALSE);
Set_Item_Property('MYBLOCK.ITEM1',UPDATE_ALLOWED,PROPERTY_FALSE);
That didn't work, so I changed that into:
IF :MYBLOCK.STATUS=1 THEN
Set_Block_Property('MYBLOCK',UPDATE_ALLOWED,PROPERTY_FALSE);
Set_Item_Property('MYBLOCK.ITEM1',UPDATEABLE,PROPERTY_FALSE);
I tried different variations with enabled, updateable, update_allowed properties, but nothing worked.
Any idea?
|
|
|
Re: How to enable update of an item within disabled block (disabled for update) [message #425207 is a reply to message #425144] |
Thu, 08 October 2009 01:08 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
omaribais
Messages: 34 Registered: October 2009 Location: Bangladesh
|
Member |
![omaribais@gmail.com](/forum/theme/orafaq/images/google.png)
|
|
hi sindikalac,
If you use the code Set_Block_Property('MYBLOCK',UPDATE_ALLOWED,PROPERTY_FALSE);
you can't make update_allowed any item in "MYBLOCK" unless you use
Set_Block_Property('MYBLOCK',UPDATE_ALLOWED,PROPERTY_TRUE);. But through this command all item would be update_allowed.
Under your condition you can repeat
Set_Item_Property('MYBLOCK.ITEM...',UPDATE_ALLOWED,PROPERTY_FALSE);
above line for all displayed item of your block. And for item1 you have to use
Set_Item_Property('MYBLOCK.ITEM1',UPDATE_ALLOWED,PROPERTY_TRUE);
So the code should be,
IF :MYBLOCK.STATUS=1 THEN
Set_item_Property('MYBLOCK.item2',UPDATE_ALLOWED,PROPERTY_FALSE);
Set_Item_Property('MYBLOCK.item3',UPDATE_ALLOWED,PROPERTY_FALSE);
.
.
.
Set_Item_Property('MYBLOCK.ITEM1',UPDATE_ALLOWED,PROPERTY_TRUE);
- Omar
|
|
|
|
|