web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / I have variable type s...
Power Automate
Suggested Answer

I have variable type set as List - still showing an error - please help

(0) ShareShare
ReportReport
Posted on by 12
 
Hi, 
 
I have variable type set as List, also the output is from the Get files (properties only), still it is showing an error stating variable is not a list.
 
Please help troubleshoot the issue 
 
 
 
I have the same question (0)
  • Suggested answer
    eetuRobo Profile Picture
    4,204 Super User 2025 Season 2 on at
    You have created Output variable named "NewOutput" and you are also looping that NewOutput variable (which is blank since Power Automate Cloud hasn't passed anything to it). Does your Get files (properties only) -action also create variable named "NewOutput"? If so rename the Get files -variable to something else and use that in your apply to each loop. Or just delete the Output variable.

    Input / Output variables are for Power Automate cloud to either give (input) or receive (output) variables. So Output variable you are only using to pass the variable to the Power Automate (cloud). 
  • Suggested answer
    CU17101343-0 Profile Picture
    12 on at
    Hi, thank you for responding.
     
    I understand your point, but when I initially used Get files property action It did auto create a variable called Getreposnseitems, even the one power automates created had same issue saying it is not list when I tried to pass the variable to for each loop.
     
    also, I don't see the option of apply to each in power automate desktop, so i used For Each thinking it is equivalent
     to apply to each.
     
    attached a screenshot which shows that I am using the Variable which got created automatically.
     
     
  • Suggested answer
    eetuRobo Profile Picture
    4,204 Super User 2025 Season 2 on at
    I think that's because it will return an object type (Connector object).
     
     
    Try something like: GetFileItemsResponse['value'] in your For each loop.
     


    To get values remove the For each for now and run the Get files action. Then you'll see that its not a simple list or data table. It returns something like GetFileItemsResponse['value'][0] 
    So add the For each back and use GetFileItemsResponse['value']

    Then you actually get the properties to your CurrentItem which you can reference easily:

     
    also, I don't see the option of apply to each in power automate desktop, so i used For Each thinking it is equivalent
     to apply to each.
    Sorry I meant For each.
     
     
  • Suggested answer
    CU17101343-0 Profile Picture
    12 on at
     
     
    Hi , thank you for the detailed solution provided on the issue , but as I move forward with the flow where I need to move those files to network drive, I am having an issue when using Copy files(s) action which I did not expect, is there any other option we have to move files to shared drive.
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard