HOW TO ENABLE ONE FIRST RECORD ITEM UNDER ONE BLOCK WITH MULTIPLE RECORDS? (merged) [message #485498] |
Wed, 08 December 2010 10:56 |
martjosh
Messages: 13 Registered: December 2009 Location: Riyadh
|
Junior Member |
|
|
Hi Brothers,
I'm using Oracle forms 10g. In the form i have this multiple records under one block. After performing the query, all records are cannot be updated. And i have this buttons at the right side that will enable the certain item that can only be updated. My problem is i cannot enable the item in the first record,instead of first record all records in that item was enable.
Hope someone can help me to this. Attached are just example of how my forms look like.
Thank you.
-
Attachment: untitled.JPG
(Size: 34.23KB, Downloaded 898 times)
|
|
|
|
|
|
Re: HOW TO ENABLE ONE FIRST RECORD ITEM UNDER ONE BLOCK WITH MULTIPLE RECORDS? (merged) [message #485919 is a reply to message #485611] |
Sat, 11 December 2010 10:01 |
martjosh
Messages: 13 Registered: December 2009 Location: Riyadh
|
Junior Member |
|
|
Under block1 in the when-new-record-instance trigger i put this validation to disable the item for update allowed
if :block1.item1 = 'C'
then
set_item_property('block1.item2',update_allowed,property_false);
else
set_item_property('block1.item2',update_allowed,property_true);
end if;
// ---- ///
in the when-button-pressed i put this validation to enable the the first item in the first record but still it doesn't work. What should be the proper placement of this validation? Please help. Thank you
if :block1.item1 = 'C'
then
go_block('block1');
set_item_instance_property('block1.item2',current_record,update_allowed,property_true);
go_item('block1.item3');
else
go_block('block1');
set_item_instance_property('block1.item2',current_record,update_allowed,property_false);
end if;
[Updated on: Sat, 11 December 2010 10:02] Report message to a moderator
|
|
|
|
Re: HOW TO ENABLE ONE FIRST RECORD ITEM UNDER ONE BLOCK WITH MULTIPLE RECORDS? (merged) [message #485969 is a reply to message #485923] |
Sun, 12 December 2010 05:28 |
martjosh
Messages: 13 Registered: December 2009 Location: Riyadh
|
Junior Member |
|
|
I didn't get any errors but it doesn't allow me to update. I put also validation in any possible ways and somehow it returns true for get_item_instance_property. I put also validation to return message whether it's in the right current_record and it shows correctly. When i tried using VISUAL_ATTRIBUTE in set_item_instance_property it working fine, only the update allowed doesn't work.
|
|
|
Re: HOW TO ENABLE ONE FIRST RECORD ITEM UNDER ONE BLOCK WITH MULTIPLE RECORDS? (merged) [message #485972 is a reply to message #485969] |
Sun, 12 December 2010 06:09 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
From form builder help topic on set_item_instance_property:
Quote:
setting UPDATE_ALLOWED to true has no effect at the item instance level unless it is set consistently at the block, item, and item instance levels.
Change your when-new-record-instance trigger to use set_item_instance_property instead of set_item_property.
It's always a good idea to read the help topic on the built-in you want to use. It gives a complete usage list, along with exceptions and examples.
|
|
|
|