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 / Populate field with at...
Power Apps
Answered

Populate field with attachment metadata and then delete attachment with Flow

(0) ShareShare
ReportReport
Posted on by 86

I have a Power Apps form connected to a SharePoint list that's using attachments. I would like to attach a document that already grabs the Title metadata from the document's heading title. Instead of manually entering the Title in the form, I would like the Title field to be populated from the attached document's Title metadata. This is so that the SharePoint list item has the same title as the attached document.

Secondly and as asked in this thread, considering that Power Apps can't save attachments directly to a library, is it be possible to add an action to a Flow (one that copies an attachment from a list to a library) that then deletes the attachment from the list in order to avoid duplicates?

Categories:
I have the same question (0)
  • user180618 Profile Picture
    86 on at

    Sorry for the thread bump. I take it the above is not possible?

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @user180618 

    Do you want to use the name of the attachment as the default value when you are creating a new record in a form?

    Could you tell me whether you will only add one attachment to each record?

    I assume that my understanding is correct, it will become very simple, even without using flow.

    Ive made a test for your reference:

    Step1:

    Set the DataCardValue42s Default property to :

     

     

    First(DataCardValue46.Attachments).Name
    /*DataCardValue42 is the DataInput control in Title Card.
    DataCardValue46 is the Attachment control in Attachments Card. */

     

     

    eeee.png

     

    Since the above solution does not use a flow and does not create attachments repeatedly, you dont have to worry about needing to delete attachments from the list to avoid duplication.

    Best Regards,

    Bof

  • user180618 Profile Picture
    86 on at

    Thanks for the response @v-bofeng-msft. To clarify a bit, can the Datacard get any other information from the attachment other than the filename? For example, the Title metadata in an attached .doc file.

     

    The flow is a separate thing. Basically, I would like the .doc file (attached in the form) to be saved in a SharePoint library. Since this is not possible in Power Apps and the only way is to use Flow to copy it from a List to a Library, can the flow also delete it from the List after it's been copied? That way, I'll have the attached .doc in the Library and not in the List.

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @user180618 :

    Do you want to save the file into the SharePoint library then delete the attachment in the record?

    I've made a test for your reference:

    add a "Delete attachment" action

    Id:When an item is created-ID

    File Identifier:Get attachments-id

    11111111111111.PNG

    Best Regards,

    Bof

  • user180618 Profile Picture
    86 on at

    Thanks @v-bofeng-msft. One more thing: can the same flow also copy the list item's metadata to the library and apply it to the attachment?

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @user180618

    Sorry I didn't understand your question. Could you explain it in detail?

    Best Regards,

    Bof

  • user180618 Profile Picture
    86 on at

    Thanks for the reply @v-bofeng-msft. To clarify, can the Flow get the attachment and get the List's column values into the Library? So the attachment that's copied to the Library (and then deleted using your flow) also takes with it the values in Column1, Column2 etc.

     

    In other words, what I'm basically trying to achieve with all of the above is: make Power Apps save to a Library. Since that's not possible, I'm trying to do this by saving to a List, and then using a Flow to move the information (including the attachment) from the List to the Library.

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @user180618 :

    OK.I may understand what you mean.

    I suggest you try this action: update file properties

    1.png

    Best Regards,

    Bof

  • Rayo Profile Picture
    7 on at

    Thank you @v-bofeng-msft

     

    I modified my attachment flow with the update properties and it worked like Magic! 

     

    Thank you.

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
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard