cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: Condition between two number values

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
Highlighted
Dual Super User III
Dual Super User III

Re: Condition between two number values

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!

Highlighted
Super User II
Super User II

Re: Condition between two number values

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

Highlighted
Community Support
Community Support

Re: Condition between two number values

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

Highlighted
Anonymous
Not applicable

Re: Condition between two number values

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

Highlighted
Anonymous
Not applicable

Re: Condition between two number values

@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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,743)