9 Replies Latest reply: Sep 5, 2011 6:05 AM by Joseph Simmons RSS

    How to select all values from a field

    Sushil Kumar

      Hi All,

       

      i have a field DT_TYPE in which the following data is given

       

      NDF

      NDF-absolute

      NDF-Test

      NDF-Origin

      NDR

       

       

      in my dashboard i want to provide following option  under DT_TYPE

       

      NDF

      NDR

      NDF & NDR

       

      such that when NDF is selected only defect type related to NDF is shown and when NDR is selected only NDR related data is shown and when NDF & NDR is selected then all type of NDF and NDR should shown....

       

       

      Please help me out to solve this problem

       

      Thanks

       

      Sushil kumar

        • How to select all values from a field
          Sushil Kumar

          ANYONE PLEASE SHARE YOUR EXPERIENCE

          • How to select all values from a field
            Goran Korsgren

            Hi Sushil

             

            In the load script where you load your original DT_TYPE,

            create another one with just the NDF and NDR-values

             

            Load

            ...

            if(DT_TYPE='NDF' or DT_TYPE='NDR',DT_TYPE, null()) As DT_TYPE2

            ...

             

             

            In your GUI

            add a list box for DT_TYPE2

             

            If the users select NDF or NDR from that list box they will see only defect type related to NDF resp NDR,

            if they select both they will see defect types related to both NDF and NDR.

             

            /gg

              • Re: How to select all values from a field

                GG,

                 

                you'll need to adjust that code a little as currently it would only pick up 2 of the 5 from the DT_TYPE field and I think Sushil is wanitng the test,Original, Absolute to be part of the NDF selection.

                 

                Load

                ...

                if(Left(DT_TYPE,3)='NDF' or Left(DT_TYPE,3)='NDR',Left(DT_TYPE,3), null()) As DT_TYPE2

                ...

                 

                that should work for you now Sushil if I am understanding what you are after correctly

                 

                thanks

                 

                Joe

                 

                edit: you don't actually need the left for the NDR one as that is the only one with that name but it's good to have in there incase you expand that to have test original etc in the future

                 

                double edit: actually if those are your only names in the field

                Left(DT_TYPE,3) As DT_TYPE2

                would give you the extact same result and cut down the code

                • How to select all values from a field
                  Sushil Kumar

                  Hi GandalfGray,

                   

                  Thanks for your reply..

                   

                  according to your suggestion DT_TYPE2 will take only NDF , NDR what about NDF-absolute, NDF-Test.....

                   

                  DT_TYPE2 should contain only three values NDF, NDR and NDF&NDR when user select NDF then data should be related to NDF and if it is NDR then data should be related to NDR only... and if User select NDF and NDR then data should be related to all type of NDF (i.e NDF+NDF-absolute+NDF-Test.....+NDR) and NDR

                   

                   

                  Thanks