cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RalfsZ
Frequent Visitor

Creating a folder/folders in current location or inside the selected folder in Sharepoint

Hello,

 

Hope you're doing well.

I've come to find that I can't think of a way to make this work.
The scenario is as follows:

The user is in Sharepoint, in a folder already. We want to provide the ability to instantly create multiple folders (pre-defined names) in the folder where he currently is, or, alternatively, he can select the folder, in which he wants the folders to be created.

I did not find any solutions regarding the first scenario, to just "create here, where I am," but the second scenario uses "For a selected file" trigger, because folders are files in sharepoint, apparently.

I've tried playing around with couple of iterations, but the issue seems to be as to "where" to put the folders. 


I've attached a screenshot of the current setup - it kind of works, the only thing that it does not do correctly is, it duplicates the FullPath of folders in root directory, and puts the new folder in there, not within the selected folder.

Is there a way to edit the FullPath variable to delete the beginning of it? 

Folder Creator step has this input:

Folder Path:
DD/22-123 Test1/BIN1/Folder1; where

DD - Library in SP site
22-123 Test1 - Folder

BIN1 - Folder
Folder1 - the folder that I am creating with the flow.


But the output is like this:

Folder path:

DD/DD/22-123 Test1/BIN1/

 


Why does it duplicate the Library in the path?

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @RalfsZ ,

 

Please try this:

vxiaochenmsft_0-1647224264272.png

vxiaochenmsft_1-1647224302908.png

vxiaochenmsft_2-1647224329241.png

replace(outputs('Get_file_properties')?['body/{FullPath}'],split(outputs('Get_file_properties')?['body/{FullPath}'],'/')[0],'')

 

Best Regards,

Wearsky

View solution in original post

2 REPLIES 2
v-xiaochen-msft
Community Support
Community Support

Hi @RalfsZ ,

 

Please try this:

vxiaochenmsft_0-1647224264272.png

vxiaochenmsft_1-1647224302908.png

vxiaochenmsft_2-1647224329241.png

replace(outputs('Get_file_properties')?['body/{FullPath}'],split(outputs('Get_file_properties')?['body/{FullPath}'],'/')[0],'')

 

Best Regards,

Wearsky

RalfsZ
Frequent Visitor

Thank you, this is what I found after longer searching around and it solved my problem.
Your response is marked as solution to this.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,266)