cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Leonard
Level: Powered On

Mapping from a sharepoint list

Hello,

 

My use case: create a document repository that will be populated by a group of users but that could only be seen by some individuals (let's say the files are provided by 50ish people but only 10 people can have access to all the files). The way I am trying to build it is the following:

- creation of two SharePoint sites: one input site and one output site

- the files on the input site will be moved to the output site using a SharePoint list that acts as a map between the two sites (e.g. files in Shared Documents/folder 1/ in the input site to be migrated to Shared Documents/folder a/ in the output site)

 

What I have done so far:

- creation of the two SharePoint sites

- creation of the SharePoint list

- construction of the flow that read the SharePoint list and uses the elements of the list as variables in the flow

 

What I need to do now

- the elements of the list are the path to the folders of interest. The paths are then provided as dynamic variables to a block that is supposed to list the files/folders in a given folder (in the folder given by the dynamic variable, i.e. the path). Then each file in the folder will be moved using the input/output path provided by the SharePoint list (the mapping list). 

 

The dynamic variable provided as path is not working. Could you please help me with that one?

 

Screenshot of the flow

 

flow_screen.png

1 ACCEPTED SOLUTION

Accepted Solutions
Leonard
Level: Powered On

Re: Mapping from a sharepoint list

Ok, I think I have found the solution.

 

While using the list folder block, when you want to indicate the path to the folder using the gui, the file identifier ends up looking like "/Shared Documents/test 1". But when you feeding it the file identifier with a (dynamic/string) variable you need to convert the / and the spaces to their url (?) codes

 

/ = %252f

space = %2b

 

Once this is solved, everything works fine!

View solution in original post

4 REPLIES 4
Leonard
Level: Powered On

Re: Mapping from a sharepoint list

the last block is the problem! thanks in advance for your help.

Community Support Team
Community Support Team

Re: Mapping from a sharepoint list

Hi @Leonard ,

 

Do you want to get the corresponding file through File path recorded in the list?

Then move the file to the corresponding SharePoint Library?

 

List folder action is populated with the folder path instead of the file path, and is in the format "/LibraryName" or "/LibraryName/FolderName".

If the full path to the file "/LibraryName/FolderName/DisPlayName" is recorded in the list, you could use this file path to configure Move File action directly.

 

Could you describe the details of the files recorded in the List?

Please provide more details.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Leonard
Level: Powered On

Re: Mapping from a sharepoint list

First, thanks a lot for your answer.

 

In the mapping list, I have the path in the input site and the path in output path (basically where the files are and where I would like them to be moved).

 

I wanted to use the "List Folder" block to identify the files/folder in the input folder (i.e. the folder indicated by the input path), and then use an "Apply to each" block to move all the files.

 

Here is the error message I am getting

{
  "error": {
    "code": 404,
    "source": "unitedstates-002.azure-apim.net",
    "clientRequestId": "bba23c6e-11e3-4c28-86d2-3874db336db3",
    "message": "The response is not in a JSON format.",
    "innerError": "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
  }
}

The resource is there, its name has not been changed and should be available.

 

Coming back to your questions, I do want to list the files in the folder, the folder being indicated by the file path.

Then once all the files in the input folder would have been listed, I want to move them to the output folder (in the other SharePoint site), the site being indicated in the "Move file block" and the folder being indicated by the output path in the SharePoint list.

 

Here are some details about the SharePoint List:

 

Line 1: "Path in the Input site", "Path in the Output site"

Line 2: "/Shared Documents/test folder 1", "/Shared Documents/test folder a"

 

Thanks in advance for your help and assistance,

Leonard

Leonard
Level: Powered On

Re: Mapping from a sharepoint list

Ok, I think I have found the solution.

 

While using the list folder block, when you want to indicate the path to the folder using the gui, the file identifier ends up looking like "/Shared Documents/test 1". But when you feeding it the file identifier with a (dynamic/string) variable you need to convert the / and the spaces to their url (?) codes

 

/ = %252f

space = %2b

 

Once this is solved, everything works fine!

View solution in original post

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!

Top Kudoed Authors
Users Online
Currently online: 89 members 3,689 guests
Please welcome our newest community members: