cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Guardian1
New Member

Flow For Parent Folder Only When New Item Is Created

Hi! I have clients that upload electronic work orders to various SharePoint sites. The electronic work order contains three folders - one parent (main) folder and two child (sub) folders. There are numerous files contained within the two subfolders. I'm trying to create a flow that automatically populates only one entry from the parent folder file name path to an Excel table. Reason being, I don't want duplicate name entries in the table for the two subfolders or for files within those folders. I just need one entry in the table for the parent folder. I used "Create an Item" and set a trigger to populate an entry in a table only when a folder is created. However, I get three entries in the Excel table when running the flow - one for the main folder and two for the subfolders. What can I do to get an output which only populates the main folder name in to the table?

 

Example client work order uploaded to SharePoint:

(1) Parent Folder "A"

     (2) Subfolder "B"

             (a) File "X1"

     (3) Subfolder "C"

            (b) File "X2"

 

I'm trying to create a flow that populates the name/file path of only 'Parent Folder "A"' to an Excel workbook each time a client uploads a work order folder to SharePoint.

1 REPLY 1
DamoBird365
Community Champion
Community Champion

Hi @Guardian1 

 

Are you trying to get a substring?  http://sharepointsite.com/shareddocs/parentfolderA/subfolderb/filex1

as  http://sharepointsite.com/shareddocs/parentfolderA

 

There is the substring expression which could be combined with indexof to find the first / after the main site URL.  

 

DamoBird365_0-1617523968235.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here

 

 

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (16,180)