cancel
Showing results for 
Search instead for 
Did you mean: 

Comparing 3 values at a time

Former Member
0 Kudos

Hi,

Is it possible to compare 3 values at a shot and map accordingly.

say if there are A1,A2 and A3 - can we compare all the three and assign a respective value to target field?

i.e, if A1 then 10, if A2 then 20 and if A3 then send blank.

I am able to compare only 2 values using if-else condition.

Please provide the inputs for the same.

Regards,

Rajkamal

Accepted Solutions (1)

Accepted Solutions (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

yes you can compare using graphical functions and udf too..

graphical function use AND Functions

A1---------------
                          BOOLEAN EUQLS------------- 
CONSTANT[10]--                                                                                
AND FUNCTION-
A1---------------
                          BOOLEAN EUQLS------------- 
CONSTANT[20]--                                                                                
ANDFUNCTION              ------->Target
                                                                                A1---------------
                          BOOLEAN EUQLS------------- 
CONSTANT[value]--

or use udf

pass three arguments as inout

If(A==10&&A2==20&&A3==30)

RETUNRN expected result.

Regards.

Raj

some ssmal chnages rwquired,i have not tersted this

former_member200962
Active Contributor
0 Kudos

It should not be the Boolean Equals function....it should be equalS function.

i.e, if A1 then 10, if A2 then 20 and if A3 then send blank.

Use a UDF which will have a logic like

if (Source = A1)

{return 10;}

else-if (Source = A2)

{return 20;}

else-if (Source = A3)

{return "";}

Answers (2)

Answers (2)

Former Member
0 Kudos

> say if there are A1,A2 and A3 - can we compare all the three and assign a respective value to target field?

>

> i.e, if A1 then 10, if A2 then 20 and if A3 then send blank.

If am not wrong then this can be solved without any UDF just by using the "FixValues" std function (you can find it under Conversions ).

You can set your values as per your need and just do the mapping..

e.g.

Key    Value
A1 --- 10
A2 --- 20
A3 --- []

Former Member
0 Kudos

Hi,

You can use fix value function,Here you can also mention the default value you need.

IF-- FIX VALUES(if A3=true)--equal to true(use constant) then send blank value.

Hope this helps

Regards,

Sainath

Former Member
0 Kudos

> IF-- FIX VALUES(if A3=true)--equal to true(use constant) then send blank value.

No need to use any other function like IF, then, equals ... simply map the source to FixValue table that's it..