Forum Discussion

gpiero's avatar
gpiero
Skilled Sharer
9 years ago
Solved

Operators AND - OR in Nested IF

I am struggling with a silly formula but I am not able to find the proper solution. I know it should be easy .....   CS_Universe = IF ( ZV[OrgCom] = "CUSTORG" && ZV[IDCust] = "491" ...
  • gpiero's avatar
    gpiero
    9 years ago

    Framet

    Many thanks for your advices.

    I tried to split in 4 different columns. Doing  that I realized that 1st IF should have a differente logic:

     

    IF (
        ZV[OrgCom] = "CUSTORG"
            && ZV[IDCust] = "491"
            && ( ZV[IDDel] = "SPD99"
            || ZV[IDDel] = "WAR99"
            || ZV[IDDel] = "DPD99"
            || ZV[IDDel] = "FOC99"
            || ZV[IDDel] = "KBD99" )
            && (ZV[CounFinGood] <> "MX"   
            && ZV[CounFinGood] <> "RU"
            && ZV[CounFinGood] <> "AR"
            && ZV[CounFinGood] <> "CN");
    
        "1CS";

     

     

    Now I have changed the orginal long formula and  it is ok.

     

    Thanks again.