cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rajatchamria
Regular Visitor

Condition Always returning FALSE in comparing integers

Here's a part of my flow, I want to control the execution of the last step (not in the screenshot), to run every 3 hours. 

  1. First I introduced Compose - "Pacific Standard Time - Hour", that gave me the "HH"  of the current time. Then I tried to compare the Output of that step in the Condition, but the condition always returned false. I figured, may be the data-type doesn't match and I am comparing the string "06" with integer 6.
  2. Then I introduced "Hour to Int", to parse the number out of the string "HH" and my conditions are still failing. 

So I have two questions. Why does my condition fail? and then Is there a way of simplifying the condition to something like Output in (0, 3, 6, 9, 12, ... , 21)

 

rajatchamria_1-1620178199879.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @rajatchamria ,

You can keep all the 0,3,6..21 value into an array variable and you can use contains to simplify the condition. 

Please refer the below screenshot.

 

muralidharan_0-1620193656454.png

 

Hope this helps.

 

Thanks,

Murali

 

View solution in original post

4 REPLIES 4
rajatchamria
Regular Visitor

Never mind, the flow started working fine on its own. It failed the comparison at 18:00 hours, but at 21:00 it passed. I didn't change anything. 

 

I'll monitor it for a day to see the run around rthe clock. 

I am still interested in knowing how to simplify the condition 

Hi @rajatchamria ,

You can keep all the 0,3,6..21 value into an array variable and you can use contains to simplify the condition. 

Please refer the below screenshot.

 

muralidharan_0-1620193656454.png

 

Hope this helps.

 

Thanks,

Murali

 

View solution in original post

Thank you Muarlidharan. The Array-Contains-HourInteger works better. 

 

I noticed my original multi-row condition worked only half of the time, and I don't know why. It failed for 12:00 and 15:00 and 18:00 hours. 

rajatchamria_0-1620252689349.png

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,355)