cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tianaranjo
Level 8

Create file in SharePoint Photo library when SharePoint list file is created

Greetings, 

 

I would like a Flow that would create a new (photo) folder file in a SharePoint library.  The file would be created when a new form is submitted in the SharePoint libray.  I would like the folder being created to be named the same as the list item that it is being generated from.  Is that possible?  If so, how do I enter the code in the File Name and File Content fields of the flow?  Thank you, in advance, for the help.

2017-10-29_10-45-36.png

4 REPLIES 4
Community Support Team
Community Support Team

Re: Create file in SharePoint Photo library when SharePoint list file is created

Hi @tianaranjo,

 

Could you please explain a bit for what the form is used for, and the related SharePoint list item?

If the form is used to generate new sharepoint list item, then we could take use of the following trigger:

SharePoint->When an item is created

Then choose the corresponding List item field within the Folder path, for the File Name and the File Content, Just typing "Text", we could add a delete file action to delete it if it is not needed, follow the steps below:

54.PNG

 

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
tianaranjo
Level 8

Re: Create file in SharePoint Photo library when SharePoint list file is created

Michael,

 

Thank you for the reply.  The SharePoint (Infopath) form will be utilized for inspections.  The inspector will need to upload photos.  The photos will exceed the allowable limit for photos within the SharePoint list item - so, I would like to have a file created in a SharePoint photo library with the same fileName as the SharePoint list item. I will not be deleting any files. 

 

In addition to establishing a Flow that would create a photo folder, I would then like to create another flow that would show the link in the SharePoint list (where the original item is created).   

 

Again, thank you for the assistance.

Mike2500
Level 8

Re: Create file in SharePoint Photo library when SharePoint list file is created

If I understand your scenario correctly, this is going to be a bit challenging. If you're using an InfoPath form library, then getting the attachment from the infopath from isn't easy, as the file is embedded in the form itself. The solution might be something along the lines of calling an Azure function that programatically retrieves the file from within the infopath form.

 

Though, is there any reason this was built with an InfoPath library? If you can convert this to a list, and use the list attachment feature rather than the InfoPath attachment feature, then this is a pretty trivial flow to set up. Likewise a button flow can pretty easily capture a photo and get it added to a library, without using InfoPath at all.

tianaranjo
Level 8

Re: Create file in SharePoint Photo library when SharePoint list file is created

Mike,,

 

I do not wish to copy the attachment over, I simply want to create a folder in a separate (photo) library, naming it the same as the list item that was created.  The user won't attach any photos to the Infopath library.  

However, I didn't consider your alternative and will look into that.  Thank you.  

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 354 members 5,519 guests
Please welcome our newest community members: