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

Power app to Sharepoint Connection.

I have a Powerapp i am building which connects to a sharepoint list. I am using a ForAll/ Patch formula to take the entered information from a collection and upload it to the SP list. When i enter my formula i get no errors and my SP list shows as a data source for my app. I click it and get an unknown error and my formular is now red underlined for the whole patch section. If i remove and reattach the Sp datasource all of the suddon my formula has no errors again.... I am at a loss as to how to proceed not sure if there is something i am missing... Any help would be greatly appreciated. Thank you.

 

See attached for Formula

9 REPLIES 9
Highlighted
Frequent Visitor

Re: Power app to Sharepoint Connection.

 
Highlighted
Solution Supplier
Solution Supplier

Re: Power app to Sharepoint Connection.

Have you included all the SP list's required fields in your patch function? and are you passing a correct datatype to your SP fields?

Highlighted
Frequent Visitor

Re: Power app to Sharepoint Connection.

I have attached my SP List columns and the Collection Columns are equal to the items in my formula all of my formula settings are text or number , with no extras. I appreciate your help with this.

Highlighted
Frequent Visitor

Re: Power app to Sharepoint Connection.

Just realized my Date tab on my Papp is just listed as number but on the spits listed as Date. Might that be affecting it. Other than that i dont see where the error is.

Highlighted
Community Support
Community Support

Re: Power app to Sharepoint Connection.

Hi @JChouris ,

Yes, if you update data of different data type will lead to error.

Please make sure that the value's data is the same as the fields' data type.

If not, please transfer them to the same data type.

If filed1 is a date type, while value1 is number type, please try this: {field1:DateTimeValue(value1)}

If filed1 is a number type, while value1 is text type, please try this: {field1:Value(value1)}

When you update data, data type is really important!

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Power app to Sharepoint Connection.

I tried the formula, still got the error, i removed the date from my formula, collection, and from my SP list and still get the same error. At this point i really dont know what to do.  I have attached my Entry Form as well as my formula. I am new to this and all help is appreciated .

Highlighted
Solution Supplier
Solution Supplier

Re: Power app to Sharepoint Connection.

In the patch function, you are passing the actual controls objects to your SharePoint columns. You need to pass their values.
{Title:Title_column.Text, Zipcode:Value(Zipcode_column.Text), etc).
Alternatively, you are updating 1 SharePoint list. a much simpler approach is to use a Form and call SubmitForm(FormName). This way you don’t need to worry about each field, you just submit the entire form
Highlighted
Frequent Visitor

Re: Power app to Sharepoint Connection.

am not familiar with forms at all and wouldnt know where to start. I have included a copy of the formula and it is still nor working i am getting an error 'The type of this argument'Author' does not match the expected type 'Record'. Found type 'Text'. I am not sure what that means or how to resolve it. I included a snippet of the formula as it stands now

Highlighted
Solution Supplier
Solution Supplier

Re: Power app to Sharepoint Connection.

I would simplify the expression to troubleshoot it. remove the ForAll function, then Patch using only 3-4 columns (the Title field should be in the patch function, because it's a required column in your SharePoint list). and then add more columns if the first step was successful.

To learn how to work with PowerApps forms, watch Shane Young's videos on youtube. https://www.youtube.com/watch?v=BnYe_7fpZRM

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (8,227)