cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Getting variable value from an array variable

This is difficult to explain in words.  I'm trying to get a value for a single variable in an array.  I would like to avoid using Parse JSON, because its a pain to mess with.  I would like to use expressions.  Any ideas? @RezaDorrani , you just helped me getting to this point.  I think this is an easy one.

 

Here is the value of my array variable PendingECNs:

 

image.png

 

I need to pull out ECNID for each line in the array, to use in the Get Item 'ID' field.  any way to get this with an expression?

 

image.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Getting variable value from an array variable

@martinav 

 

Assuming PendingECNs is variable of type array which has objects which includes the ECNNumber 

 

For loop the array

and once again just use the item() property to get context of current item

and then to fetch the value from the currently indexed item object

 

use item()?['ECNID']

 

? - checks if the node exists in the object

ECNID - is the name of the node in your object

 

Regards,

Reza Dorrani

 

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

Highlighted
Super User
Super User

Re: Getting variable value from an array variable

@RezaDorrani ,

 

Simple as that!  I figured you would have it in a second.

 

Here is what it looks like.

 

image.png

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Getting variable value from an array variable

@martinav 

 

lets do this Smiley Happy

Super User
Super User

Re: Getting variable value from an array variable

@martinav 

 

Assuming PendingECNs is variable of type array which has objects which includes the ECNNumber 

 

For loop the array

and once again just use the item() property to get context of current item

and then to fetch the value from the currently indexed item object

 

use item()?['ECNID']

 

? - checks if the node exists in the object

ECNID - is the name of the node in your object

 

Regards,

Reza Dorrani

 

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

Highlighted
Super User
Super User

Re: Getting variable value from an array variable

@RezaDorrani ,

 

Simple as that!  I figured you would have it in a second.

 

Here is what it looks like.

 

image.png

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 278 members 3,448 guests
Please welcome our newest community members: