cancel
Showing results for 
Search instead for 
Did you mean: 

Validation Issue

Former Member
0 Kudos

Hello experts,

I am trying to create a validation that says If Industry Code=F, FC, etcu2026 THEN the price list should be ZB, otherwise (should any other Industry Code be selected) it should be ZA.

Iu2019ve created some that work for the ZB, but canu2019t get it to work say when Industry u2018Ku2019 chosen and u2018ZAu2019 is not.

Here is my current validation:

IF (Industry.Code ="F" OR "FC" OR "FD" OR "FI" OR "Z" OR "8", IF (Sales Data.Price List.Code = "ZB",TRUE,FALSE), Sales Data.Price List.Code=ZA)

Not sure if u2018NOTu2019 or another IF THEN ELSE statement needs to be added?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Everyone,

Unfortunatley, none of these worked

Jitesh- your validation worked with 'ZB', but I didn't get my error message if the 'FI', 'FC', 'FD', etc weren't used. Also, when I used ZA, I got no error message when I used the codes that were supposed to work with ZB

Harendra- the second part of your validation did not work (when using 'K' as the industry)

Dola- I got a SYNTAX error when trying to use yours.

Here is some additional info that may help:

-Price List Type draws off of a qualified table: Sales Data

-Industry is in the main table

-I cannot use a validation that specifies each price list type to use with ZA, because our client may want to add more along the way. We need something that will say 'if not FI, FC, FD, etc, than use ZA. So basically any other combination besides the above should return with ZA.

Thanks for trying to help!

Former Member
0 Kudos

Hi Nichole,

Try this....

IF (Industry.Code = "F" OR Industry.Code = "FC" OR Industry.Code = "FD" OR Industry.Code = "FI" OR Industry.Code ="Z" OR Industry.Code = "8", Sales Data.Price List.Code = "ZB",IF (Industry.Code not equal to "F" OR Industry.Code not equal to "FC" OR Industry.Code not equal to "FD" OR Industry.Code not equal to "FI" OR Industry.Code not equal to "Z" OR Industry.Code not equal to "8", Sales Data.Price List.Code="ZA" ))

Please write the operator everywhere for not equal to which Checks that two fields or values are not equal

Actuall not equal to operator syntax is not showing in thread because it is use here for display Text as Code

It should work....

Thanks,

Mandeep Saini

Edited by: Mandeep Saini on Aug 28, 2008 3:42 PM

Former Member
0 Kudos

PERFECT! Thanks Mandeep!!!

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Nichole,

I know that your problem has been resolved. Still want to give some update

Sorry to say that-I have done a typographical mistake last time.Actually The validation I have created

is following

IF (Industry.Code ="F" OR Industry.Code ="FC" OR Industry.Code ="FD" OR Industry.Code ="FI" OR Industry.Code ="Z" OR Industry.Code ="8",Sales Data.Price List.Code = "ZB",FALSE) OR IF(Industry.Code ="K", Sales Data.Price List.Code = "ZA", FALSE)

It is working for my case.

Thanks

Dola

Former Member
0 Kudos

Hi Nichole,

Whatever Jitesh and Narendra have been given is ok .You can use those as well as you can use the following validation

IF (Industry.Code ="F" OR "FC" OR "FD" OR "FI" OR "Z" OR "8",Sales Data.Price List.Code = "ZB",FALSE) OR IF(Industry.Code ="K", Sales Data.Price List.Code = "ZA", FALSE)

Try once and update us.

Thanks

Dola

Former Member
0 Kudos

Hi Nichole,

Try with below validation:

IF (Industry.Code ="F" OR "FC" OR "FD" OR "FI" OR "Z" OR "8", IF(Sales Data.Price List.Code = "ZB",

TRUE,FALSE), IF(Industry.Code ="K", Sales Data.Price List.Code = "ZA", FALSE)).

You can use this expression too.

IF(Has_Any_Values(Industry.Code,"F","FC","FD","FI","Z","8"),IF(Sales Data.Price List.Code = "ZB",

TRUE,FALSE), IF(Has_Any_Values(Industry.Code,"K"),IF(Sales Data.Price List.Code = "ZA",

TRUE,FALSE),FALSE))

Thanks

Narendra

Edited by: Narendra Mullapudi on Aug 28, 2008 12:07 PM

Former Member
0 Kudos

Hi Nichole,

IF (Industry.Code ="F" OR "FC" OR "FD" OR "FI" OR "Z" OR "8", Sales Data.Price List.Code = "ZB", Sales Data.Price List.Code=ZA)

Explanation:

If Industry Code is any one from the list then Sales Data Price List Code should be ZB else Sales Data Price List Code should be ZA. Validation itself return True or False value depending on the condition.

Just try the above expression and kindly update us.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hello Nichole,

Just give it a try....

IF (Industry.Code ="F" OR "FC" OR "FD" OR "FI" OR "Z" OR "8", IF (Sales Data.Price List.Code = "ZB",TRUE,FALSE), IF(Sales Data.Price List.Code="ZA",TRUE,FALSE))

Not tried my own but might be solve your problem.

TNR,

Saurabh...

Former Member
0 Kudos

Unfortunatley this did not work for me. Thanks anyways!