cancel
Showing results for 
Search instead for 
Did you mean: 

Multilingual Validations

Former Member
0 Kudos

Hello,

My requirements is such,

depending in the logon language, i need to have certain validation on account groups and vendor number

for example,

if my logon langauge is Italian

then check account group = ABC vendor or DEF Vendor

and right(vendor number)>000000 and right(vendor number)<=999999 and has_all_chars(left(vendor number,4),'A,','Z')

or if account group = PQR Vendor or XYZ vendor

and right(vendor number)>0000000 and right(vendor number)<=9999999 and has_all_chars(left(vendor number,3),'A,','Z')

and if my logon language is english dont do anything

like this have four account group

ABC Vendor : vendor Number format shouid be XXXX000000

DEF Vendor : vendor Number format shouid be XXXX000000

PQR Vendor : vendor Number format shouid be XXX0000000

XYZ Vendor : vendor Number format shouid be XXX0000000

where X = Alphabets 0 = Number

Sincerely waiting for replies

Thank you in advance

Abhishek Biwal

Edited by: Abhishek Biwal on Feb 22, 2011 11:52 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Abhishek,

Please try the below expression, It should work fine..


IF(LANGUAGE = Italian[IT]  THEN
  IF( Account Group = ABC Vendor OR Account Group = DEF Vendor, 
    LEN(Vendor Number)=10 AND HAS_ALL_CHARS(LEFT(Vendor number,4),"A","z") AND                     
    HAS_ALL_CHARS(RIGHT(Vendor Number,6)="0","9"),
       IF( Account Group = PQR Vendor OR Account Group = XYZ Vendor,
         LEN(Vendor Number)=10 AND HAS_ALL_CHARS(LEFT(Vendor number,3),"A","z") AND 
         HAS_ALL_CHARS(RIGHT(Vendor Number,7)="0","9") ))
           ELSE 
             TRUE )

I am assuming here, ABC Vendor, DEF Vendor, PQR Vendor and XYZ Vendor, you are selecting from the drop-down Lookups tab, If you are not selecting it from lookups tab Account Group then, you need to write these values within double quotes like "ABC Vendor"

Regards,

Mandeep Saini

Former Member
0 Kudos

Thank You Mandeep for your response.

I tried your given validation expression, but gives error no matter what entry i make in the vendor number field

for example, my valid entries are XXX0000000(PQR Vendor and XZY vendor) and XXXX000000(ABC vendor and DEF Vendor),

so if i make an entry as MDM0000001 for (PQR or XZY) it gives an error and if i make an entry MDMM000001 for (ABD or DEF),

it still gives me an error.

What i tried is,

if (langauge = Italian [IT] then

if (

(Account Group = ABC Vendor or Acount Group = DEF Vendor) and right(Vendor Number,6)>000000 and right(vendor Number,6)<=999999, True , False)

or

if (

(Account Group = PQR Vendor or Account Group = DEF Vendor) and right(Vendor Number,7)>0000000 and right(vendor Number,7)<=9999999, True , False)

else then Language = English [US] then

langauge specific expression

else

otherwise expression

))

in the above expressin if i include for alphabet check it gives error no matter what entry make even for valid entries so i removed the alphabet expression.

Now my Problem is this, this gives an error for MDMMM00001 for(ABC and DEF) but not for MD00000001(vendor number)

like wise for PQR and XYZ (MDMM000001( error) and MM00000001(no error))

hope you understood my problem.

waiting for your reply

Former Member
0 Kudos

Hello Mandeep

Few updates,

I tried with two validation for the different Account Group like one validation for ABC and DEF

and another validation for PQR and XYZ,

individually they work fine but if one satisfies the other fails

like if i make an enter for ABC or DEF (MMMM000001) if passes for ABC and DEF but Fails for PQR and XYZ

Hope this helps

Former Member
0 Kudos

Hi Abhishek,

individually they work fine but if one satisfies the other fails

I would suggest then you should go with two Validations in this case as individually works fine. Once you have created two validations which works fine as desired then in Validations tab, right click in Validations Pane>Edit Validation Groups..>A pop-up window will come (Edit Validation Groups), here right click on Validation Groups-->Add Child as Multilingual validations.

Now please add for both these validations created individually Property Group as Selected Groups: as Multilingual validations from Available Groups:

Now to run these both validations together->right click on record>validations>Execute Group-->Multilingual validations.

So it will run both these validations together-->once you run, you will get two more columns for each of this Validation name either with tick(pass) or cross(wrong). So if any these passes it means it works fine (I mean OR condition). When both of these validations fail only then consider that these validation group is not meeting your validation criteria for Log-in Italian language.

Kindly let me know if Validation Group also does not give you desired results.

Regards,

Mandeep Saini

Former Member
0 Kudos

hello Mandeep,

Thank you for your response.

Now i have created 4 validations for each account group,

with validation expressions as

if(Language = Italian

then

If(Account Group = ABC Vendor and left(Vendor Number,4)="ABCC" and mid(vendor number,5,6)<=999999, true, false)

else Language = English

Other language expression

Else

Other expression

))

Each account group is now associated with a prefix

for Ex, ABC Vendor = ABCC000000

DEF Vendor = DEFF000000

PQR Vendor = PQR0000000

XYZ Vendor = XYZ0000000

I hope this works,

Waiting for your Input

thanks and regards

Abhishek Biwal

Former Member
0 Kudos

Hi Abhishek,

I just want to say it if your purpose solves using two validations rather than four then there is as such no need to run 4 validations altogether as suggested above using Validation Group. All matters that you should make sure that your individual validations(2 OR 4) should work fine. I mean when you execute Validation Group, it will run these 4 validations and you will get 4 columns with either tick(pass) or wrong(fail). Here logic says if all the 4 validations fails only then you should consider your validation is not meeting criteria. If any of these passes it Pass.

I would definitely prefer creating 4 validations and assign then into same Validation Group if my purpose using 2 validations does not work. Since even using 2 separate individual validations if I am getting desired result then i will definitely go with 2.

Regards,

Mandeep Saini

Former Member
0 Kudos

Thank you mandeep for your prompt response.

The requirement changed and i had to adapt the necessary changes, so instead of 2 i had to develope 4 validations each with its error messsage.

Bcoz for ABC Vendor, Vendor Number should be of format ABCC000000

and for DEF Vendor, Vendor Number should be of format DEFF000000

and for PQR Vendor, Vendor Number should be of format PQR0000000

and for XYZ Vendor, Vendor Number shouid be of Format XYZ0000000

so 4 validations.

and i have assigned then in a group. Multilingual Validations.

For this i used Language Function and Left and Mid functions,

dont know why but left and right fucntions dont work together in single validation.

Thank you for you inputs.

Regards,

Abhishek

Answers (0)