web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

PA that checks if numbers are bewteen a range and generates a email

(0) ShareShare
ReportReport
Posted on by 19

Good day all

 

Building a PA automated cloud flow that is kicked off via SPO when a item is created in a list.

 

Step One: Item is created generates email notification

 

Step Two: i created two variables Variable one houses float 0.00 Variable Two houses 99.99

JDGreen_0-1705587014182.png

I then have a condition using the OR function i am checking to see if any of the items match, basically want it to check if variables greater than 0 but less than 99.99 if so generate a email.  

JDGreen_1-1705587157732.png

I then have a email that kicks off. i then initialie another two variables to one which house 100.99 and another house 249.99

JDGreen_2-1705587378609.png

I then have another condition using OR which checks conditions in this regard i am trying to have a email sent out if a float is bewteen 100.00 and 249.99

JDGreen_3-1705587579300.png

I then have another step after the this which intializes a variable only one which house the float 250.00 i then have a condition 

what i am trying to achieve here is that if the float is 250.00 and higher a email is generated

 

The problem i have is that when i do a input for say 147.89 i get the email for the less than 100.00 for a float that is above 250.00

i get the email that is associated to the other conditions.

 

 

Below is the last run i did the float i put in was 349 i got all the emails for the other conditions except the correct email 

JDGreen_4-1705587969778.png

I know i am missing something here but what and how do i fix this?

 

Thanks 

 

 

 

I have the same question (0)
  • wskinnermctc Profile Picture
    6,519 Moderator on at
    Re: PA that checks if numbers are bewteen a range and generates a email

    It is a little hard to tell what exactly you are doing, but I think I understand the concept.

     

    You need to double check your logic for the conditions, especially when using AND/OR along with the groups.

     

    For example, the condition "Condition email one 2" is using OR with no grouping. So it is looking for any true statement in all of those checks in order for the overall Condition to be true. Only 1 true statement from the entire 9 checks will cause the condition to be true.

    So if your value is 150.

    • Workflow..? is greater than 0to99 - (the variable 0to99 is 0, so you are asking is the value 150 greater than 0) - true
    • Workflow..? is less than or equal 1to99 - (the variable 1to99 is 99.99, so you are asking is the value 150 less than or equal 99.99) - false

    You basically asked:

    • Is 150 greater than zero? - true
    • Is 150 less than 99? - false

    The OR condition only needs 1 true statement. This condition will always be true since it only needs one of the statements to be true and you are basically comparing all numbers.

     

    These are all the same outcomes:

    Example 1: OR Condition - (0)

    • Is 0 greater than zero? - false
      • OR
    • Is 0 less than 99? - true

    Example 1 Outcome = true

     

    Example 2: OR Condition - (9876)

    • Is 9876 greater than zero? - true
      • OR
    • Is 9876 less than 99? - false

    Example 2 Outcome = true

     

    Example 3: OR Condition - (-98)

    • Is -98 greater than zero? - false
      • OR
    • Is -98 less than 99? - true

    Example 3 Outcome = true

     

    Most likely the condition using all OR will always be true since any number will provide a true statement for either of the questions. I guess the only way it could be false is that if all the values were blank.

     

  • JDGreen Profile Picture
    19 on at
    Re: PA that checks if numbers are bewteen a range and generates a email

    @wskinnermctc thank you for the feedback.

    So using Or will not work for scenario, what would be the best way to achieve this. My ultimate goal is this

     

    User Input = 0.00 - 99.99 If user inputs a balue bewteen this range then generate a email but if not skip and move to check next step below

     

    User input = 100.00 - 249.00  If user inputs a value bewteen this range then generate a email but if not skip and move to check next step

     

    User Input= 250.00 and greater. If user inputs a value bewteen this range then generate a email

     

    So what is happening currently is that i will input 150.00 and ill get the mail for the second step but i will also get the emial for the 250 and greater, in some instances i will get all three emails. 

     

    Thanks 

     

     

     

     

     

  • Verified answer
    wskinnermctc Profile Picture
    6,519 Moderator on at
    Re: PA that checks if numbers are bewteen a range and generates a email

    @JDGreen what you are trying to do is relatively simple. You just need to go through logically what the AND/OR

    You just need to understand the basic function of AND / OR

     

    OR - if any values returns a true result, the overall statement is true

    • or(false, false, true, false) = overall OR statement is true
    • or(true, true, true, true) = overall OR statement is true
    • or(false, false, false, false) = overall OR statement is false

    AND - all values must return a true result, the overall statement is true

    • and(false, false, true, false) = overall AND statement is false
    • and(true, true, true, true) = overall AND statement is true
    • and(false, false, false, false) = overall AND statement is false

     

    Now if you nest/group the AND OR

     

    or( and(false, false, true, false), and(true, true, true, true), and(false, false, false, false) ) = overall OR statement is true

     

    and( or(false, false, true, false), or(true, true, true, true) ) = overall AND statement is true

     

    and( or(false, false, true, false), or(true, true, true, true), or(false, false, false, false) ) = overall AND statement is false

     

    Here are some examples

     

    Condition AND to check if value is between a rangeCondition AND to check if value is between a rangeResult Condition AND to check if value is between a rangeResult Condition AND to check if value is between a rangeCondition OR to check if value is less than 10 OR greater than 100Condition OR to check if value is less than 10 OR greater than 100Result Condition OR to check if value is less than 10 OR greater than 100Result Condition OR to check if value is less than 10 OR greater than 100Condition AND to check if color is Green AND value is between 0 AND 100Condition AND to check if color is Green AND value is between 0 AND 100Result Condition AND to check if color is Green AND value is between 0-100Result Condition AND to check if color is Green AND value is between 0-100Condition OR to check if color is Green OR if value is between 0-100Condition OR to check if color is Green OR if value is between 0-100Result Condition OR to check if color is Green OR value is between 0-100Result Condition OR to check if color is Green OR value is between 0-100

  • JDGreen Profile Picture
    19 on at
    Re: PA that checks if numbers are bewteen a range and generates a email

    @wskinnermctc thank you for the detailed explanation is really helpful i should be able to get to the answer i am looking for using what you have sent me, once again thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 788 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 452 Moderator

#3
developerAJ Profile Picture

developerAJ 302

Last 30 days Overall leaderboard