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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Condition between two ...
Power Automate
Answered

Condition between two number values

(0) ShareShare
ReportReport
Posted on by

Hi, 

 

I'm building a flow with three conditions. The first and last are fine but my middle condition wont load. Here are the conditions:

 

0-100, first condition

101-1000, second condition

1001, thrid condition

 

The first condition is less then 100, this works fine.
@and(greaterOrEquals(triggerBody()?['Numbercolumn'], '101'),lessOrEquals(triggerBody()?['Numbercolumn'],'1000'))
The last condition is greater then 1000, this works fine.

 

I cant save the expresion, does someone sees what is the mistake here?

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    Please see the screenshot below: 

    ldjl.png

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    @Anonymous 

    Hi there.  I'm not great with expressions, but I messed around a bit and got this to work in the expressions box:

     

    and(greaterOrEquals(triggerBody()['number'],101),lessOrEquals(triggerBody()['number'],1000))
     
    Since you're dealing with integers, it might not like the single quotes around the values?
    Try it out and less us know.
    -Ed-
     

    If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

  • Verified answer
    v-yamao-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    I agree with what @edgonzales  suggested.

     

    When comparing numbers, we don’t need to surround the number with a single quote. Besides, we should provide matched types within an expression.

     

    I have tested likes below, which is working properly.

     

    The function used in the left side of the condition is:

    and(greaterorequals(triggerBody()['Number'],100),lessOrEquals(triggerBody()['Number'],1001))

    1.PNG

     

    Besides, you mentioned that you cannot save the expression, what’s the error message returned when you try saving?

     

    Best regards,

    Mabel        

      

  • Community Power Platform Member Profile Picture
    on at

    Hi,

     

    First, thank you for your time and examples, they look very well. When i test the flow with the trigger, the output is not right. See my examples, i start with the value 1500 but the flows output is less then 100, that doenst seems right. 

    I just copied the flow. In the last picture, i put the numbercolumn there, i think i have to check the number with the SharePoint information. This is the proces.

    List in SP
    3 sorts of value, it is not a choice column because people has to choose every number the want to choose.

    0-100 range = workflow 1

    101-1000 range = workflow 2 

    1000+ range = workflow 3

     

    For every range i will send a different email. Hope everything is clear to you.Flow2.pngFlow.pngFlow3.png

  • Community Power Platform Member Profile Picture
    on at

    @v-yamao-msft  your expressions works fine! So i can fill in the number between 101-1000 and it works fine. Now i need to clean up the flow and convert it with my number column. So when someone fill in the value in the SharePoint list, the right flow needs te run.

     

    Thanks all for your help. Because of you and the help of the forums i will keep better in Flow 🙂Flow7.pngFlow6.pngFlow5.png

  • Rassyboy Profile Picture
    4 on at

    I have a flow that uses HTTP connector to pull data from a table and from that table i have a column that has data values in rows .. I am trying to set 3 conditions for that column that says 

     

    1. i want numbers that fall within the range of 1-30 inside that column 

    2. i want numbers in that column that fall within the range of 31-60

    3. and finally 61-90. My usage of expressions is not so great . Can anyone help please 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard