web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Edit properties of a r...
Power Apps
Answered

Edit properties of a record in a Sharepoint library via a Form in Power Apps

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello!

 

I am just getting crazy and I don't know how to get this solved:

I have a Form in my app connected to a Library in Sharepoint. I found a really helpful tutorial on how to submit files to a Library directly from a PowerApps (Power Apps Easiest Way To Upload Files To A SharePoint Document Library (matthewdevaney.com))

So, my aim is to manage to edit the properties of that submitted file with the form in my app. If I edit the properties manually in my Sharepoint Library, they are correctly displayed in my form, but if I try to edit and save the data, there's no change. All items appear blank in my Library.

 

This is the formula I am using for the submit button (and it doesn't give me an error when submitting the information):

 

 

Set(
 BudgetDocId,
 AddBudgettoLibrary.Run(
 {
 contentBytes: First(DataCardValue99_1.Attachments).Value,
 name: First(DataCardValue99_1.Attachments).Name
 }
 ).docid
);
Patch(
 'Budget & Procurement',
 LookUp(
 'Budget & Procurement',
 ID = BudgetDocId
 ),
 {
 'PT item': DataCardValue24.Selected,
 Title: DataCardValue160.Text,
 'Doc Type': DataCardValue161.Selected,
 'Doc Group': DataCardValue162.Selected,
 'Linked IoN ID2': DataCardValue163.Selected,
 'SAP Reference': DataCardValue164.Text,
 'Invoice No': DataCardValue165.Text,
 'Invoiced Net Amount': Int(DataCardValue166.Text),
 Source: DataCardValue21.Selected,
 Taxonomy: DataCardValue25.Selected
 }
);
Notify(
 "Your file has been submitted!",
 NotificationType.Success
);

 

 

 

To clarify, in case it is needed, the "BudgetDocId" is a variable obtained in the Flow that returns me the ID of the submitted file.

Then, first function is to submit the file via a Flow to the Library.

The second function, the Patch (where I feel is the issue), is to edit the Library record properties (it is working in other Forms in the app, but those are linked to Lists, not Libraries)

The third function is just to notify if the file was submitted properly

 

Could someone tell me how to fix this, please?

Categories:
  • Verified answer
    EddieE Profile Picture
    4,650 Moderator on at

    @Germán 

    Just guessing here but it's possible that the variable BudgetDocId isn't getting created before the Patch() code runs - which is possibly why the metadata isn't getting added.

     

    Some things you  could try:

    - add the action 'Respond to PowerApps or Flow' as the last action in your flow. This can sometimes work when there's a delay like this.

    - move your Patch() to your Flow instead and use the 'Update file properties' action. Chino Does stuff explains what you can do in this video

    https://www.youtube.com/watch?v=yC0W5am6M3Q&t=1182s

     

     

  • Germán Profile Picture
    Microsoft Employee on at

    Hello @EddieE 

     

    Thank you very much for your reply and sorry for the delay in replying. The method in the video worked for me! I just had to adjust it to my form, but it was fine

     

    I am accepting it as solution

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard