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 / Get item where variabl...
Power Automate
Answered

Get item where variable is between Min and Max range

(0) ShareShare
ReportReport
Posted on by 88

Hey community,

 

I have a question regarding a flow I want to build where we get a single item that is matching between a range, for context:

I have a Power App that I have build to help users match their level within a game.

In the app I have no data source for now but I do have a instant button flow with a Power Apps trigger.

 

There is a text input where you input your game score and press the submit button where the flow is attached, then a flow runs and in the flow I have a sharepoint list with 3 columns (Level,Min Score,Max Score). Based on that I want to get the item where the user input is between the Min Score and Max Score range and return it(the Level) in the Power App.

In the range list, I have around 8-9 items with different ranges

What do you propose I do to achieve my goals?

Thanks in advance!

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @StanP,

     

    You could use a Filter query for this in the Get Items action.

     

    Below is an example.

     

    1. The SharePoint list with the Level (Title), Min Score & Max Score.

     

    minmaxscorelist.png

    2. The Power App with a button which runs a flow with a game score.

     

    Button1

    Set(Result,'1667071-GetitemwherevariableisbetweenMinandMaxrange-flow'.Run(TextInput1.Text))

     

    Label1

    Result.level

     

    powerapps_getlevel_minmaxscore.png

     

    3. The flow which consumes the score and filters for the correct level.

     

    OData Filter Query

    (MinScore lt @{triggerBody()['number']}) and (MaxScore gt @{triggerBody()['number']})

     

    Expression for Level output variable

    first(outputs('Get_items')?['body/value'])['title']

    getlevel_minmaxscore.png

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard