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
yashag2255
Dual Super User II
Dual Super User II

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!

View solution in original post

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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (77,237)