cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
buro2020
Helper II
Helper II

how do I get the flow to recognise a subfolder of a list name

So I have a flow built, unfortunately it doesn't work because it will not recognise the subfolder.

 

So top folder is called Incoming.

 

Sub folder is called BIM

 

my flow searches for particular text in a file that is uploaded to BIM and then updates the received from column with a value that is based on the parameter I set.

 

The issue lies with the fact that I cannot input the subfolder in the LIST NAME field box, because it will only recognise Incoming folder

 

flow1.JPG

 

Does anyone know how to put the sub folder BIM in the flow to update?

 

Wayne

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi again

I would assign the following WDL expression as the input for 'Update item' 'Received from'

if(contains(triggerBody()?['{Name}'],'KSS'),'KSS','')

Please note it is a WDL expression, you need to follow these steps to add it:

https://flow.microsoft.com/es-es/blog/use-expressions-in-actions/

 

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

17 REPLIES 17
efialttes
Super User
Super User

Hi!

Let me see I understood your challenge. So you have a Sharepoint library, you aded a custom column called 'REceived from'.

Now, everytime a new file is created, you need to update the new file 'custom column' content with the subfolder name, right?

 

Which trigger are you using? 'When a file is created -properties only-' or 'When a file is created in a folder'?

I think in the first case there is a standard output called 'Folder path' and in he second case another standard output called 'File Path' so you can extract the subfolder by means of expressions... split() and the '/' separator will probably do the magic you need

You can find both of them on the dynamic content menu

Please let us know whcih trigger you are using for additional help

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi,

 

I am not using a trigger as such.

 

My initial top level trigger is when a file is created. so when something is uploaded to the BIM subfolder, it will trigger everything.

There are conditions built in to progress or terminate.

 

The condition is finding -KSS- in the file name to proceed to update the custom column.

 

This works only in the top level folder, but since BIM is a subfolder, it won't work since it doesn't like the 03_Incoming/BIM file path I enter into the name list box, it will only like 03_Incoming.

 

Wayne

Hi again!

Can you share a screenshot from your flow design?

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



hi,

 

flow1.JPGflow2.JPG

Hi!

Please note If you need to execute the flow only when a file is uploaded in a specific subfolder inside your SP library, you can select this subfolder in your current trigger, 'Folder' input.

Since you left black this input, the flow is being executed whenever a file is created in your library, no matter the subfolder

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi,

 

I deliberately left it blank because the flow would cancel as I dropped a test file into the top folder; Incoming.

 

I did have it in there, but when the flow ran, it would fail on updating the received column, because I cannot specify the BIM folder in the update item part of the flow.

 

Wayne

Hi again!

So we forget about Option#1

Option#2: Since you are using 'When a file is created -properties only-' as trigger... did you consider using its standard output called 'Folder path'? You can use a WDL based expression to manipulate it and get the subfolder

If you want us to help you explore this second option, a very simple way to proceed is by adding a dummy 'Compose' action block just after the trigger, then assign 'Folder path' from the dynamic content menu as its input. NExt, reexecute flow by creating a file into the desired subfolder, inspect Compose outputs and share its content

 

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Happy Mondy,

 

Thank you for your help, please tell me if I am on the right path here (image below). I have put the folder path in the folder name part of the trigger.

 

Capture.JPG

Hi again!

I believe if you fill 'Folder path' in your trigger input, the flow will only be executed when the file is created in that folder.

Now, what do you need to store in the new SP item 'Title' column in such case? 'BIM'?

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi,

 

Yes the trigger will execute when I drop a file into the BIM folder, but that is the problem I have been having.

 

It will trigger, but the received from column will not update in the BIM folder, because the Folder name in the update section of the flow will terminate because it won't find the subfolder called BIM.

 

Wayne

Hi again

Now I understand better. You do not need to fill 'Title' column but 'REceived from'

Now, what do you need to store in the new SP item 'REceived from' column in such case? Do you need to store the string 'BIM'? If not, please add a dummy 'Compose' action block, assign as its input 'File Path' from the trigger, reexecute the flow, share 'Compose' output content and detail which part of the 'File path' you need to be assigned to 'REceived from'

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Capture.JPG

 

if the file name of the document has KSS in it, then my flow is suppose to find it and the condition is based on that parameter is to update Received from column with KSS in that column.

 

Wayne

Hi again!

Sorry for the misunderstandings! I think finally we are very close to a happy ending!

I would assign the following expression as the input for 'REceived from'

if(contains(triggerBody()?['{Name}'],'KSS'),'KSS','')

 

So, if FileName contains pattern 'KSS', this same pattern is added to 'REceived from'.

If FileNAme does not contain patterns 'KSS', and empty value is assigned to 'Received from'

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



hi,

 

Where do I put the text string?

 

Wayne

Hi again

I would assign the following WDL expression as the input for 'Update item' 'Received from'

if(contains(triggerBody()?['{Name}'],'KSS'),'KSS','')

Please note it is a WDL expression, you need to follow these steps to add it:

https://flow.microsoft.com/es-es/blog/use-expressions-in-actions/

 

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

omg, that worked. 

 

Thank  you so much for your help. I pasted it into the box rather than do it as an expression.

 

Wayne

OMG! HURRAY! We did it!

 

Thanx for marking this topic as "Solved" by clicking "Accept as a solution". THis way others with tsimilar problem can find a solution faster!

 

May I suggest to Click on 'Thumbs up' in any of the answers you found them valuable... or even in all of them 😉?

 
 

Flow_thumbsUp.png

 

Even though this suggestion is OPTIONAL, please remember it is the cheapest, easiest way to say thanks to somebody that spent its time simply trying to help. And just between you and me, everytime an inspiring answer receive a kudo in this community, an ewok escapes from The Emperor menace 

 

Thanx for your help making this community great!

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (794)