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

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.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (2,631)