Unanswered: problem with set_item_instance_property and set_lov_property
I am using oracle forms 6i and new to it. I am having a multi data block.
I am facing a problem when I try to set the item instance property with respect to the list type.
1) Basically, I am having a list item having three types MANUAL, INVOICE and BOE. All are independent of each other. I am facing the problem with the MANUAL type.
I have written this code on When-Validate-Trigger of the list item as well as When-List-Changed. Also I am not setting the properties of any items initially(neither on When-New-Form-Instance nor on When-New-Block-Instance).
if block.item1 = 'MANUAL' then
set_item_instance_property('BLOCK.item2', to_number(:system.cursor_record), REQUIRED,PROPERTY_TRUE);
But I am getting this warning/error frm 41383 - no such property for set_item_instance_property on both the triggers for the first time when I open the form and thereafter. During the same form session, if I click on the next line it shows a message Field cannot be empty and directs to the item where I compulsory need to insert a value. I also tried using to_number(:system.trigger_record) but getting the same issue. There are many more items I need to set the same property for.
2)The invoice item on the block/form has a LOV. Another requirement is when I select 'MANUAL' , that LOV should not appear on selection of 'MANUAL' type and the user should be able to insert the value manually and validate manually. I did use set_lov_property, but did not get the correct usage. Please assist as soon as you can. Its urgent!
FRM-41383: No such Property for Set_Item_Instance_Property.
CAUSE: Application design error. A SET_ITEM_INSTANCE_PROPERTY built-in specified an invalid property.
ACTION: The property must be changed to BORDER_BEVEL, INSERT_ALLOWED, NAVIGABLE, REQUIRED, UPDATEABLE, or VISUAL_ATTRIBUTE, or else the call to the built-in must be removed. Level: 99 Type: Error
That's strange, because you used 'REQUIRED' property, and it is allowed ... are you sure that this is a statement that fails? Search the form for other SET_ITEM_INSTANCE_PROPERTY calls and verify whether they are valid.
As of the second question, try with SET_ITEM_PROPERTY and its VALIDATE_FROM_LIST property (set it to false if selection type is 'MANUAL'; don't forget to set it to true if it is not! It means that you'd have IF-THEN-ELSE).
The first issue is now resolved as now I used CURRENT_RECORD in place of to_number(:system.cursor_record) and is working fine. Thanx for the help.
The answer to the second question I think won't work as it is a set_item_property and is set to the whole column once it is fired. I have in total three types in the list item MANUAL,INVOICE and BOE. So if I write set_item_property for MANUAL it would set the the column VALIDATE_FROM_LIST property at once when it is fired, not allowing me to the set properties for that column according to INVOICE and BOE where I would require the LOV. I want it to go with the item instance and therefore opting for set_lov_property but not clear with the syntax given
Please help me with the same as it is urgent.