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 / Look Up if document na...
Power Apps
Answered

Look Up if document name appears in Sharepoint Document Library before Upload

(0) ShareShare
ReportReport
Posted on by

Hi, 

 

I am creating a Power App where users can upload documents to a Sharepoint Document Library. This works fine, however, should the document they are trying to upload already exist (e.g. the filename is exactly the same as a document already in the Doc Library on SP), the Upload goes ahead but does not trigger the Power Automate flow I have which triggers when a new document is uploaded (as the file name already exists in the Doc Library). 

 

What I want to do is, before Upload is clicked, the Sharepoint Doc Library is "searched" to see if the item being uploaded's file name already exists - if YES, append some characters to the beginning of the filename, if NO, allow the Upload to the SP doc library to go ahead. 

 

All advice welcome,

Thanks

Ed

 

 

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

    Hi @EddWr1 ,

     

    I assume There is a text input control(TextInput1) to set the file name in the canvas app. You could use this code to upload the file:

    If(
     IsBlank(LookUp(YourSPLibrary,'File name with extension'=TextInput1.Text)),
     Notify("The file already exists"),
     FlowName.Run()
    )

     

    Best Regards,

    Bof

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 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard