|
|
|
|
|
Re: Disable Item in a Block (merged 3) [message #679276 is a reply to message #679275] |
Wed, 19 February 2020 16:49   |
buggleboy007
Messages: 282 Registered: November 2010 Location: Canada
|
Senior Member |
|
|
anil4oracle wrote on Wed, 19 February 2020 16:36Thanks for your quick reply buggleboy007, however, it did not work. I checked out the posts listed, but couldn't find anything I could use. Appreciate you looking into it.
When you say it did not work, what do you mean by it? Secondly, what have you tried? Could you post it? Even I am new to Forms so may be we both can learn from each other.
BTW - The field that you want to make it non-editable, is it based on a specific condition or is it non-editable across the board i.e. for all records? If so, then you can change the properties in the 'Property Palette'.
|
|
|
Re: Disable Item in a Block (merged 3) [message #679277 is a reply to message #679276] |
Wed, 19 February 2020 17:33   |
 |
anil4oracle
Messages: 6 Registered: February 2020
|
Junior Member |
|
|
Yes, it is based on the value in first column(Dropdown). I tried both set_item_property and set_item_instance_property
When the user goes to this popup screen, I pre-populate the data in Column3/Foreign_Acceptor_No and they don't want the user to change it, but only for certain select records(key on value in Col1)
--Full code snippet in the attached.
IF :site_network.card_type_id IN (7, 109) --Column1 Value Condition
THEN
--set_item_instance_property('SITE_NETWORK.FOREIGN_ACCEPTOR_NO', current_record, update_allowed, property_true);
set_item_property('SITE_NETWORK.FOREIGN_ACCEPTOR_NO', navigable, property_false);
ELSE
--set_item_instance_property('SITE_NETWORK.FOREIGN_ACCEPTOR_NO', current_record, update_allowed, property_false);
set_item_property('SITE_NETWORK.FOREIGN_ACCEPTOR_NO', navigable, property_true);
END IF;
-
Attachment: add_sn.sql
(Size: 2.12KB, Downloaded 2054 times)
|
|
|
|
|
Re: Disable Item in a Block (merged 3) [message #679281 is a reply to message #679279] |
Wed, 19 February 2020 19:37   |
buggleboy007
Messages: 282 Registered: November 2010 Location: Canada
|
Senior Member |
|
|
Ok. Using the property that I furnished, find a way to have your issue fixed. Try searching on Oracle's forms forums and see if you can get an answer.
I am sailing in the same boat as you. So cannot help you beyond this :(-
|
|
|
Re: Disable Item in a Block (merged 3) [message #679290 is a reply to message #679281] |
Thu, 20 February 2020 02:45   |
cookiemonster
Messages: 13966 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
I suggest you read the forms help topics on set_item_property and set_item_instance_property.
Set_item_property affects all records
Set_item_instance_property affects the specified record only
Unfortunately you can't set enabled with set_item_instance_property.
Form builder help is incredibly detailed and you should make use of it.
The topics mentioned above list every property they can set, with examples, and link through to the help pages for properties.
The help page for each property will mention all the ways the property can be set.
|
|
|
Re: Disable Item in a Block (merged 3) [message #679304 is a reply to message #679290] |
Thu, 20 February 2020 08:53   |
buggleboy007
Messages: 282 Registered: November 2010 Location: Canada
|
Senior Member |
|
|
@Anil: Cookiemonster is right. SET_ITEM_INSTANCE property is only for that specific text item of the record, where as SET_ITEM_PROPERTY is for the entire items of that block. This is what the manual says:
SET_ITEM_INSTANCE_PROPERTY
Modifies all instances of an item in a block by changing a specified item property
SET_ITEM_PROPERTY built-in
Description
Modifies all instances of an item in a block by changing a specified item property. Note that in some
cases you can get but not set certain object properties.
|
|
|
|
|
Re: Disable Item in a Block (merged 3) [message #679339 is a reply to message #679335] |
Mon, 24 February 2020 04:03  |
cookiemonster
Messages: 13966 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
anil4oracle wrote on Sat, 22 February 2020 15:41
I agree the manual is very detailed with examples. I did read about both those built-in procedures. I tried using SET_ITEM_INSTANCE with the "UPDATE_ALLOWED" but that didn't seem to work.
It was never going to work, which you'd know if you read the help topics properly. update_allowed is not one of the small set of properties that can be set with site_item_instance
anil4oracle wrote on Sat, 22 February 2020 15:41
I was just curious if there was any other option to handle this.
The properties set_item_instance_property does let you set allow you to rendered an item unchangeable - insert_allowed, update_allowed, navigable - and then set visual attribute to make it obvious it can't be set.
|
|
|