1 Reply Latest reply: Nov 13, 2013 2:26 PM by CraigB RSS

    Set visibility property for items depending on other items



      I want to set the visibility setting for an item that I have, the steps should be as the following,

      for example

      if I have an item that asked,

      do you have children ?

      if the answer is Yes,

      the next item should be visible which let's say, number of  them

      if no,

      the next item should be not visible


      I tried to set a trigger for the item I am controlling its visibility which is

      pre-text-item and wrote





        set_item_property(:SYSTEM.CURRENT_ITEM,visible,property_true) ;



        set_item_property(:SYSTEM.CURRENT_ITEM,visible,property_false) ;


        end if;



      but it doesn't seem to be right, ,,,



      thank you

        • 1. Re: Set visibility property for items depending on other items

          I can see two potential problems.  The first:




          Does CHEQUE_TABLE.CHEQUE_RECEIVED refer to a Data Block and Item?  If yes, then you are trying to tell Forms to look at the value of the string 'CHEQUE_TABLE.CHEQUE_RECEIVED' when you should be refering to the value of the Block.Item through direct reference, eg:





          How is the value of CHEQUE_RECIEVED set?  Does the user select the YES value from a List of Value (LOV) or from a Poplist or do they enter the value by typing it in?  If your code is looking at the string 'yes' and comparing it to the value of the Block Item which is in upper or mixed case, then 'yes' = 'Yes' or 'yes' = 'YES' will evaluate to FALSE instead of TRUE.


          It is always a good idea to use a Poplist or a List of Values when you are expecting specific values to be entered by the user; this enables you to force the value to be entered the same by everyone.  If the user CAN type the value in, then at least set the Case Restriction property to UPPER or LOWER so regardless of how the user enteres the value, it will be stored in the corrected case.