Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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:
  • Germán Profile Picture
    Microsoft Employee on at
    Re: Edit properties of a record in a Sharepoint library via a Form in Power Apps

    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

  • Verified answer
    EddieE Profile Picture
    4,641 Super User 2025 Season 1 on at
    Re: Edit properties of a record in a Sharepoint library via a Form in Power Apps

    @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

     

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,635 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard