Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

mutliple if

Hi All,

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

1 Solution

Accepted Solutions
maxgro
MVP
MVP

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

View solution in original post

3 Replies
maxgro
MVP
MVP

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

robert_mika
Master III
Master III

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..

Anonymous
Not applicable
Author

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]