Forum Discussion
Deleted
Jan 31, 2019Dynamically 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?
kevinmckeown8
Feb 05, 2019Steel 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
Feb 05, 2019Thanks 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.
- kevinmckeown8Feb 05, 2019Steel 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.
- DeletedFeb 06, 2019
Thanks kevinmckeown8. I am working with MS Flow to populate the Title with the filename. I got pulled off to another project so it might be a bit before I can implement your solution. Thanks for the great input.