none
Logical Existence Functoid---Very Weird RRS feed

  • Question

  • Hi Guru's

    Am using Logical Existence Functoid in my map,its acting very wierd.I will explain my scenario here

    on 837D_NOn Medicare Map,am checking Subrciber value is exist or not (NM01),if its exist am using value mapping fuctoid to get the output but the value is exist and my logical existence is not returning as true,am always getting blank on my output.

    Anyone have any idea why its behave like this ? Thanks in Advance
    Thursday, October 1, 2009 3:05 PM

Answers

  • That's because the Logical Existence functoid is doing what you think it is.  The logical existence functoid tests for the existence of the node, NOT the value in the node.

    For example if you have <data/> in your message and you test this with the Logical Existence functoid you will get "true" because the node exists.  Try using the IsString functoid, or one of the other functoids that test for actual data or the absence of data.


    Jim -- Pro Mapping in BizTalk 2009, Apress Books, March 23, 2009
    • Proposed as answer by JimDawson Thursday, October 1, 2009 9:27 PM
    • Marked as answer by Andrew_ZhuModerator Thursday, October 8, 2009 3:01 AM
    Thursday, October 1, 2009 9:27 PM
  • Hi Jackie,

    Logical existence function return "true” if the input record or field exists in the source message, it doesn’t matter if it has value or not. It takes only one parameter.

    You can link the source filed to logical existence func and link its output as first input parameter to value mapping function and use source field as 2nd parameter to value mapping(source field  which you want to map), remember order is very important for value mapping. Here are the steps to do this

    1.Link the source field to Logical Existence func
    2. Link the output of the Logical Existence func(step 1) as first parameter to value mapping
    3. Link the source field (see if you need to trim it) as 2nd parameter to value mapping
    4. Map the output of value mapping to target field.

    I think this will help to understand and resolve this issue

    To test it you can also add a temp concatenate func on the map with the value 'Yes' and use this at step 3 and can easily verify the node at target with the value 'Yes' if the source node exists.

    Have a great weekend!

     


    i.ahmad Please mark this as an answer if it helps
    Friday, October 2, 2009 9:01 PM

All replies

  • Thursday, October 1, 2009 3:28 PM
  • That's because the Logical Existence functoid is doing what you think it is.  The logical existence functoid tests for the existence of the node, NOT the value in the node.

    For example if you have <data/> in your message and you test this with the Logical Existence functoid you will get "true" because the node exists.  Try using the IsString functoid, or one of the other functoids that test for actual data or the absence of data.


    Jim -- Pro Mapping in BizTalk 2009, Apress Books, March 23, 2009
    • Proposed as answer by JimDawson Thursday, October 1, 2009 9:27 PM
    • Marked as answer by Andrew_ZhuModerator Thursday, October 8, 2009 3:01 AM
    Thursday, October 1, 2009 9:27 PM
  • Jim,

    I tried with Logical String Functoid am still getting blank on my output.
    Friday, October 2, 2009 5:18 PM
  • Jackie,

    Make sure the links going in the the value mapping functoid are in the correct order.  The link from the logical functoid must be the first input, otherwise the value mapping functoid will always see false and will not output any value.


    Jim -- Pro Mapping in BizTalk 2009, Apress Books, March 23, 2009
    Friday, October 2, 2009 5:24 PM
  • Try testing if trimmed value = ""
    Friday, October 2, 2009 5:28 PM
  • Hi Jim and Kbiddick,

    I tried all possibility ways like

    1) trim the input value and use the logical string functoid and value mapping
    2) logical existence functoid with Value mapping
    3)IsNill functoid with value mapping
    4) equal and value mapping functoid,nothing helps me,so i wrote a script to work around that works,but my question is why logical functoids are not working what am expected.

    I see the similar kinda thread here,but still am not able to understand the solution given by Randal.

    Any help will be very great full

    Thanks

    Friday, October 2, 2009 6:56 PM
  • Hi Jackie,

    Logical existence function return "true” if the input record or field exists in the source message, it doesn’t matter if it has value or not. It takes only one parameter.

    You can link the source filed to logical existence func and link its output as first input parameter to value mapping function and use source field as 2nd parameter to value mapping(source field  which you want to map), remember order is very important for value mapping. Here are the steps to do this

    1.Link the source field to Logical Existence func
    2. Link the output of the Logical Existence func(step 1) as first parameter to value mapping
    3. Link the source field (see if you need to trim it) as 2nd parameter to value mapping
    4. Map the output of value mapping to target field.

    I think this will help to understand and resolve this issue

    To test it you can also add a temp concatenate func on the map with the value 'Yes' and use this at step 3 and can easily verify the node at target with the value 'Yes' if the source node exists.

    Have a great weekend!

     


    i.ahmad Please mark this as an answer if it helps
    Friday, October 2, 2009 9:01 PM