Results 1 to 5 of 5
  1. #1
    Join Date
    May 2013
    Posts
    4

    Unanswered: problem with set_item_instance_property and set_lov_property

    Hello guys,

    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);
    end if;

    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!

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Error says
    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.

    Anyway: the following
    Code:
    set_item_instance_property('block.item2', CURRENT_RECORD, REQUIRED, PROPERTY_TRUE);
    *should* be OK.

    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).

  3. #3
    Join Date
    May 2013
    Posts
    4
    Hi Littlefoot,
    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
    1) SET_LOV_PROPERTY
    (lov_name VARCHAR2,
    property NUMBER,
    value NUMBER);

    2) SET_LOV_PROPERTY
    (lov_name VARCHAR2,
    property NUMBER,
    x NUMBER,
    y NUMBER)
    Please help me with the same as it is urgent.

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I know what SET_ITEM_PROPERTY does; that's why I said that you shouldn't forget to set the property back to TRUE.

  5. #5
    Join Date
    May 2013
    Posts
    4
    Yeah. Ok. I agree . But still can you help me with the set_lov_property with an example. So that at least I will be able to understand the syntax and see if it works.

    Also could you suggest me on which trigger should I write the set_item_property.
    Last edited by danrahul; 05-21-13 at 16:41.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •