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

Why can't I use my outputs as choices?

I have created a flow that has output dates (highlighted in red) however they aren't available in the choices section?

 

May be a rookie mistake however I'm unsure why this is the case.

 

Help would be appreciated

 

468.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Why can't I use my outputs as choices?

@CameronTCD The output of a filter array type is always an array. So that is why the outputs are not showing there as you need a type text string over there. What you can do is, create a string type variable and put the value of the data operation into the string type variable and reference the string variable in the send email with options part. 

 

For example, refer to the screenshot below: 

qq.png

 

Here the expression in the variable is: 

first(body('Filter_array'))

The first element of the array that was created in the Filter Array operation. 

 

Hope this Helps!

6 REPLIES 6
Super User
Super User

Re: Why can't I use my outputs as choices?

Hi @CameronTCD  What is the datatype of the compose actions? What values are you looking for to put in the choices options?

CameronTCD
Level: Powered On

Re: Why can't I use my outputs as choices?


@yashag2255 wrote:

What values are you looking for to put in the choices options?


The 'Get Calender' filters future events by subject (ProjectWise Training) and takes the first four.

Top level filter:Capture 2.PNG

 

Second level filter:Capture.PNG

 

Essentially the top two filters take each of the four dates&times from 'Get Calendar' and seperates them into four outputs.

 

I want the options in the email to be the four different dates.

 

edit: I have also tried to use a condition however it always jumps inside of an 'Apply to each' which seems to be the problem as appears that they can't be used as dynamic content. 

I may be wrong

Super User
Super User

Re: Why can't I use my outputs as choices?

@CameronTCD The output of a filter array type is always an array. So that is why the outputs are not showing there as you need a type text string over there. What you can do is, create a string type variable and put the value of the data operation into the string type variable and reference the string variable in the send email with options part. 

 

For example, refer to the screenshot below: 

qq.png

 

Here the expression in the variable is: 

first(body('Filter_array'))

The first element of the array that was created in the Filter Array operation. 

 

Hope this Helps!

CameronTCD
Level: Powered On

Re: Why can't I use my outputs as choices?

That's great thank you.

 

However I overlooked that the outputs that I have currently filter out the four seperate events but not down into their times

 

How do I grab specifically the start times before they go into the init variable?

 

rUeLjca.png

Super User
Super User

Re: Why can't I use my outputs as choices?

Hey @CameronTCD 

 

Can you try using the following expression for the string variable :

formatDateTime(first(body('Filter_array')['Start']),'dd/MM/yyyy')
CameronTCD
Level: Powered On

Re: Why can't I use my outputs as choices?

Hi @yashag2255 

 


Can you try using the following expression for the string variable :

formatDateTime(first(body('Filter_array')['Start']),'dd/MM/yyyy')

This didn't work (see right column) 

 

POveJYx.png

 

The solution however still comes from your suggestion.

 

I kept the variable as:

first(body('C_-_OP2'))

However added a compose that referenced it:

formatDateTime(variables('E - OP2'),'dd/MM/yyyy')

 

Thank you very much for your help.

 

Regards,

Cameron

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

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

Top Kudoed Authors
Users Online
Currently online: 316 members 4,334 guests
Please welcome our newest community members: