Skip to content
+1-888-319-3663

COMMUNITY FORUM

SmartConnect – getting two fields into one node for XML

Lewis asked 4 years ago
 
 
 
I have a question about using one “node”, to track two fields.  I have a “Supplier identifiers” should be two nodes not one.  I have setup below “Supplier identifiers1” & “Supplier identifiers2”…  These would map to Dynamics GP “VENDORID” & “TAXSCHID” fields..  which will not work with the third party application requirements…  Smart Connect does not allow duplicate node names.  is there a way to create an alias name?
 
  
  1.1.1.1 Supplier identifiers
 




Name


Description


Validation






key


The key PartyId is used for supplier recognition for invoice import.


PartyId




value


The value will be the tax registration number – TAXSCHID


 




 
 
 




Name


Description


Validation






key


The key COMPANY_IDENTIFIER is used for supplier recognition for invoice import.


 COMPANY_IDENTIFIER




value


The value will be the Supplier’s business ID/Code. Unique identifier. – VENDORID


 




 
 
 
 
 
Below is a diagram of how I visualize this to be able to work “Supplier identifiers1” & “Supplier identifiers2”, but this is not what the third party application requires.  They require this to be one field and SmartConnect will not allow me to create a node with the same name..  (no duplicates).. So I had to change the name adding 1&2…
 
 
 

 
 
 

 
 
How could I go about getting this to work in SmartConnect?
 
 
Thank you
 
 Lewis
 
Chad Bruels replied 3 years ago

I wish this had an answer as I find myself creating a map with an XML file destination which is for the same software vendor as the recipient of the file. The requirements are such that there are two sections of the XML which have a key/value paradigm. You can view sample xml here : https://www.screencast.com/t/qLSeLLhh . Take note of the lower half of the image first. See how the section SupplierAddressPart repeats with a key/value paradigm in order to represent each portion of an Address? I solved this by included a CROSS APPLY in my T-SQL source query. However, now I need another repeating key/value section for SupplierIdentifier. If I add another CROSS APPLY for this then I double the number of rows returned in the source and either the SupplierIdentifier section gets repeated for the number of rows associated to the Address Cross Apply, or if you change the order of these in the query, the SupplierAddressPart section gets repeated for the number of rows associated to the Supplier Cross Apply. Here you can see an example of what I mean by the SupplierAddressPart section repeating : https://www.screencast.com/t/YBP6lqxBj1 . I’ve attempted to turn on Group by in the mapping window and I have mapped by Vendor ID, SupplierIdentifierKey, AddressPartKey. I’ve also tried grouping Vendor ID with each of those keys individually – neither of these three attempts have worked.


If you would like to submit an answer or comment, please sign in to the eOne portal.