# Message mapping - IF Else simple query

Dear All Experts,

Below is my nodes structure that is defined.

Logic :

When NUMBER = 100 then get VALUE

ELSE NUMBER = 200 then get VALUE

(First should check NUMBER = 100 in all nodes (ITEMS), if not only NUMBER = 200 should be evaluated. NUMBER can have any value other than 100, 200 )

I tried with IF ELSE condition like below but Display Queue is producing "Null" values when there are "NUMBER" other than 100 or 200.

simple.PNG (2.0 kB)
simple 2.PNG (28.2 kB)
10|10000 characters needed characters exceeded

• May 27, 2015 at 10:04 AM

Hi Fernando,

your mapping is having context problem. For every false in if statement you need else value and that will not come in current logic.

if the target needs only value then try the below logic

[1]

Number --> map with default (blank) --> equals (100) -->> If without else (map the value in then)

[2]

Number --> map with default (blank) --> equals (200) -->> If without else (map the value in then)

input to if condition

[1] --> map with defailt (blank) --> equals (blank) --> Not

Then input

[1]

Else input

[2]

If the above logic is not clear then i can provide you the mapping screenshot.

regards,

Harish

10|10000 characters needed characters exceeded
• T Fdo Former Member

Hi Santi,

then the value should be blank..element should be created as "VALUE" but empty values.

thanks

• Former Member
May 27, 2015 at 09:34 AM

Hi Fernando,

Can you let us know the display queue screen shots of Number & Value fields, so that we can have clear understanding on where it is going wrong.

10|10000 characters needed characters exceeded
• Hi,

When Testing ;

• If I put 100 first , then result is success.since the IF ELSE condition is TRUE at first instance.
• If I put 200 first and then after that 100, then it is taking 200 as the result , which should be 100 since it is the priority in the logic

• If I put some other values (300, 400, 500) and the 100 , the result is "blank" node. Please refer below

simple 3.PNG (75.6 kB)
• Former Member
May 27, 2015 at 05:55 PM

Fernando,

check the below logic:

Reward points if the solution is found useful

Regards

Vishnu

Image.PNG (15.0 kB)
10|10000 characters needed characters exceeded
• Former Member
May 28, 2015 at 07:02 AM

Hi Fernando,

Do like below. then no need to put remove context and collapse context. It works for your requirement.

Regards,

Santhi

map.jpg (28.9 kB)
10|10000 characters needed characters exceeded
• Former Member Former Member

In the above mapping screen shot,

replace MaterialN with Number field

replace MaterialGr with Value field

Reward points if solution is found useful

Regards

Vishnu

• Former Member
May 28, 2015 at 09:20 AM

Hi Fernando,

Do like below.

Regards,

Santhi

map1.jpg (55.2 kB)