cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Using a lookup to check if a file name is already being used in a document library.

Hello, I am building an app that lets users send photos of credit card receipts to a sharepoint document library. Everything works except the fact that if a user puts in a filename that is already on the document library the photo will just overwrite the existing one which will be an issue. 

 

I have a string of code on the send button and I want to have it so that it updates a context of "mismatch" to "true" which causes a popup to load that lets the user know that file name is already taken. 

 

Here is the code that I have so far and here is a photo from my test library. (PS the data is just test so that is why all the file names are gibberish )

 

Screen Shot 2020-09-15 at 2.49.38 PM.png

 The blue underline tells me that the data I am trying to compare are different values. Is a file name stored in a different value than text in sharepoint?

 

Below is the document library.

 

Screen Shot 2020-09-15 at 2.50.17 PM.pngAny Help would be greatly appreciated!!!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@Maxwell123 ,

The blue line is a Delegation warning as the Name field in a Library is not Delegable.

One workaround is to store this in a text field as well when the document is filed, which will then be a Delegable query.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

1 REPLY 1
Super User III
Super User III

@Maxwell123 ,

The blue line is a Delegation warning as the Name field in a Library is not Delegable.

One workaround is to store this in a text field as well when the document is filed, which will then be a Delegable query.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (101,766)