web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter dropdown by int...
Power Apps
Answered

Filter dropdown by integer

(0) ShareShare
ReportReport
Posted on by 224

Please help. I have a drop down that I would like to filter from a SharePoint List, 'Provider_Resource_Guide'. 
AR Start and AR End are number columns w/in SharePoint. If the user types into 'TextInput1' a range that falls between these two numbers, I would like the 'Name (Title)' to return distinct if valid. 

This is my formula
Distinct(Filter(Provider_Resource_Guide, 'AR Start' >= TextInput1.Selected.Value) || Provider_Resource_Guide, 'AR End' < TextInput1.Selected.Value) ,'Name (Title)')

 

Please let me know what I'm doing wrong. Thank you!

Categories:
I have the same question (0)
  • mmollet Profile Picture
    3,187 on at

    You are saying if it is greater than value1 or less than value 2 and what I think you want is if it is greater than value 1 AND less than value 2. 

     

    TextInput1 Value: 80, AR Start: 50, AR End: 100

    Your logic: If( 50 >= 80 Or 100 < 80) -> false Or false = false

     

    TextInput1 Value: 30, AR Start: 50, AR End: 100

    Your logic: If( 50 >= 30 Or 100 < 30) -> true Or false = true

     

    If you want the value to be in the middle for example with the last value of 30 the logic would be:

    If(50 <= 30 And 100 > 30) -> true And true = true

    Lets convert the above back into logic. The 50 was ARStart, the 100 was AREnd and the 30 was TextInput1 so:

    If(ARStart <= TextInput1 And AREnd > TextInput1)

     

    Try that and see if it works for you! 

  • TheRobRush Profile Picture
    11,128 Moderator on at

     

    edit

     

    ignore this had to edit

     

    Can you show an example of what you mean by typing a range into a text input, that's very not standard

     

  • mmollet Profile Picture
    3,187 on at

    I assumed what he meant was the user types a number that has to be in the range that he sets. This is what my 'solution' or answer was assuming. If you want the user to type in a range like 50 - 100 then you would need to do the following I would think

    Starting input -> 50 - 100

    Remove spaces with trim -> 50-100

    Split on "" -> ["50","-","100"]

    Take Value(First(SplitOutput)) to get 50

    Take Value(Last(SplitOutput)) to get 100

     

    then do similar steps to what I posted in my first comment. 

  • kgiles123 Profile Picture
    224 on at

    We want the ability to type in the patient's age into 'TextInput1'. For example, "10" then return all 'Name (Title)' items from the list into the filtered dropdown that have a numeric value that is greater than 'AR Start' (example: 0) and less than 'AR End' (example: 200). Sorry for the original poor explanation. 

  • TheRobRush Profile Picture
    11,128 Moderator on at
    Distinct(
     Filter(
     Provider_Resource_Guide, 
     'AR Start' >= Value(TextInput1.Text) 
     && 
     'AR End' < Value(TextInput1.Text)),
     'Name (Title)'
     )
  • kgiles123 Profile Picture
    224 on at

    Thanks for this. I'm not returning an error but I'm not getting any values either when I plug a number into TextInput1. 

  • TheRobRush Profile Picture
    11,128 Moderator on at

    try this first, see if it works, and if so we can add the distinct

    Filter(Provider_Resource_Guide,
    And('AR Start' >= Value(TextInput1.Text), 'AR End' < Value(TextInput1.Text)))
  • kgiles123 Profile Picture
    224 on at

    no luck... signing off for the evening. Thanks for the help. 

  • Verified answer
    TheRobRush Profile Picture
    11,128 Moderator on at

    Apologies, it should have been

    Distinct(
     Filter(
     Provider_Resource_Guide, 
     'AR Start' <= Value(TextInput1.Text) 
     && 
     'AR End' >= Value(TextInput1.Text)),
     'Name (Title)'
     )
  • kgiles123 Profile Picture
    224 on at

    Thank you!!! That did it!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 94

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard