Dynamically Populate SPO List With Files From Specific Folder?

%3CLINGO-SUB%20id%3D%22lingo-sub-328702%22%20slang%3D%22en-US%22%3EDynamically%20Populate%20SPO%20List%20With%20Files%20From%20Specific%20Folder%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-328702%22%20slang%3D%22en-US%22%3E%3CP%3ECan%20I%20dynamically%20populate%20a%20field%20in%20a%20SPO%20list%20(when%20a%20new%20item%20is%20being%20added)%20with%20a%20list%20of%20files%20(user%20will%20select%20one%20file)%20from%20a%20specific%20doc%20library%20or%20folder%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-328702%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESPO%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-338677%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamically%20Populate%20SPO%20List%20With%20Files%20From%20Specific%20Folder%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-338677%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20don't%20have%20a%20link.%20You%20would%20just%20create%20a%20new%20data%20source%20on%20your%20form%20pointing%20to%20the%20library.%20Then%20add%20a%20drop%20down%20control%20and%20set%20its%20Items%20property%20to%20the%20Items%20property%20of%20the%20data%20source%20you%20added.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-333102%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamically%20Populate%20SPO%20List%20With%20Files%20From%20Specific%20Folder%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-333102%22%20slang%3D%22en-US%22%3EThanks%20Kevin.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-333063%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamically%20Populate%20SPO%20List%20With%20Files%20From%20Specific%20Folder%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-333063%22%20slang%3D%22en-US%22%3E%3CP%3EI%20believe%20you%20could%20still%20use%20the%20method%20I%20described%20before%20and%20the%20Lookup%20column%20for%20File%20Names%20would%20then%20be%20available%20for%20you%20to%20use%20in%20your%20PowerApps%20form%20just%20like%20any%20other%20column%20in%20your%20list.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-333029%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamically%20Populate%20SPO%20List%20With%20Files%20From%20Specific%20Folder%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-333029%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20worked%20with%20PowerApps%20some%20recently%20and%20I%20would%20prefer%20if%20users%20submitted%20their%20requests%20from%20a%20PowerApps%20form%20rather%20than%20clicking%20%22Add%20new%20item%22%20on%20a%20SP%20list%20page.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20really%20only%20need%20users%20to%20provide%20a%20file%20name%20in%20the%20form.%20However%2C%20I%20need%20to%20present%20the%20user%20with%20a%20list%20of%20available%20files%20in%20a%20doc%20library.%20Once%20they%20select%20a%20file%2C%20there%20no%20need%20to%20retrieve%20additional%20details%20about%20the%20file%20as%20the%20filename%20is%20all%20that%20I%20need.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20you%20provide%20a%20link%20or%20details%20on%20how%20to%20create%20a%20drop-down%20list%20of%20filenames%20from%20a%20doc%20library%20within%20PowerApps%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20taking%20the%20time%20to%20provide%20a%20response!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-332707%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamically%20Populate%20SPO%20List%20With%20Files%20From%20Specific%20Folder%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-332707%22%20slang%3D%22en-US%22%3E%3CP%3Eyou%20should%20be%20able%20to%20do%20that%20with%20a%20powerapps%20form.%20the%20first%20screen%20lets%20the%20user%20select%20the%20file%2C%20then%20redirects%20to%20the%20next%20form%20with%20the%20fields%20filled%20into%20based%20on%20the%20files%20content.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehave%20you%20tried%20that%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-331995%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamically%20Populate%20SPO%20List%20With%20Files%20From%20Specific%20Folder%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-331995%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F62361%22%20target%3D%22_blank%22%3E%40Kevin%20McKeown%3C%2FA%3E.%26nbsp%3BI%20am%20working%20with%20MS%20Flow%20to%20populate%20the%20Title%20with%20the%20filename.%20I%20got%20pulled%20off%20to%20another%20project%20so%20it%20might%20be%20a%20bit%20before%20I%20can%20implement%20your%20solution.%20Thanks%20for%20the%20great%20input.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-331279%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamically%20Populate%20SPO%20List%20With%20Files%20From%20Specific%20Folder%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-331279%22%20slang%3D%22en-US%22%3E%3CP%3EAs%20you%20are%20seeing%2C%20by%20default%20the%20Title%20field%20in%20a%20document%20library%20does%20not%20get%20a%20value%20applied%20to%20it%20(only%20the%20Name%20field%20does).%20This%20is%20where%20the%20workflow%20comes%20in.%20You%20can%20have%20a%20workflow%20triggered%20on%20item%20creation%20in%20your%20document%20library.%20This%20workflow%20should%20be%20configured%20to%20copy%20the%20document%20Name%20field%20value%20into%20the%20Title%20field%20for%20that%20document.%20This%20way%20you%20will%20see%20Title%20values%20in%20your%20lookup%20column.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-331261%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamically%20Populate%20SPO%20List%20With%20Files%20From%20Specific%20Folder%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-331261%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F62361%22%20target%3D%22_blank%22%3E%40Kevin%20McKeown%3C%2FA%3E%26nbsp%3B-%20The%20lookup%20column%20is%20a%20great%20idea.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20using%20an%20existing%20doc%20library%20and%20then%20tried%20with%20the%20default%20documents%20library%20and%20neither%20one%20offered%20%22Name%22%20as%20a%20column%20to%20choose%20from.%20Both%20document%20libraries%20have%20a%20%22Name%22%26nbsp%3Bcolumn%20but%20it%20simply%20doesn't%20appear%20in%20the%20drop-down%20for%20a%20lookup%20column.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EBTW%20I%20first%20tried%20using%20the%20%22Title%22%20field%20but%20it%20did%20not%20contain%20any%20data%20even%20though%20there%20are%20files%20in%20that%20library.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20style%3D%22width%3A%20200px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F72031i677440B81EC307BD%2Fimage-size%2Fsmall%3Fv%3D1.0%26amp%3Bpx%3D200%22%20alt%3D%22SP%20list%20lookup%20column%20for%20files.PNG%22%20title%3D%22SP%20list%20lookup%20column%20for%20files.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-331211%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamically%20Populate%20SPO%20List%20With%20Files%20From%20Specific%20Folder%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-331211%22%20slang%3D%22en-US%22%3E%3CP%3EHave%20you%20tried%20creating%20a%20Lookup%20column%3F%20The%20lookup%20column%20would%20be%20created%20in%20your%20list%20and%20would%20lookup%20the%20Title%20field%20from%20your%20Document%20Library.%20In%20your%20document%20library%2C%20you%20could%20setup%20a%20workflow%20that%20automatically%20sets%20the%20Title%20field%20value%20to%20equal%20the%20actual%20file%20name.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-331101%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamically%20Populate%20SPO%20List%20With%20Files%20From%20Specific%20Folder%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-331101%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20the%20quick%20response.%20Don't%20worry%20about%20how%20the%20other%20fields%20are%20populated%20(e.g.%2C%20Title)%20and%20I%20can%20manage%20creating%20a%20Flow%20to%20perform%20all%20required%20tasks.%20How%20would%20I%20populate%20the%20drop-down%20menu%20with%20the%20names%20of%20the%20files%20in%20a%20specific%20doc%20library%3F%20That%20is%20the%20question%20I%20need%20solved.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-331096%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamically%20Populate%20SPO%20List%20With%20Files%20From%20Specific%20Folder%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-331096%22%20slang%3D%22en-US%22%3E%3CP%3Ectgrman%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20finally%20understand%2C%20thank%20you%20for%20clarifying.%20You%20could%20use%20a%20calculated%20column%20for%20this%20but%20based%20on%20the%20screenshot%20you%20sent%20me%20it%20looks%20like%20you%20want%20to%20populate%20the%20item%20Title%20column.%20This%20means%20you%20probably%20need%20a%20workflow%20that%20would%20populate%20the%20title%20field%20when%20an%20item%20is%20submitted.%20You%20would%20also%20need%20to%20make%20title%20not%20required%20for%20this%20to%20work.%20You%20could%20use%20SharePoint%20workflow%20for%20this%20but%20MS%20flow%20might%20be%20a%20better%20longer%20term%20solution.%20I%20hope%20this%20helps!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-331089%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamically%20Populate%20SPO%20List%20With%20Files%20From%20Specific%20Folder%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-331089%22%20slang%3D%22en-US%22%3E%3CP%3EI%20created%20a%20screenshot%20to%20clarify%20what%20I'm%20trying%20to%20accomplish.%26nbsp%3B%20While%20viewing%20a%20SPO%20list%2C%20a%20user%20clicks%20%22Add%20new%20item%22%20and%20sees%20this%20form.%20For%20the%20File%20field%2C%20it%20is%20not%20a%20free-form%20text%20field%20but%20rather%20is%20a%20drop-down%20menu%20populated%20with%20files%20from%20a%20doc%20library.%26nbsp%3B%20After%20a%20user%20selects%20one%20file%20from%20the%20drop-down%20menu%2C%20the%20file%20%3CEM%3Ename%3C%2FEM%3E%20would%20be%20added%20to%20the%20form.%20Is%20this%20possible%20in%20SPO%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20267px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F71995i0B1F61C99E2A86CC%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22SP%20list%20add%20new%20item%20select%20file.PNG%22%20title%3D%22SP%20list%20add%20new%20item%20select%20file.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-330561%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamically%20Populate%20SPO%20List%20With%20Files%20From%20Specific%20Folder%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-330561%22%20slang%3D%22en-US%22%3E%3CP%3Ecgtrman%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20only%20thing%20I%20can%20think%20of%20would%20be%20to%20create%20different%20content%20types%20for%20each%20file%2C%20then%20set%20the%20list%20up%20to%20manage%20content%20types.%20The%20user%20would%20then%20have%20a%20list%20of%20only%20templated%20entries%20if%20you%20will.%20You%20can%20do%20the%20same%20in%20a%20document%20library%20and%20it%20looks%20something%20like%20this.%20Unless%20I%20am%20misunderstanding%20your%20request%2C%20and%20if%20so%20I%20apologize.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20264px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F71930iC09795261DF73004%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-330557%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamically%20Populate%20SPO%20List%20With%20Files%20From%20Specific%20Folder%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-330557%22%20slang%3D%22en-US%22%3EThanks%20for%20your%20response.%20I%20am%20not%20looking%20to%20attach%20a%20file%20but%20rather%20offer%20the%20user%20a%20list%20of%20file%20names%20to%20select%20one%20from.%20Looking%20for%20a%20way%20to%20populate%20a%20SPO%20List%20%22Add%20new%20item%22%20field%20with%20a%20list%20of%20file%20names%20to%20select%20from.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-330552%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamically%20Populate%20SPO%20List%20With%20Files%20From%20Specific%20Folder%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-330552%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20cgtrman%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMaybe%20not%20natively%20in%20SPO%2C%20but%20you%20could%20possibly%20create%20a%20dropdown%20menu%20on%20your%20form%20with%20a%20list%20of%20filenames%2C%20then%20use%20Flow%20to%20attach%20a%20file%20based%20on%20the%20selection%20from%20a%20document%20library.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-330543%22%20slang%3D%22en-US%22%3ERe%3A%20Dynamically%20Populate%20SPO%20List%20With%20Files%20From%20Specific%20Folder%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-330543%22%20slang%3D%22en-US%22%3E%3CP%3EAny%20info%20is%20appreciated%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

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?

16 Replies

Any info is appreciated

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.

Thanks 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.

cgtrman,

 

The only thing I can think of would be to create different content types for each file, then set the list up to manage content types. The user would then have a list of only templated entries if you will. You can do the same in a document library and it looks something like this. Unless I am misunderstanding your request, and if so I apologize.

image.png

I created a screenshot to clarify what I'm trying to accomplish.  While viewing a SPO list, a user clicks "Add new item" and sees this form. For the File field, it is not a free-form text field but rather is a drop-down menu populated with files from a doc library.  After a user selects one file from the drop-down menu, the file name would be added to the form. Is this possible in SPO?

SP list add new item select file.PNG

ctgrman,

 

I finally understand, thank you for clarifying. You could use a calculated column for this but based on the screenshot you sent me it looks like you want to populate the item Title column. This means you probably need a workflow that would populate the title field when an item is submitted. You would also need to make title not required for this to work. You could use SharePoint workflow for this but MS flow might be a better longer term solution. I hope this helps!

Thanks for the quick response. Don't worry about how the other fields are populated (e.g., Title) and I can manage creating a Flow to perform all required tasks. How would I populate the drop-down menu with the names of the files in a specific doc library? That is the question I need solved. 

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.

Thanks @Kevin McKeown - 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.

SP list lookup column for files.PNG

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.

Thanks @Kevin McKeown. 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.

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?

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!

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.

Hi,

I don't have a link. You would just create a new data source on your form pointing to the library. Then add a drop down control and set its Items property to the Items property of the data source you added.