cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dhiran
Level: Powered On

Accessing Array elements

I have a flow which looks at incomng email from a specific address and creates an array of the subject heading using the Split command. I would like to the 2nd element of the array in the next step to create an calendar event. 

 

If i just place the arrary in the next element I can see the following structure ["Text element 1","Text element 2"] 

 

Is there a way I can get only "Text Element 2" in my next step.

 

Here is a screen shot of steps

Split Command.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Accessing Array elements

Hi @Dhiran,

Please take a try with the following workaround:

  • Add Variables-> Initialize variable action after “Compose” action, Name set to TextArray, Type set to Array, Value set to output of “Compose” action.
  • In “Create event (V2)” action, type the following formula in Subject parameter:
@variables('TextArray')[1]

Image reference:2.JPG

 

The flow works successfully as below:3.JPG

 

Best regards,

Kris

Community Support Team _ Kris Dai
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

2 REPLIES 2
Community Support Team
Community Support Team

Re: Accessing Array elements

Hi @Dhiran,

Please take a try with the following workaround:

  • Add Variables-> Initialize variable action after “Compose” action, Name set to TextArray, Type set to Array, Value set to output of “Compose” action.
  • In “Create event (V2)” action, type the following formula in Subject parameter:
@variables('TextArray')[1]

Image reference:2.JPG

 

The flow works successfully as below:3.JPG

 

Best regards,

Kris

Community Support Team _ Kris Dai
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

Dhiran
Level: Powered On

Re: Accessing Array elements

Hi @v-xida-msft (Kris) that worked so thank you. The only issue was the expression would not take the "@" symbol but I could just addd the line without the "@".

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,555)