cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EdHansberry
Kudo Collector
Kudo Collector

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

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

Pstork1
Dual Super User III
Dual Super User III

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.

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.

Pstork1
Dual Super User III
Dual Super User III

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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,177)