LogicAppsUX icon indicating copy to clipboard operation
LogicAppsUX copied to clipboard

Conditional Mapping in array doesn't filter node currectly

Open davephelps opened this issue 1 year ago • 10 comments
trafficstars

Describe the Bug with repro steps

I have a structure on the input where RFFLoop1 repeats:

<ns0:RFFLoop1>
    <ns0:RFF>
      <ns0:C506>
        <C50601>ADJ</C50601>
        <C50602>RMLGB</C50602>
      </ns0:C506>
    </ns0:RFF>
  </ns0:RFFLoop1>
  <ns0:RFFLoop1>
    <ns0:RFF>
      <ns0:C506>
        <C50601>CN</C50601>
        <C50602>0463903000</C50602>
      </ns0:C506>
    </ns0:RFF>
  </ns0:RFFLoop1>

I want to map the C50602 value but only if the C50601 value equals “CN”. So, I created this map:

image

The condition is written to the yaml and xslt as an “if”, but then proceeds to copy (and concatenate) all nodes regardless of the condition, as you can see from the yaml:

mstns:root:

mstns:header:

$if(is-equal(/ns0:EFACT_D01A_IFTMIN/ns0:RFFLoop1/ns0:RFF/ns0:C506/C50601, "CN")):

mstns:accountnumber: /ns0:EFACT_D01A_IFTMIN/ns0:RFFLoop1/ns0:RFF/ns0:C506/C50602

and the XSLT:

{/ns0:EFACT_D01A_IFTMIN/ns0:RFFLoop1/ns0:RFF/ns0:C506/C50602}

There will only be one RFFLoop1 where the C50601 equals “CN”, so I would expect just the one matching value to appear. Am I doing something wrong or is this a bug? It will be a very common requirement to only copy one value if another value is true.

The existing Logic Apps mapper in the integration account would map this as:

image

This generates the following output, as expected.

0463903000

Screenshots or Videos

No response

Version

2.75

Additional context

No response

AB#25998438

davephelps avatar Nov 29 '23 20:11 davephelps

image Proposed solution would look similar to this- need to make some serialization changes on the frontend to account for this

DanielleCogs avatar Dec 28 '23 18:12 DanielleCogs

❌ There was a problem linking to Azure Boards work item(s):

  • 25998438

Please check the IDs and try again using the AB# syntax. Learn more

azure-boards[bot] avatar Feb 06 '24 16:02 azure-boards[bot]

❌ There was a problem linking to Azure Boards work item(s):

  • 25998438

Please check the IDs and try again using the AB# syntax. Learn more

azure-boards[bot] avatar Feb 06 '24 16:02 azure-boards[bot]

❌ There was a problem linking to Azure Boards work item(s):

  • 25998438

Please check the IDs and try again using the AB# syntax. Learn more

azure-boards[bot] avatar Feb 06 '24 16:02 azure-boards[bot]

❌ There was a problem linking to Azure Boards work item(s):

  • 25998438

Please check the IDs and try again using the AB# syntax. Learn more

azure-boards[bot] avatar Feb 06 '24 16:02 azure-boards[bot]

❌ There was a problem linking to Azure Boards work item(s):

  • 25998438

Please check the IDs and try again using the AB# syntax. Learn more

azure-boards[bot] avatar Feb 06 '24 16:02 azure-boards[bot]

❌ There was a problem linking to Azure Boards work item(s):

  • 25998438

Please check the IDs and try again using the AB# syntax. Learn more

azure-boards[bot] avatar Feb 06 '24 16:02 azure-boards[bot]

❌ There was a problem linking to Azure Boards work item(s):

  • 25998438

Please check the IDs and try again using the AB# syntax. Learn more

azure-boards[bot] avatar Feb 06 '24 17:02 azure-boards[bot]

❌ There was a problem linking to Azure Boards work item(s):

  • 25998438

Please check the IDs and try again using the AB# syntax. Learn more

azure-boards[bot] avatar Feb 06 '24 17:02 azure-boards[bot]

❌ There was a problem linking to Azure Boards work item(s):

  • 25998438

Please check the IDs and try again using the AB# syntax. Learn more

azure-boards[bot] avatar Feb 06 '24 19:02 azure-boards[bot]