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 / how to merge two arrays
Power Automate
Unanswered

how to merge two arrays

(0) ShareShare
ReportReport
Posted on by 8

Hi,
Im beginner of  power automate.
Im also japanese and not good at English.

・Question
I would like  to merge the following two arrays.
Arrays1・・・this array is composed of varriables that is appended from  List rows present in a table

{
    "name": "excel",
    "value": "test1@test.onmicrosoft.com"
    "name": "excel",
    "value": "test2@test.onmicrosoft.com"
    "name": "excel",
    "value": "test3@test.onmicrosoft.com"
}

Arrays2・・・this array is composed ofof varriables that is appended from List folder

{
    "name": "sharepoint",
    "value": "ID1"
    "name": "sharepoint",
    "value": "ID2"
    "name": "sharepoint",
    "value": "ID3"
}
※Arrays are dynamic variable

Because i would like to use two arrays for Grant access to an item or a folder
ID = Arrays2
Recipients = Arrays1

beginner_PA_0-1662539181164.png
For that reason, please tell me the process.

Categories:
I have the same question (0)
  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @beginner_PA  Use append to array variable.

    Hardesh15_0-1662535863062.png

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

     

  • beginner_PA Profile Picture
    8 on at

    Thank u for reply
    I was bad at communicating.
    I modified the question slightly.
     i would like to use two arrays for Grant access to an item or a folder

    ID = Arrays2
    Recipients = Arrays1

    beginner_PA_0-1662539568297.png

     Could u tell me the solution..

  • srduval Profile Picture
    1,760 Moderator on at

    Are you looking to "stack" or union your two arrays, or "join" them so when recipient ID in array 1 equals ID in array 2 show information from array 1 and 2 together in the same row?

     

    Array 1

    RecipientID Name
    123 Billly

     

    Array 2

    ID LastName
    123 Bob

     

    Desired outcome

    RecipientID FirstName LastName
    123 Billy Bob 

     

     

    @Hardesh15 correct me if i'm wrong but I don't believe you can join arrays in power automate. Without an series of apply to each for each value from each array correct?

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @srduval  Yes,You can join two array using xml ways without any loop. 

    @beginner_PA  If you want to join array then column key must be present in both array other wise you will end up in loop inside loop.

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

     

  • srduval Profile Picture
    1,760 Moderator on at

    @Hardesh15  You have an example handy for the XML join? I've come across this scenario a couple times and I usually just kick it over to SQL to join and return. A flow based solution could be useful for small jobs.

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @srduval  will share details tomorrow.

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • beginner_PA Profile Picture
    8 on at

    @srduval
    @Hardesh15

    Below is Excel Table

    No.nameaddless
    1test1test1@test.onmicrosoft.com
    2test2test2@test.onmicrosoft.com
    3test3test3@test.onmicrosoft.com


    Below is folder created on sharepoint 

    beginner_PA_0-1662598143404.png

    column of name on table and folder name  are same.
    Desired outcome(arrays3)

    NameaddlessID
    test1test1@test.onmicrosoft.com1
    test2test2@test.onmicrosoft.com2
    test3test3@test.onmicrosoft.com3

     ※ID is not "No." on excel table. It is unique identifier of the folder 
    i think i can do Grant access to an item or a folder by using arrays3 

  • Verified answer
    Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @srduval I have written article on this. Pls check.

    How to merge two arrays in Power Automate without apply to each? | Gopenly

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • srduval Profile Picture
    1,760 Moderator on at

    Good blog, I like how you used the notes to show the formulas. 

     

    @beginner_PA I think @Hardesh15 blog above will help do what you need

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @srduval click on three dots and click add a note.

    Hardesh15_0-1662725622696.png

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard