cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GadiLahav
New Member

Working with Array

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.

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

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

 

 

 

 

 

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

View solution in original post

1 REPLY 1
v-bacao-msft
Community Support
Community Support

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

 

 

 

 

 

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

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (2,796)