Skip to Content

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)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • 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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    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.

    Add comment
    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

      thanking all in advance

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

    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


    Image.PNG (15.0 kB)
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    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)
    Add comment
    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

      as per your requirement.

      Reward points if solution is found useful

      Regards

      Vishnu

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

    Hi Fernando,

    Do like below.

    Regards,

    Santhi


    map1.jpg (55.2 kB)
    Add comment
    10|10000 characters needed characters exceeded