cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kannan1
Helper I
Helper I

Setting and getting specific items of an array

Hi,

 

I am using 3 variable to assign values such as below.

 

kannan1_0-1602144080556.png

 

 

and setting it as below.

 

kannan1_1-1602144120045.png

 

I would like to know if this can be changed to an array.

 

and how to get and set the array.

 

normally when I use in flow,  I use a apply to each action. but in this case I would like to use the index to access the values if possible.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @kannan1,

 

If you want to create an array directly, you could use createArray() function to do that.

 

It is possible to use index to access the value of an array, for example, an array is named "TestArray": ["A","B","C","D"]

 

variable('TestArray')[0] = "A"

variable('TestArray')[1] = "B"

variable('TestArray')[2] = "C"

variable('TestArray')[3] = "D"

 

If you could give more details about your requirement, it will help us assist you better.

 

Best Regards,
Community Support Team _ Lin Tu
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-litu-msft
Community Support
Community Support

Hi @kannan1,

 

If you want to create an array directly, you could use createArray() function to do that.

 

It is possible to use index to access the value of an array, for example, an array is named "TestArray": ["A","B","C","D"]

 

variable('TestArray')[0] = "A"

variable('TestArray')[1] = "B"

variable('TestArray')[2] = "C"

variable('TestArray')[3] = "D"

 

If you could give more details about your requirement, it will help us assist you better.

 

Best Regards,
Community Support Team _ Lin Tu
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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (34,326)