cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
k_cain
Helper II
Helper II

Patch Not Loading to SharePoint List

Powerapps newbie here building my first ever app. I connected my app to a blank SharePoint list dataset called Construction Analyst Workload Management. I didn't create any columns in the SP list, as I understood the patch would create those for me. When a user clicks the Save button, all inputted data should be patched to the SP list. I've tested it multiple times, but the SP list remains blank (and is also missing some of the columns?). The OnSelect property of the Save button uses the following expression. Do you see any errors that could cause the data not to load?

 

Patch('Construction Analyst Workload Management', Defaults('Construction Analyst Workload Management'), {'FHA Number_Label': 'FHA Number_Dropdown', 'Date Logged In_Label': 'Date Logged In_Input', 'Date Email Received_Label': 'Date Email Received_Input', 'Request Type_Label': 'Request Type_Dropdown Input', 'Request Item Number_Label': 'Request Item Number_Input', 'Due Date_Label':'Due Date_Autogenerated', 'Property Name_Label': 'Property Name_Text_Input', Completed_Label: Completed_Toggle, 'Date Request Sent to Lender_Label': 'Date Request Completed_Input', Comments_Label: Comments_Input});

 

Reset('FHA Number_Dropdown'); Reset('Date Logged In_Input'); Reset('Date Email Received_Input'); Reset('Request Type_Dropdown Input'); Reset ('Request Item Number_Input'); Reset('Due Date_Autogenerated'); Reset('Property Name_Text_Input'); Reset(Completed_Toggle); Reset('Date Request Completed_Input'); Reset(Comments_Input)

 

k_cain_0-1610664652047.pngk_cain_1-1610664674021.png

 

Additionally, how do I remove/hide the Title column in the SharePoint list? Thank you!!

 

 

 

 

5 REPLIES 5
RandyHayes
Super User III
Super User III

@k_cain 

Welcome to PowerApps!

So first thing - Patch will NOT create columns.  It will create records if you are specifying the Defaults as you are, but not columns.

I am curious why you would not just use a regular EditForm for what you are doing as it would be pretty much one formula to write SubmitForm(form1)

 

But, since you are doing the Patch, your problem in your formula is that you are NOT specifying the properties to write to your list columns.

When you reference a Control in your formulas, you get a Control type - this is not data.  You need to specify the property of the control that has the data.

For example, Comments_Input I assume is a TextInput control.  The property that has the data is .Text.  Therefore you need to specify Comments_Input.Text in your formulas.  Same with Labels.  For dropdowns, you need to specify the Selected property and the value in the record of the Selected.

 

So, there's a lot more stuff to add to your patch formula.

And again, with an EditForm, you'd be done.

 

So, check out your formula and add the properties that have the data and then make sure you have the columns in your List.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
RandyHayes
Super User III
Super User III

@k_cain 

Oh, and for the Title column.  You show it currently as required.  You can set it to not required in your list, or you can provide a default value in your Patch.  If you switch to a form and Title remains required, you can also hide it there and set the Title in the Update to be a default value.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Randy, I wish I had started this project with an Editform, as that would have made my life so much easier. I attempted the Editform, but I had issues with it as well and decided (for the sake of time) just to complete the original planned patch. However, I am continuing to have errors with the OnSelect patch function, as it does not recognize any of the columns. Can you please help? The formula I'm using is below:

 

Patch('Construction Analyst Workload Management', Defaults('Construction Analyst Workload Management'), {'FHA Number_Label': 'FHA Number_Dropdown'.Selected.Value, 'Date Logged In_Label': 'Date Logged In_Input'.SelectedDate, 'Date Email Received_Label': 'Date Email Received_Input'.SelectedDate, 'Request Type_Label': 'Request Type_Dropdown Input'.Selected.Value, 'Request Item Number_Label': 'Request Item Number_Input'.Text, 'Due Date_Label':'Due Date_Autogenerated'.SelectedDate, 'Property Name_Label': 'Property Name_Text_Input'.Text, ‘Construction Analyst_Label’: ‘Construction Analyst_Input’.SelectedDate, Completed_Label: Completed_Toggle, 'Date Returned to Lender_Label': 'Date Request Completed_Input'.SelectedDate, Comments: Comments_Input.Text});

 

Reset('FHA Number_Dropdown'); Reset('Date Logged In_Input'); Reset('Date Email Received_Input'); Reset('Request Type_Dropdown Input'); Reset ('Request Item Number_Input'); Reset('Due Date_Autogenerated'); Reset('Property Name_Text_Input'); Reset(‘Construction Analyst_Input’); Reset(Completed_Toggle); Reset('Date Request Completed_Input'); Reset(Comments_Input)

 

k_cain_0-1611095863615.png

k_cain_1-1611096262620.png

 

 

RandyHayes
Super User III
Super User III

@k_cain 

Can you take a snapshot of the Formula in the formula editor showing the red underline errors?

That would help pinpoint a little better.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Randy, here is the patch formula:

k_cain_0-1611244929969.png

 

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,608)