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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to append array to...
Power Automate
Answered

How to append array to variable?

(0) ShareShare
ReportReport
Posted on by 2,297

This is my flow:


On a previous step, the "Tasks" variable is initalized as an empty array.

 

WebPortal_0-1605904045777.png

 

 

Now, after getting all the stuff from Planner, I apply 2 filters and I want it assigned to the "Tasks" variable.

 

This all seems very logical, but I get the error:

 

BadRequest. The value '[{"@odata.etag":"W/\"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBASCc=\"","planId":"johCFoq4nEyhOcbgjLkzN5YAFYWU","bucketId":"uoRC3WMr70WkaUCOGWZ69JYAJEHv","title":"Reception, validation and account of local suppliers invoices","orderHint":"8585957052767015463","assigneePriority":"8585957052767015463","percentComplete":0,"createdDateTime":"2020-11-20T19:46:48.7760344Z","dueDateTime":"2020-11-20T10:00:00Z","hasDescription":false,"previewType":"automatic","referenceCount":0,"checklistItemCount":0,"activeChecklistItemCount":0,"id":"bjCAp0IHFkyrLFrIRVFEDJYAFeHg","createdBy":{"user":{"id":"25e6bf64-416e-45c2-8350-9f747027d3c5"}},"appliedCategories":{},"assignments":{"25e6bf64-416e-45c2-8350-9f747027d3c5":{"@odata.type":"#microsoft.graph.plannerAssignment","assignedDateTime":"2020-11-20T19:46:48.7760344Z","orderHint":"8585957053367796571P2","assignedBy":{"user":{"displayName":null,"id":"25e6bf64-416e-45c2-8350-9f747027d3c5"}}}},"_assignments":[{"userId":"25e6bf64-416e-45c2-8350-9f747027d3c5","value":{"@odata.type":"#microsoft.graph.plannerAssignment","assignedDateTime":"2020-11-20T19:46:48.7760344Z","orderHint":"8585957053367796571P2","assignedBy":{"user":{"id":"25e6bf64-416e-45c2-8350-9f747027d3c5"}}}}]},{"@odata.etag":"W/\"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBASCc=\"","planId":"johCFoq4nEyhOcbgjLkzN5YAFYWU","bucketId":"4VBW8a5Yq0S_ANzJDVptm5YAFqWM","title":"Data maintenance of master & controle files in MFG-PRO","orderHint":"8585957052771171382","assigneePriority":"8585957052771171382","percentComplete":0,"createdDateTime":"2020-11-20T19:46:48.3604425Z","dueDateTime":"2020-11-20T10:00:00Z","hasDescription":false,"previewType":"automatic","referenceCount":0,"checklistItemCount":0,"activeChecklistItemCount":0,"id":"qiu6A-ZpGkydhZeuGMWw7pYAC-2e","createdBy":{"user":{"id":"25e6bf64-416e-45c2-8350-9f747027d3c5"}},"appliedCategories":{},"assignments":{"25e6bf64-416e-45c2-8350-9f747027d3c5":{"@odata.type":"#microsoft.graph.plannerAssignment","assignedDateTime":"2020-11-20T19:46:48.3604425Z","orderHint":"8585957053372264963P*","assignedBy":{"user":{"displayName":null,"id":"25e6bf64-416e-45c2-8350-9f747027d3c5"}}}},"_assignments":[{"userId":"25e6bf64-416e-45c2-8350-9f747027d3c5","value":{"@odata.type":"#microsoft.graph.plannerAssignment","assignedDateTime":"2020-11-20T19:46:48.3604425Z","orderHint":"8585957053372264963P*","assignedBy":{"user":{"id":"25e6bf64-416e-45c2-8350-9f747027d3c5"}}}}]}]' of type 'Array' cannot be appended to the variable 'Tasks' of type 'Array'. The action type 'AppendToArrayVariable' only supports values of types 'Float, Integer, String, Boolean, Object'.

Categories:
I have the same question (0)
  • Verified answer
    Paulie78 Profile Picture
    8,422 Moderator on at

    It's because it is already an array, and you are trying to append an array to it. What you want is the "Set variable" action. You use append to add additional records on to the end of an existing array. Your existing array is empty.

  • michaelshparber Profile Picture
    111 on at

    @Paulie78 

    Set Variable action requires 1 concurrency in Apply to each loops.

    How to append arrays without using Set?

     

  • Paulie78 Profile Picture
    8,422 Moderator on at

    You cannot, but when you need to do something like this there is a workaround:

    BranchArray.png

    Set unique array variables in the branches, and then when those concurrent steps meet up again. You can union the values, in the above example I did:

    union( variables('smallArray1'),variables('smallArray2'))

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard