cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Validation In mdm ..is it possible!!

former_member283645
Participant
0 Kudos

Hi Experts,

i have a situation where i need to write a VALIDATION..

there are 2 fields

f1 - > text field

f2 - > Look up field

if f1 is blank then no error message

or

if f1 = 2 and f2 = 3 then error

or

if f1 = 4 and f2= 2 then error

or

if f1 = 2 and f2 = 5 then no error

Will it be possioble to write all these in a single validation??

i tried with nested IF THEN ELSE But i think i am going wrong with syntax or some logic missing!!!

Did anyone face similar situation, if yes can you please paste the MDM editor logic, because i think i am going wrong with the syntax!!!

Please Help!!

Kind Regards

Eva

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Eva

Little secret

Validation and assignment use the same logic but in assignment you can see calculation result of your expession - it wil be store to assigned field

For your expression:

if f1 is blank then no error message

or

if f1 = 2 and f2 = 3 then error

or

if f1 = 4 and f2= 2 then error

or

if f1 = 2 and f2 = 5 then no error

Solution :

IF (f1 = 2 AND f2 = 3) OR (f1 = 4 AND f2= 2), ERROR)

We catch just only ERROR events because another events is correct

Regards

Kanstantsin Chernichenka

former_member283645
Participant
0 Kudos

Hi Kanstantsin,

Thanks for the reply.

after seeing your solution i came back to square 1.

Well my fields are,

Cost center type : Look up field

Look up values:

warehouse

admin

service center

collation centre

New cost center : text field

Now, My condition should be..

when new cost center = Warehouse

and Cost center type = admin then error

OR

when new cost center = admin

and Cost center type = warehouse then error

Now My Validtion editor has :

selected IF THEN

IF(NEW COST CENTER = 'Warehouse' AND COST CENTER TYPE.COST CENTER TYPE = COST CENTER TYPE [admin] OR (NEW COST CENTER = 'admin' AND COST CENTER TYPE.COST CENTER TYPE = COST CENTER TYPE [Warehouse]), FALSE)

Once i write this and save it says 'missing operand or parameter'

Did i miss some thing or did i select the wrong field levels in ''fields'' and ''lookup slection''??

Please help

Kind Regards

Eva

Former Member
0 Kudos

Hello Eva

Check your brackets

you have two different conditions

(NEW COST CENTER = 'Warehouse' AND COST CENTER TYPE.COST CENTER TYPE = COST CENTER TYPE admin)

and another one

(NEW COST CENTER = 'admin' AND COST CENTER TYPE.COST CENTER TYPE = COST CENTER TYPE Warehouse)

and "OR" operator between it's

You can split your expression to simple pieces

Try to run your validation with first part of logical expression and then enlarge your expression by add another one part etc.

In that case you will go step by step to your target

Regards

Kanstantsin Chernichenka

former_member283645
Participant
0 Kudos

that solved my problem Kanstantsin.

Thanks for making my eyes open wider..

Answers (0)