
Announcements
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!
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.
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
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']