cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Condition between two number values

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

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 Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Dual Super User II
Dual Super User II

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!

Super User II
Super User II

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

Community Support
Community Support

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 Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

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

Anonymous
Not applicable

@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

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (5,667)