1 Reply Latest reply on Mar 18, 2010 10:05 AM by Manu.

    Set_item_property

    Moazam Shareef
      Guyz,

      im using the below code to hide the item on another canvas.
      on WHEN-NEW-FORM-INSTANCE -- this will not give me any error.
              SET_ITEM_PROPERTY('MN_EMP_BNFTS.CAR_NAME',    ,VISIBLE,     PROPERTY_TRUE);
           SET_ITEM_PROPERTY('MN_EMP_BNFTS.CAR_NUMBER',     VISIBLE,     PROPERTY_TRUE);
           SET_ITEM_PROPERTY('MN_EMP_BNFTS.CAR_MODEL',     VISIBLE,     PROPERTY_TRUE);
      
      instead of SET_ITEM_PROPERTY      IF i use SET_ITEM_INSTANCE_PROPERTY its giving me error. FRM-41383 no such property for SET_ITEM_INSTANCE_PROPERTY
      if i use the below code on when-list-trigger on another canvas it works fine but the items are disabled, if i use SET_ITEM_INSTANCE_PROPERTY again its giving m e same error FRM-41383
      IF :MN_EMP_BNFTS.TRANSPORTATION='Car' THEN
           SET_ITEM_PROPERTY('MN_EMP_BNFTS.CAR_NAME',     VISIBLE,     PROPERTY_TRUE);
           SET_ITEM_PROPERTY('MN_EMP_BNFTS.CAR_NAME',     ENABLED,     PROPERTY_TRUE);
           SET_ITEM_PROPERTY('MN_EMP_BNFTS.CAR_NAME',     INSERT_ALLOWED,     PROPERTY_TRUE);
           SET_ITEM_PROPERTY('MN_EMP_BNFTS.CAR_NAME',     UPDATE_ALLOWED,     PROPERTY_TRUE);
           
           SET_ITEM_PROPERTY('MN_EMP_BNFTS.CAR_NUMBER',     VISIBLE,     PROPERTY_TRUE);
           SET_ITEM_PROPERTY('MN_EMP_BNFTS.CAR_NUMBER',     ENABLED,     PROPERTY_TRUE);
              SET_ITEM_PROPERTY('MN_EMP_BNFTS.CAR_NUMBER',     INSERT_ALLOWED,     PROPERTY_TRUE);
           SET_ITEM_PROPERTY('MN_EMP_BNFTS.CAR_NUMBER',     UPDATE_ALLOWED,     PROPERTY_TRUE);
           
           SET_ITEM_PROPERTY('MN_EMP_BNFTS.CAR_MODEL',     VISIBLE,     PROPERTY_TRUE);
           SET_ITEM_PROPERTY('MN_EMP_BNFTS.CAR_MODEL',     ENABLED,     PROPERTY_TRUE);
           SET_ITEM_PROPERTY('MN_EMP_BNFTS.CAR_MODEL',     INSERT_ALLOWED,     PROPERTY_TRUE);
           SET_ITEM_PROPERTY('MN_EMP_BNFTS.CAR_MODEL',     UPDATE_ALLOWED,     PROPERTY_TRUE);
      /*ELSE
           SET_ITEM_INSTANCE_PROPERTY('MN_EMP_BNFTS.CAR_NAME',     VISIBLE,     PROPERTY_FALSE);
           SET_ITEM_INSTANCE_PROPERTY('MN_EMP_BNFTS.CAR_NUMBER',     VISIBLE,     PROPERTY_FALSE);
           SET_ITEM_INSTANCE_PROPERTY('MN_EMP_BNFTS.CAR_MODEL',     VISIBLE,     PROPERTY_FALSE);*/
      END IF;
      even i tried this ? but fails
           SET_ITEM_INSTANCE_PROPERTY('MN_EMP_BNFTS.CAR_NAME',     CURRENT_RECORD,VISIBLE,     PROPERTY_TRUE);
      anything wrong in my code? im using forms 10g

      anyone help me in this matter?

      Regards

      Moazam

      Edited by: Moazam Shareef on Mar 18, 2010 2:56 AM
        • 1. Re: Set_item_property
          Manu.
          Moazam,

          You can't hide an item for a single record only in a detailed block. Thats why we can't update the VISIBLE property through SET_ITEM_INSTANCE built-in. Instead you can change the UPDATE_ALLOWED, INSERT_ALLOWED To false, so that the user can't edit the data.


          Regards,

          Manu.


          If my response or the response of another was helpful or Correct, please mark it accordingly