AnsweredAssumed Answered

Create (Parent) Node If It Satisfies a Condition

Question asked by janarvin on Apr 12, 2017
Latest reply on May 23, 2017 by janarvin

I have a Flat File Profile to XML Profile scenario. We're automating interface inventory. For the target XML, we need to only filter/create the <interface> node if the "Status" from the flat file is "Active". Ignore/Do not create if status is "Inactive".

 

Can identifier instances and/or qualifier values be used for this? Or, is a custom script/function needed to enable this logic?

 

Structure below:

Flat File Source:

  • Record
    • Elements
      • SenderApplication
      • ReceiverApplication
      • ...
      • Status
      • ...

 

XML Target:

<InterfaceRecord>

   <interface>

         <Sender></Sender>

         <Receiver></Receiver>

         ...

   </interface>

   <interface>

         <Sender></Sender>

         <Receiver></Receiver>

         ...

   </interface>

</InterfaceRecord>

Outcomes