cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Save form to multiple SharePoint Item lists using SharePoint Integration features

Hi,

 

I need to control requests for material introduction in my company.

 

I have a one-screen form but I would like to save information to 2 different SharePoint lists, at once:

  1. Material specification > describes the material, e.g. color, size, reference, etc.
  2. Request status > describes the request, e.g. Pending approval, closed, etc.

I would like to create a 'Save & Submit' button to update the main 'Material specification' form first, and then the second form request status.

 

The goal is to allow users to save their material specification without triggering a workflow with the default SharePoint 'Save' button and trigger a PowerAutomate workflow when the second 'Request Status' list is called using the 'Save & Submit' button.

 

I came to create 2 different lists as the trigger "When a new item is saved or modified" cannot be filtered by a specific modified field. 

 

Thank you,

 

NBzo

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @NBzo ,

The syntax you have supplied

Patch(Change Request, Defaults(Change Request), {Title:"Item N°".... ? 

creates a new record in 'Change Request' with the values you specify in the fields. I assume this is what you want to do?

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

3 REPLIES 3
Super User III
Super User III

Hi @NBzo ,

All of this is possible with either Patch or UpdateIf functions. Happy to help with specific questions you may have on code if you experience difficulties.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @WarrenBelz ,

Thank you for your proposal, I tried to use the patch function but no success. This what I have:

In SharePoint

- List N° 1 name 'Material Specification', the form is displayed from the list when a new item is created

- List N° 2 name 'Change Request', the form is hidden for users

In PowerApps

- 2 Data Sources connected, [@'Material Specification'] and [@'Change Request']

- 1 form 'SharePointForm1'

In the 1st case:

- The user saves the form with the default 'Save' button in SharePoint, the record is saved with all form information in 'Material Specification', the unique ID is 'Item N°', no workflow, no entry in 'Change Request'.

In the 2nd case:

- The user saves the form with the 'Save & submit' button in PowerApps, the record is saved/updated with all form information in 'Material Specification, and in 'Change Request' to populate the 'Item N°' and 'Request Status' with "pending". Also, all the fields form are grey out, checking

 

For the PowerApps 'Save and Submit' button, I have the submit action:

SubmitForm(SharePointForm1)

And the second action should take the 'Item N°' and create the item in 'Change Request' list with the Status "Pending", all the remaining tasks are managed via PowerAutomate. 

The patch function is not clear to me, should I try something like:

SubmitForm(SharePointForm1);

Patch(Change Request, Defaults(Change Request), {Title:"Item N°".... ? 

Hi @NBzo ,

The syntax you have supplied

Patch(Change Request, Defaults(Change Request), {Title:"Item N°".... ? 

creates a new record in 'Change Request' with the values you specify in the fields. I assume this is what you want to do?

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (39,260)