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

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Top Kudoed Authors
Users online (3,521)