3 Replies Latest reply on Mar 11, 2005 4:57 PM by user346369

    set_item_property display

    193037
      Hi,
      I use the following at forms6i

      if :fak.kod='1' then
      set_item_property('top.it1',DISPLAYED,property_false);
      elsif :fak.kod='4' then
      set_item_property('top.it1', DISPLAYED, property_TRUE);
      set_item_property('top.it1', VISIBLE, property_TRUE);
      set_item_property('top.it1', ENABLED, property_TRUE);
      set_item_property('top.it1', NAVIGABLE, property_TRUE);
      set_item_property('top.it1', UPDATE_ALLOWED, property_TRUE);
      end if;

      Before the item turns to visible,
      I get the message:
      "FRM-41016:Cannot set DISPLAYED attribute of the current item"
      then I get the message:
      "FRM-41032:Cannot set ENABLED attribute of the current item"
      and then the items is visible and updateable.

      How do I have to do with the messages in order not to appear?

      Thank you for your help.

      Greetings,
      Maria
        • 1. Re: set_item_property display
          3111
          Hello,

          Forms can not hide the current item that has input focus. Try move the cursor to another item before you hide the required item.

          Regards,
          Emad
          • 2. Re: set_item_property display
            193037
            Thank you for your reply.
            Unfortunately, I haven't managed to do this programmaticaly. Any help will be appreciated.

            PS: The "IF STATEMENT" is written in the trigger "when_new_record_instance" at the form level.
            .
            Maria
            • 3. Re: set_item_property display
              user346369
              You're going to need to set the first item navigated to in the block to one where you don't need to change the attributes. But even then, if user clicks on one of the fields as the first item, your code will fail. Maybe you should set them to not displayed and disabled by default first, and then only display and enable them in the when-new-record-instance trigger.