Forum Discussion
Dynamically Populate SPO List With Files From Specific Folder?
Can I dynamically populate a field in a SPO list (when a new item is being added) with a list of files (user will select one file) from a specific doc library or folder?
- Russell GoveIron Contributor
you should be able to do that with a powerapps form. the first screen lets the user select the file, then redirects to the next form with the fields filled into based on the files content.
have you tried that?
- Deleted
I have worked with PowerApps some recently and I would prefer if users submitted their requests from a PowerApps form rather than clicking "Add new item" on a SP list page.
I really only need users to provide a file name in the form. However, I need to present the user with a list of available files in a doc library. Once they select a file, there no need to retrieve additional details about the file as the filename is all that I need.
Can you provide a link or details on how to create a drop-down list of filenames from a doc library within PowerApps?
Thank you for taking the time to provide a response!
- kevinmckeown8Steel Contributor
I believe you could still use the method I described before and the Lookup column for File Names would then be available for you to use in your PowerApps form just like any other column in your list.
- Deleted
Any info is appreciated
- NeverHereBrass Contributor
Hello cgtrman,
Maybe not natively in SPO, but you could possibly create a dropdown menu on your form with a list of filenames, then use Flow to attach a file based on the selection from a document library.
- DeletedThanks for your response. I am not looking to attach a file but rather offer the user a list of file names to select one from. Looking for a way to populate a SPO List "Add new item" field with a list of file names to select from.
- kevinmckeown8Steel Contributor
Have you tried creating a Lookup column? The lookup column would be created in your list and would lookup the Title field from your Document Library. In your document library, you could setup a workflow that automatically sets the Title field value to equal the actual file name.
- Deleted
Thanks kevinmckeown8 - The lookup column is a great idea.
I tried using an existing doc library and then tried with the default documents library and neither one offered "Name" as a column to choose from. Both document libraries have a "Name" column but it simply doesn't appear in the drop-down for a lookup column.
BTW I first tried using the "Title" field but it did not contain any data even though there are files in that library.
- kevinmckeown8Steel Contributor
As you are seeing, by default the Title field in a document library does not get a value applied to it (only the Name field does). This is where the workflow comes in. You can have a workflow triggered on item creation in your document library. This workflow should be configured to copy the document Name field value into the Title field for that document. This way you will see Title values in your lookup column.