4 Replies Latest reply: Mar 22, 2016 7:03 AM by Sunny Talwar RSS

    conditionally hide and how text object?

    payal pg

      Hello Qlikview community,

      i have a requirement like a list box which is having following fields

      USA

      India

      UK

      Australia

      Canada

       

       

       

       

       

       

      and i have a text objects like country details,country population,USA population,India occupation .if i make a selection in list box above according to that selection only related text object should appear and rest should gone.for instance if i select USA only  country details,country population,USA population these objects should appear and rest should gone.please help me out with this.

       

      Thanks in advance

        • Re: conditionally hide and how text object?
          Sunny Talwar

          You can do something like this for hide/show condition on the layout tab of USA only text box objects

           

          SubStringCount(Concat(DISTINCT Country, '|'), 'USA') = 1

           

          and replace USA with each of the Country name for their text boxes

            • Re: conditionally hide and how text object?
              payal pg

              Hi Sunny,

              Thanks for replying back.it is not hiding it still displaying text object in other selections as well.

               

               

              Thanks

                • Re: conditionally hide and how text object?
                  Sunny Talwar

                  Try out the attached application. Based on your selection it will show up or go away. Have tried to do it two different ways, see if either of them is helpful.

                   

                  Capture.PNG

                   

                  Capture.PNG

                   

                  1st set of text boxes use these expressions

                  SubStringCount(Concat(DISTINCT Country, '|'), 'Australia') = 1

                  SubStringCount(Concat(DISTINCT Country, '|'), 'Canada') = 1

                  SubStringCount(Concat(DISTINCT Country, '|'), 'India') = 1

                  SubStringCount(Concat(DISTINCT Country, '|'), 'UK') = 1

                  SubStringCount(Concat(DISTINCT Country, '|'), 'USA') = 1

                   

                  2nd set of text boxes use these expressions

                  GetSelectedCount(Country) > 0 and SubStringCount(Concat(DISTINCT Country, '|'), 'Australia') = 1

                  GetSelectedCount(Country) > 0 and SubStringCount(Concat(DISTINCT Country, '|'), 'Canada') = 1

                  GetSelectedCount(Country) > 0 and SubStringCount(Concat(DISTINCT Country, '|'), 'India') = 1

                  GetSelectedCount(Country) > 0 and SubStringCount(Concat(DISTINCT Country, '|'), 'UK') = 1

                  GetSelectedCount(Country) > 0 and SubStringCount(Concat(DISTINCT Country, '|'), 'USA') = 1

                   

                  The difference between them is the fact that set 1 is available without selection, while 2nd set of text boxes only show up based on a selection in Country list box.

              • Re: conditionally hide and how text object?
                Mayuresh Athalye

                Please check which option works for you.

                Option 1:

                 

                1.PNG

                2.PNG

                 

                then set conditional show property for Text Object of USA, India as =GetFieldSelections(Country)='USA' and 'India' respectively. For first two, no need to set any conditional show property, as you want to show both of them for all conditions.

                 

                Option 2:

                Use only three text object country details, country population and country occupation.

                change the expression in third text object as =GetFieldSelections(Country)&' occupation'.

                You will get Text object title as per the selection of List box.

                Output like this,

                1.PNG