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

Can the List Folder Action take a dynamic value for the Site Address Parameter?

Having a very frustrating day of Flow building. I am using the List Folder action in an Apply to Each loop, but when I assign a dynamic value to the Site Address parameter, it doesn’t change. Each loop it keeps the original value.

 

If it only needs a site collection address, I can’t figure out how to enter the subsite. Including it in the Folder Identifier doesn’t work.

 

So no idea how to take a list of URLs and get the contents of those folders…

12 REPLIES 12
Community Support Team
Community Support Team

Re: Can the List Folder Action take a dynamic value for the Site Address Parameter?

Hi @stvcdms,

 

Can you capture a screenshot of your whole flow so that I can understand you issue better and will try to reproduce your issue?

 

Regards,

Mona

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

Re: Can the List Folder Action take a dynamic value for the Site Address Parameter?

Sure,

 

Basically I am grabbing a SharePoint list with a URLs for both the site and the folders I am interseted in. The site URLs are a number of subsites. When I call List Folder I want to pass in a new subsite and folder identifer, but while the Flow successfuly runs, it only takes the first value for the Site Address and just repeats itself, it doesn't get a new value for Site Address in the loop.

 

Capture.JPG

Community Support Team
Community Support Team

Re: Can the List Folder Action take a dynamic value for the Site Address Parameter?

Hi @stvcdms,

 

About compose concept in flow, you usually use it when you have a single value that you want to re-use many different times throughout your flow (for example, a single message that you want to reuse in several emails you send out). So the outputs from compose should always the same. And I think that is why it will repeats the same site address in List folder.

 

Regards,

Mona

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

Re: Can the List Folder Action take a dynamic value for the Site Address Parameter?

How often does the list of URL's change?

 

You could add this to an external datasource easily (e.g SQL/Cosmo/Excel), then loop through each one using an "Apply to each" step.

 

Then pass that variable into the rest of your Flow.

stvcdms
Level 8

Re: Can the List Folder Action take a dynamic value for the Site Address Parameter?

@DionGoile that is what is not working. I am taking a list of URLs from a SharePoint list and then doing an Apply to Each, but it never takes a different URL. I just repeats over and over with the first URL. It don't see why looping over a SharePoint list would be different from an Excel sheet.

 

I am also unclear how to pass the variable from the Apply to Each to the rest of the flow as I keep seeing contradictory statements about if that's even possible.

stvcdms
Level 8

Re: Can the List Folder Action take a dynamic value for the Site Address Parameter?

@v-monli-msft that does not change the outcome. Compose was put in there because I thought maybe the issue was it wasn't taking a string value, but removing Compose produces the same behavior. It never goes through the list it just loops over and over on the first value passed to List Folder.

DionGoile
Level: Powered On

Re: Can the List Folder Action take a dynamic value for the Site Address Parameter?

Yes you are right sorry, must have read to quickly.

Can you go into the history of your flow runs and take a screen shot of the data outputs? Let me know if you need assistance finding this.

What can happen is that the entire data is output as one object, so there is only only Apply loop to complete hence the same result. If that is the case we should be able to use Parse JSON to fix your issue.
stvcdms
Level 8

Re: Can the List Folder Action take a dynamic value for the Site Address Parameter?

@DionGoile Some of the outputs have some info from our tenant I don't want to share, but I can tell you it successfully pulls the data from the SharePoint list. On the output of the List Foder you can see it below minus a few ID tags:

 

[
  {
"Id": "%252fdocuments%252fArchive%252fTest%2bProposal%2bDocument%2b01.txt",
    "Name": "Test Proposal Document 01.txt",
    "DisplayName": "Test Proposal Document 01.txt",
    "Path": "/documents/Archive/Test Proposal Document 01.txt",
    "LastModified": "2017-05-18T02:00:20Z",
    "Size": 13,
    "MediaType": "text/plain",
    "IsFolder": false,
  }
]

 

So while the Flow successfuly completes it's only reaching out to the first value, then completing without error.

DionGoile
Level: Powered On

Re: Can the List Folder Action take a dynamic value for the Site Address Parameter?

The fact you are getting one result is the reason this is not working, when I run it on a generic list I get multiple results. It should work fine.

 

You may have encountered a bug, I would suggest (if you haven't already) create a new flow entirely and delete and reconnect your sharepoint connection in Flow. Also test with a different list.

 

Otherwise one of the Microsoft team will be able to help you lodge a support case.

 

Sorry I haven't been able to help more!

 

 

stvcdms
Level 8

Re: Can the List Folder Action take a dynamic value for the Site Address Parameter?

@DionGoile Is the Site Address parameter you use for List Folder using a dynmaic value passsed from the previous step?

DionGoile
Level: Powered On

Re: Can the List Folder Action take a dynamic value for the Site Address Parameter?

I see, no mine was not.

 

The output of "Get Items", is that a single object or multiple?

stvcdms
Level 8

Re: Can the List Folder Action take a dynamic value for the Site Address Parameter?

@DionGoile I believe it's a single object containing an array of the items from Get Items. The List Folders action at first does not appear to take dynamic values, but after waiting a second or two it will show items from the Get Items input.

 

I can see the different items from the list in Get Items, I am guessing List Folder can't take a dynamic value, or just needs the Site collection URL for the site address, but if it just needs the site collection URL I don't know how to form the Folder URL to ID a subsite...

 

I am incresingly thinking this is broke/bug.

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Users online (6,285)