Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
0 like 0 dislike
1.6k views
in Power Apps by 3 3 3
I have Canvas App in which I will save data to sharepoint lists. Can I write to more than a sharepoint list in the same power app during the run time and save the data with the same button?

If it is possible! how can I do save data to multiple SharePoint Lists using the same save button at the same time?

1 Answer

0 like 0 dislike
by 48 54 93
edited by

Add to Multiple Sharepoint Lists With One Click Using Microsoft PowerApps

Yes, you can add to Multiple Sharepoint Lists With One Click Using Microsoft PowerApps, by using the Patch Function in the OnSelect property of the button as the following:

  • first, you will use the Defaults function to create a base record of your data source and then specify your changes to the records.
  • suppose you have list1 with column Col1 and col2, and list2 with columns col3 and col4
  • then the patch function that will add to the 2 lists in the same button is

      Patch(List1, Defaults(List1), { col1: "the value for the col1", col2: "the value for the col2"});
      Patch(List2, Defaults(List2), { col3: "the value for the col3", col4: "the value for the col4"});
    

For more details about the Patch function, you can check Patch Function

If you don’t ask, the answer is always NO!
...