Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Working with Array

(0) ShareShare
ReportReport
Posted on by

Hi,

I would like to create an array out of a SharePoint List, which should look like :

 Table.PNG

Once I will load this into an array, I would need to get data from another list, which holds the ID (but not the Status), in order to get the status from the array.

I am realy having problems with the syntax :

1. If I need to create an arry with those 2 fields (ID and Status) - do I need to use the expression createarray() while initilizing the array? If so - what is the syntax?

2. While perfoming the "For Each" on the SharePoint List for appending the fileds to the array - can I just use "Append to Array"  and use [Field1],[Field2], or do I need to use the compose? If so - whay syntax do I need?

3. Last - How do I search the array for a specific ID (let's assume the ID is a variable) and get the status? For example - I have in variable the value "3"Flow 2.PNGFlow 3.PNGFlow1.PNG and I would like to get "Approved" for it.

 

Thanks a lot!

Gadi.

  • Verified answer
    v-bacao-msft Profile Picture
    on at
    Re: Working with Array

    Hi @GadiLahav,

     

    I am afraid I don't understand some points you mentioned.

     

    Do you want to get data from the SharePoint List and create an array?

     

    And why do you assume the ID is a variable?

     

    Could you please provide more details about the Flow you want to create?

     

    I did some tests on my side, I don't know if it is what you think.

     

    Create an array value using the value of Select Output. Because it is JSON format, you could use Parse JSON to get the value of ID or Status after creating the array.

     

    Image reference:

     

    27.PNG

     

    29.png

    28.PNG

     

    For the contents of the Parse JSON schema, you can first output the value of the Select action and follow the screenshot below.

     

    32.PNG

    33.PNG

     

    The flow works successfully as below:

    31.PNG

     

     

     

    Please take a try.

     

    Best Regards,

    Barry

     

     

     

     

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492