cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Dual Super User
Dual 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!

View solution in original post

6 REPLIES 6
Highlighted
Dual Super User
Dual 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?

Highlighted
Helper II
Helper II

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

Highlighted
Dual Super User
Dual 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!

View solution in original post

Highlighted
Helper II
Helper II

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

Highlighted
Dual Super User
Dual 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')
Highlighted
Helper II
Helper II

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

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

Top Solution Authors
Users online (8,518)