I am attempting to put a SharePoint document library folder into a gallery. When I view the SharePoint directory from SharePoint the Name and Title fields are alphabetic and look fine (ie: "Sahara Inc" ). But from within PowerApps I see numbers in these fields, not the alphabetic name (211123 or 211124 - these are in sequence). YET, when I choose to "Edit" the data on that connector, it simply brings me to the list where I see the alphabetic names, so I know I'm referencing the correct directory as data source. The directory (data source) has a URL that ends like this: .../Shared%20Documents/Forms/AllItems.aspx
The reason I share the url is because I'm not sure it's actually just a list with the word Forms in there. (newbie to SharePoint (and PA)) I'm still trying to understand the differences between lists, libraries, views, etc...)
So, how can I get this into a gallery with the Alphabetic "Name" showing and not the numeric "code" I have to match on that name but am unable to do so.
Thanks in advance for your suggestions and solutions.
Cheers
cha-cha,
Thanks for the link and your time and attention, working with you guided me to find the truth about my data. And I can stop solving the wrong problem. How valuable is that? Cheers!
Hi @AmyF
Glad you are progressing with your case. Hopefully, you get to figure out a solution to your issue. If ever you manage to get the alphabetic name of the files within the file's meta information, you can always use Power Automate to do the bulk renaming of your folder.
For reference: https://www.enjoysharepoint.com/power-automate-rename-file/
I haven't tried what you suggested yet, but I've seen something while testing. I scrolled way down in the gallery and looked at a different set of records and they DO have the alphabetic names in the Name field and the File Name With Extension fields.
So, I think this is just bad data. The files that happened prior to 2022 were legacy files from another system. They were imported to this list and apparently the person who did this, did it in such a way as to force the numbers in there (I'm not sure why, I know the legacy data had alphabetic names) but data added after a certain date in 2022 has the alphabetic names available.
cha-cha, please reply to this message, (and include the text) and I'll mark that as the solution since your efforts and guidance caused me to see where the problem really lies and that is very valuable indeed.
Thanks for your time and effort, I really do appreciate it.
Cheers!!!
Hello @AmyF
Actually, the data is there but the thing is
-Your document library might be huge
-SharePoint document library is a flat directory. So even if a file is in multiple subfolders, it will appear in PowerApps as if they are in one single folder
-PowerApps can only read the first 500 or 2000 records depending on your app settings.
Thus the files named with numbers are probably actual files deep down in your folder structure and they happen to show up since these files will be on time if these files are sorted alphabetically.
Unfortunately, all fields within curly braces like "{Name}" and "{FileNameWithExtension}" are non-delegable like the "{IsFolder}" so they won't be of help to do a deep search.
A workaround that is commonly used is to create an indexable column in the library. This can be a text or a number. The example below is a Text column named IndexName. Once we filter the document using this column like Filter(Documents, IndexName=A), then it will show all folders with index name A. I hope I make sense to you.
Hi cha-cha,
I did that and got a delegation warning about large datasets. BTW every item in this folder is a directory, when I display IsFolder as one of the items, it's true in every case. No where do I see any reference to the alphabetic name in the collection. Only the number which is in several fields including the URLs. I was under the impression that all items in SharePoint like this were actually numbers underneath because otherwise you'd have a hard time changing column names. But, I assumed I'd see that text string somewhere in the underlying fields. Where is this name maintained? Is there a cross reference table in the admin background??? I'm not an admin, btw (lol, like you couldn't tell). 😄
Totally appreciate you, cha-cha, for sticking with me through this.
Hi Amy,
I was wondering if these numbers are actual files at the deep end of the library. I've been checking a couple of docu libraries on my environment but it looks FileNamesWithExtension should show the actual file names of the files which could mean that there might be files on that Shared folder that are named with numbers.
Just to see that we got our folders shown similar to the screenshot, can you please check what will be the output of having the code below in the Items property of the gallery?
Filter(Documents,IsFolder)
cha-cha,
Will that work if the File Name With Extension is the same number as Name and Title? see attached in your example are you expecting File Name With Extension to have an alphabetic value? or is there some "magical" conversion of that number into its the alphabetic name?
Hello @AmyF
On the Gallery, update the Text property of the label that you want to display with Filename or Foldercode with this code:
If(IsBlank(ThisItem.Title),ThisItem.'File name with extension',ThisItem.Title)
Then on the Item property of the gallery, please use this code:
SortByColumns(Documents,"Title",SortOrder.Ascending,"{FilenameWithExtension}",SortOrder.Ascending)
Hey thanks for that, I unmarked it.
graphic attached
It's alright, you can keep this question. Just look for the options of that accepted solution and you should have to option to undo accepting it as a solution:
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473