3 Replies Latest reply: Sep 22, 2015 4:40 PM by Rudolf Linder RSS

    mutliple if

    sneha jha

      Hi All,

       

      I am trying to work in QV scripting by applying multiple If Conditions.

        • Re: How to work with multiple if statements
          Massimo Grossi

          first, start simple with 2 or 3 conditions and if works add some other conditions

          second I don't think you need "and if" but something like that with, at the end, a number of ) as the number of conditions

           

          if(condition1, value1,

          if(condition2, value2,

          if(condition3, value3,

          value4

          ))) as field,


          if you post the doc we can better check the syntax

          • Re: How to work with multiple if statements
            Robert Mika

            I am trying to work in QV scripting by applying multiple If Conditions.

            But my brackets are not working properly

            Really? Where?:)

             

            How long did it take to write this statement?

            Congratulation for the effort anyway...

            As Massimo suggested you something else than IF..

            • Re: How to work with multiple if statements
              Rudolf Linder

              amazing, how do you want to control that Statement?

              as I noticed there are a lot of duplicates

              just one idea:

              why not provide an inline table with all combinations
              I donot know your datamodel, so how to connect to toher tables?

              TEST:

              load * Inline [

              [WS_Category], [Claim_Activity], [Claim Process],  [RequestType], OUTPUT

              Russia, Scrap,,, [QV_Cash_Out]+[Replacement Costs]

              Turkey,,,,,,[QV_Cash_Out]

              Sermicro,,,,QV_Cash_Out]+ 350,

              RTS,,TCA,CC,,[Tariff to be paid to claimer(EUR)]+[Replacement Costs]