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

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

@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!

View solution in original post

6 REPLIES 6

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


@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

@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!

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

Hey @CameronTCD 

 

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

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

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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (2,304)