AnsweredAssumed Answered

DataProcess "Split" functionality alternate

Question asked by fpardeep455682 on May 3, 2016
Latest reply on May 3, 2016 by fpardeep455682

I am trying to split the source XML data using "<Entity>"  as a split element (using Data Process split functionality). However, "Entity" element also exist under "State" element (Please see the source data below) , and because of that "Data Process" step is returning project element Only, and ignoring the rest of the elements after project element.

 

Solutions I tried - Created another intermediate profile and try to convert source XML date into another XML format (having different element name), but did not work.

Source application: Clarizen.

Target application: NetSuite

 

 

I would appreciate if anyone please share the alternate to accomplish this.

I am planning to replace "<Entity>" element tag using JavaScript, I am not sure if this will work, but please share the script if any have that available.

 

Here is the output after split.  "State, SYSID, Customer etc. are missing after split. I am able to see 2 separate document but both are having project element only, both are missing rest of the elements:

<ns1:ExecuteResponse xmlns:ns1="http://clarizen.com/api">

   <ns1:ExecuteResult>

      <ns1:Result xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance" ns2:type="QueryResult">

         <ns1:Success>true</ns1:Success>

         <ns1:Entities>

            <ns1:Entity>

               <ns1:Id>

                  <ns1:TypeName>Project</ns1:TypeName>

                  <ns1:Value>a0bd81ba-ca62-4823-a708-2a711413131e</ns1:Value>

               </ns1:Id>

            </ns1:Entity>

         </ns1:Entities>

         <ns1:Paging>

            <ns1:From>1</ns1:From>

            <ns1:HasMore>true</ns1:HasMore>

            <ns1:Limit>1</ns1:Limit>

         </ns1:Paging>

      </ns1:Result>

   </ns1:ExecuteResult>

</ns1:ExecuteResponse>

 

Source data:

<ExecuteResponse xmlns="http://clarizen.com/api">

   <ExecuteResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

      <Result i:type="QueryResult">

         <Success>true</Success>

         <Entities>

            <Entity>

               <Id>

                  <TypeName>Project</TypeName>

                  <Value>b355a555-4356-4d02-9253-1ca3da1a242e</Value>

               </Id>

               <Values>

                  <FieldValue>

                     <FieldName>State</FieldName>

                     <Value i:type="Entity">

                        <Id>

                           <TypeName>State</TypeName>

                           <Value>Active</Value>

                        </Id>

                        <Values></Values>

                     </Value>

                  </FieldValue>

                  <FieldValue>

                     <FieldName>SYSID</FieldName>

                     <Value xmlns:a="http://www.w3.org/2001/XMLSchema" i:type="a:string">P-XXXXX</Value>

                  </FieldValue>

                  <FieldValue>

                     <FieldName>Customers</FieldName>

                     <Value i:type="QueryResult">

                        <Success>true</Success>

                        <Entities>

                           <Entity>

                              <Id>

                                 <TypeName>Customer</TypeName>

                                 <Value>01a23ded-ff71-4b68-8fc7-d09f0aeaf7fb</Value>

                              </Id>

                              <Values>

                                 <FieldValue>

                                    <FieldName>C_NetSuiteInternalID</FieldName>

                                    <Value xmlns:a="http://www.w3.org/2001/XMLSchema" i:type="a:double">11255</Value>

                                 </FieldValue>

                              </Values>

                           </Entity>

                        </Entities>

                     </Value>

                  </FieldValue>

               </Values>

            </Entity>

<Entity>

               <Id>

                  <TypeName>Project</TypeName>

                  <Value>b355a555-4356-4d02-9253-1ca3da1a242e</Value>

               </Id>

               <Values>

                  <FieldValue>

                     <FieldName>State</FieldName>

                     <Value i:type="Entity">

                        <Id>

                           <TypeName>State</TypeName>

                           <Value>Active</Value>

                        </Id>

                        <Values></Values>

                     </Value>

                  </FieldValue>

                  <FieldValue>

                     <FieldName>SYSID</FieldName>

                     <Value xmlns:a="http://www.w3.org/2001/XMLSchema" i:type="a:string">P-XXXXX</Value>

                  </FieldValue>

                  <FieldValue>

                     <FieldName>Customers</FieldName>

                     <Value i:type="QueryResult">

                        <Success>true</Success>

                        <Entities>

                           <Entity>

                              <Id>

                                 <TypeName>Customer</TypeName>

                                 <Value>01a23ded-ff71-4b68-8fc7-d09f0aeaf7fb</Value>

                              </Id>

                              <Values>

                                 <FieldValue>

                                    <FieldName>C_NetSuiteInternalID</FieldName>

                                    <Value xmlns:a="http://www.w3.org/2001/XMLSchema" i:type="a:double">11255</Value>

                                 </FieldValue>

                              </Values>

                           </Entity>

                        </Entities>

                     </Value>

                  </FieldValue>

               </Values>

            </Entity>

         </Entities>

         <Paging>

            <From>1</From>

            <HasMore>false</HasMore>

            <Limit>2</Limit>

         </Paging>

      </Result>

   </ExecuteResult>

</ExecuteResponse>

Outcomes