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

Array Variable cannot be found in Dynamic Content

In my flow, I create an array (VacationStartDates) using Initialize Variable. Then, I have a ForEach loop that appends dates into the VacationStartDates array. After the ForEach loop finishes, I have Send an Email action, but in there I cannot find the VacationStartDates array.

 

FireShot Capture 4 - Edit your flow I Microsoft Flow_ - https___asia.flow.microsoft.com_man.png

4 REPLIES 4
Super User
Super User

Re: Array Variable cannot be found in Dynamic Content

How would you like this array to be displayed?

 

An Array cannot be displayed as text. You would have to convert this array to text first. I would probably append the text representation of the dates a to string varibale rather than an array.

deddyandy
Level: Powered On

Re: Array Variable cannot be found in Dynamic Content

I want store the dates into a variable and later want to display them in an email.

 

I am building a vacation system. To be more precise, let me give the following scenario:

 

An employee has made 2 vacation requests:

 

1. - Vacation Start Date: December 3rd.

    - Vacation end Date:  December 7th.

 

2. - Vacation Start Date: November 26th.

    - Vacation end Date:  November 27th.

 

Now he is requesting the 3rd request, the Flow will email his manager telling that he has already 2 requests:

 

1. From December 3rd to December 7th.

 

2. From November 26th to November 26th. 

 

It's very easy to do in programming languages. I don't know how to do it in Flow. Even I don't know how to access items in an array.

 

Thank you.

 

 

Community Support Team
Community Support Team

Re: Array Variable cannot be found in Dynamic Content

Hi @deddyandy,

 

I assume that you may need to use a Variables function to get the corresponding dynamic content.

I have made the following test, please check it for a reference.

It is triggered by When an item is created.

Initialize variable 2 and variable 3 for VcacationStartDate and VacatioEndDate.

Then the Get items action. Instead of using a Condition, I use Filter query to get the specific Title.

Add an Apply to each, add two Append to array variable actions for StartDate and EndDate.

Under Apply to each, add action Send an email. To get the StartDate and EndDate array, use the Variables function likes below:

variables('VacationStartDate')

Images for your reference.

1.PNG2.PNG

Please take a try with it on your side.

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
deddyandy
Level: Powered On

Re: Array Variable cannot be found in Dynamic Content

Hi @v-yamao-msft,

 

Thank you for the Variables function, but the Flow has an error in Filter Query.

 

Capture21.PNG

The error is:

Capture19.PNG

The following is the List columns:

Capture20.PNG

Thank you.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 186 members 5,661 guests
Recent signins:
Please welcome our newest community members: