cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Apply to Each action: SP Create Item. Only allows for one input

Please reference this post for background:

https://powerusers.microsoft.com/t5/Building-Flows/Import-XML-to-SharePoint-list-with-Flow-and-xpath...

 

When pulling multiple data points from XML, I am only able to loop through one array (IdArray) when trying to create list items in SharePoint. how can you pull in data from multiple arrays? I also have a Company Id array that I want to apply to the Title field.

 

example.PNG

 

Without being able to add the Company ID into the Apply to Each, the array comes through as the actual array, not the values:

result.PNG

 

Thank you for your help - let me know if I can provide any additional information.

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @Anonymous ,

 

Please try the following configuration and expression to extract data in XML:

138.PNG139.PNG

Id:

xpath(xml(item()),'string(/Table/Id)') 

Company_ID:

xpath(xml(item()),'string(/Table/CompanyId)') 

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-bacao-msft
Community Support
Community Support

 

Hi @Anonymous ,

 

Please try the following configuration and expression to extract data in XML:

138.PNG139.PNG

Id:

xpath(xml(item()),'string(/Table/Id)') 

Company_ID:

xpath(xml(item()),'string(/Table/CompanyId)') 

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks! I had this same question and finding this thread was huge for me. 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (1,404)