cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kaladin23
New Member

Path based on Range of numbers

Hey Everyone, 

 

I am just starting to dig into this power automate & am having trouble figuring out how to build this one specifically. 

 

I am connecting a form to an excel sheet which I have done before. The issue is I want the flow to edit different tables based on specific number ranges from the sheet. I tried to use the switch function but that looks for a specific value. 

 

For exampl

If 1-10 is selected it would go down one path

if 11-20 is selected it would go down a different path. 

ect

 

I am having difficulty figuring this out. Does anyone have any tips?

1 REPLY 1
DamoBird365
Super User
Super User

Hi @Kaladin23 

 

Here is one method using a filter.  I have included a lower/higher value but you could just use an upper value, 10,20,30,40 etc as I am using first to retrieve the first object from a filter.  

 

I have a number 16 to route.

And an array of lower/higher values and a table or path.

 

Using a filter we can return the object where 16 is greater than or equal to lower and less that or equal to upper.  You will need to edit in advanced mode:

@AND(greaterOrEquals(outputs('Number'), item()?['Lower']),LessOrEquals(outputs('Number'), item()?['Higher']))

 

Finally retrieve the table name using first() to get the first and only table value.

 

DamoBird365_0-1642017352638.png

 

Please consider accepting my answer as a solution if it helps to solve your problem.

Cheers
Damien

Please take a look and subscribe to my YouTube Channel for more Power Platform ideas and concepts, or take a look at my website. Thanks

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (3,020)