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

Copy data from a combo box to a sharepoint list

I have built quite a complex Power App with quite a large amount of moving parts, however one simple thing I cannot figure out is how I can collect data from a combo box and have that selected data populate a column in a SharePoint list.

 

The App is designed to police a process for sending files to be approved by the "Approvers". The App starts by the colleague putting data on the the app, filling in details for the submission - this is linked to a sharepoint list "Germany Payroll Approval Process" 

Then I have included a Combo box and up to this point everything works fine.

 

The combo box data is being pulled from a different list in SharePoint called “Approver List 1”, from the Title column and allows the Approver to be selected from a Secure list in SharePoint and the second box on the combo box “Approver List 1”, from the Email Column this displays the email address of the Approver. 

I now want the displayed email address (the second combo box) to populate on to a SharePoint list called "Germany Payroll Approval Process" in a column called AP1EM, this will then trigger a flow to send an email to the approver.

I have read about "Collect" or "Patch" but I am not sure what the most reliable way is of dealing with this?

I have been looking at this now for over 10 hours and I am a littel blind to the correct solution.

 

Many thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

For example:

First(Filter(datasource,column="value))

This function would return the first record in a data source where the value of the field in the specifiec Column matches the value spcified.  Here's a specific example from the documentation found at https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

The data source is 'IceCream'

The record selection function is First(Filter(IceCream, Flavor = "Chocolate"))

And the field to be updated is Quantity.  It will be set to 400

 

Patch( IceCream,
First( Filter( IceCream, Flavor = "Chocolate" ) ), { Quantity: 400 } )
Modifies a record in the IceCream data source:
  • The ID column of the record to modify contains the value of 1. (The Chocolate record has that ID.)
  • The value in the Quantity column changes to 400.
{ ID: 1, Flavor: "Chocolate", Quantity: 400 }

The Chocolate entry in the IceCream data source has been modified.


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
Pstork1
Dual Super User III
Dual Super User III

Assuming that you are using a single selection from the combo box, the easiest way to do this is to use a Patch function like this:

Patch('ame of the datasource for SharePoint list,[Some formula that uniquely identifies the record being updated],{AP1EM:Combobox1.Selected.Value})

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

Thank you.

 

I am using a single selection from the combo box.

 

I am sorry but I dont understand [Some formula that uniquely identifies the record being updated]

 

The remainder makes sense though.

 

If you could explain that - that would be brilliant, thank you

Pstork1
Dual Super User III
Dual Super User III

For example:

First(Filter(datasource,column="value))

This function would return the first record in a data source where the value of the field in the specifiec Column matches the value spcified.  Here's a specific example from the documentation found at https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

The data source is 'IceCream'

The record selection function is First(Filter(IceCream, Flavor = "Chocolate"))

And the field to be updated is Quantity.  It will be set to 400

 

Patch( IceCream,
First( Filter( IceCream, Flavor = "Chocolate" ) ), { Quantity: 400 } )
Modifies a record in the IceCream data source:
  • The ID column of the record to modify contains the value of 1. (The Chocolate record has that ID.)
  • The value in the Quantity column changes to 400.
{ ID: 1, Flavor: "Chocolate", Quantity: 400 }

The Chocolate entry in the IceCream data source has been modified.


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Anonymous
Not applicable

Thank you that makes sense and is so helpful.

 

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,604)