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

How to see the result of an expression or formula in a flow?

This may be a 100% noob question. I spent the better part of an hour coming up with the below formula to allow me to test the time and only further process the flow if it is after 4pm (or 16 hours)

 

int(substring(convertFromUtc(utcNow(),'Pacific Standard Time'),11,2))

The issue is it took me a long time to figure out why it was failing to work properly. I was guessing what the convertFromUtc() was returning based on the help pages, then figuring out what the substring() was returning because I finally figured out it starts at 0 and not 1, etc.

 

I could have saved myself about 30min easily if there was a box or a way to just key that formula in and press {ENTER} and get a result to see if it is what I need. Instead I had to keep testing the flow and then looking at the error messages. Very time consuming. Is there an action, or something that can help, or is this in the UI somehwere and I just don't know it?

4 REPLIES 4
Dual Super User
Dual Super User

Re: How to see the result of an expression or formula in a flow?

Hi @EdHansberry 

 

expressions are evaluated at run time and hence you can only say the results after the Flow has run

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Dual Super User
Dual Super User

Re: How to see the result of an expression or formula in a flow?

To add to what @RezaDorrani is saying.  If you look at the run history for a Flow you can normally open up an action and see the actual input and output values that the action is using.  If the action fails then sometimes you can't see the values.  In that case I use a variable to expose the value just prior to the action that is failing.  You do have to run the flow to get the values to populate, but after the run you can see the actual value results from a formula



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
EdHansberry
Level: Powered On

Re: How to see the result of an expression or formula in a flow?

How would I use a variable to do that? For example, in building my formula, I would want to see what:

convertFromUtc(utcNow(),'Pacific Standard Time')

generated, then I could work up to 

int(substring(convertFromUtc(utcNow(),'Pacific Standard Time'),11,2))

step by step.

 

Ideally I'd like a msgbox action similar to msgbox in VBA that lets me just print to screen the result of something in testing.

Dual Super User
Dual Super User

Re: How to see the result of an expression or formula in a flow?

Flow doesn't have a UI, so there is no message box availabe.  You have to generate a variable and initialize it for the formula that you want.  Then run the Flow and you can examine the variable to see the value.  The variable will probably be a string so I would use this for your test formula.

formatformatDateTime(convertFromUtc(utcNow(),'Pacific Standard Time'),'dd/MM/yyyy HH:mm')


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

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 (Last 30 Days)
Users online (4,909)