Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple if statement, exluding previous if

Hello

I have a problem using a multiple if statement.

I need to do something like this

if (cond A and cond B and cond C, result 1,

     if (cond B and cond C and NOT result 1, result 2,

          if ( cond C and NOT result 1 and NOT result 2, result 3)

     )

)

can't figure how to do this

Thank you for your help

Regards

Adin

7 Replies
sunny_talwar

Not sure what the conditions are, but may be this:

If(Cond A and Cond B, 1,

     If(Cond B and Cond C, 2

          If(Cond C, 3)

     )

)

Not applicable
Author

i shouldn't use a b and c

if (cond A and cond B and cond C, result 1,

     if (cond D and cond E and NOT result 1, result 2,

          if ( cond F and cond G and NOT result 1 and NOT result 2, result 3,

               if( NOT result 2 and NOT result 3 and cond A, result 4

              )

          )

     )

)


What i would like to do is to use a resulat as statement in my other IF statement

maxgro
MVP
MVP

I think  Sunny is right because at the 2nd if you're already excluding result1

so the NOT result 1 (NOT (cond A and cond B and cond C)) is implicit

The same for the 3rd if

 

if (cond A and cond B and cond C, result 1,

     if (cond B and cond C and NOT result 1, result 2,

          if ( cond C and NOT result 1 and NOT result 2, result 3)

     )

)

sunny_talwar

Can you may be share some data with your expected output?

Not applicable
Author

I don't have data right now but i can explain my issue

I have multiple if statement.

If an article match some condition then the article's status available, available soon, available online or not available at all.

An article can have only one status.

So i do something like this :

if(conditions,'Available',

     if(conditions,'Available soon',

          if(conditions,'available online',

               if(conditions,'not available at all'

               )

          )

     )

)

What i would like to do is

if(conditions,'Available',

     if(conditions and not(Available),'Available soon',

          if(conditions and not(Available) and not(Available soon),'available online',

               if(conditions and not(Available) and not(Available soon) and not(available online),'not available at all'

               )

          )

     )

)

Not applicable
Author

that's what i thougt

but i have some article with 2 status, which is impossible

when i check manually, it's ok.

So the problem come from the script

maxgro
MVP
MVP

I think you have to explain your issue with some data, a text file, an excel, something to try.