cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Message mapping - IF Else simple query

tharu
Contributor
0 Likes
4,790

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.

View Entire Topic
Harish
Active Contributor
0 Likes

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

tharu
Contributor
0 Likes

Hi Harish,

mapping screenshot is highly appreciated for better understanding...plz..

thanks

Former Member
0 Likes

Hi Fernando,

do like below.  add  sort function from node functions between removecontext and collapse context functions.

Regards,

Santhi

tharu
Contributor
0 Likes

Hi Santi,

Thanks for the answer. Its working fine.

but only concern is that "NUMBER" should have vlaue 100 or 200 in your case. If there is no satisfying value (100 or 200) for the condition, mapping execution is unsuccessful. Giving an error.

Former Member
0 Likes

Hi Fernando,

What should be the result if the NUMBER doesn't contain either 100 or 200?

ex:  NUMBER  is 300, 400, 500 what should be the value filled up with?

Regards,

Santhi

pvishnuvardan_reddy
Active Contributor
0 Likes

Fernando,

check the below logic:

Instead of MaterialN - use Number according to your structure

Instead of MaterialGr - use Value according to your structure

Hope it matches your requirement.

Reward points if the solution is found useful

Regards

Vishnu

Harish
Active Contributor
0 Likes

Hi Fernando,

Please find the mapping snapshot. Please replace Name with Number and Sal with value.

tharu
Contributor
0 Likes

Hi Santi,

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

thanks