cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PJBruen
Resolver I
Resolver I

How to create multiple records in a Sharepoint List from 2 other Lists

Hi all,

On a Canvas App I'm trying to create multiple records on a Sharepoint List. On the screen I have a gallery pointing to one list with multiple records. For every item in that gallery I want to add the ID to another list, along with a variable (already known). I've attached a picture essentially explaining it. I've looked at creating a collection with a ForAll function embedded, but can't seem to get the syntax to work. Has anyone got a simple solution to this please?

 

Many thanks.

Paul

1 ACCEPTED SOLUTION

Accepted Solutions
BrianS
Super User
Super User

ForAll should be the way to go. I'm not sure what syntax you had, and I'm not sure I completely understand what you are trying to end up with, but something like this should work:

ForAll(Table2, Patch(CombinedTable, { Table1_ID : Table1.ID, Table2_ID : Table2.ID }))

View solution in original post

2 REPLIES 2
BrianS
Super User
Super User

ForAll should be the way to go. I'm not sure what syntax you had, and I'm not sure I completely understand what you are trying to end up with, but something like this should work:

ForAll(Table2, Patch(CombinedTable, { Table1_ID : Table1.ID, Table2_ID : Table2.ID }))

View solution in original post

PJBruen
Resolver I
Resolver I

Excellent. Many thanks. 
Needed a little tweak, but works now. 

Regards 

paul

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,550)