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

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
Community Support

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

3 REPLIES 3
Community Support
Community Support

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

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 "@".

worked perfectly! 

Thanks,

Hasan

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (20,814)