cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rowanb
Frequent Visitor

Filter Gallery by Dropdown and Text Input

Im new to Powerapps and have read numerous threads on the same topic but haven't managed to translate it into my app yet. I have a sharepoint list titled PalmersNDDPoints and am trying to filter the records through a dropdown from a collumn titled NDDAREA. Id also like users to be able to search for a specific record (from a SP collumn titled NDDNumber within the same SP list) within the result of the dropdown selection. 

 

Ive managed to make this work individually, but havent been able to combine the two filters. 

The Gallery.Items to filter by dropdown is below.

 

 

 

Filter(PalmersNDDPoints, NDDArea = DropdownSiteAreaSelector.Selected.SiteArea)

 

 

 

with the dropdownsiteselector.items filtering the site area from a different SP list

 

 

 

Filter(NDDSitesAreas, SiteName = DropdownSiteSelector.Selected.Result)

 

 

 

 

The Gallery.Items to filter by text input is below.

 

 

 

If(TextHoleFilter.Text = "Hole ID", PalmersNDDPoints, Filter(PalmersNDDPoints, StartsWith(NDDNumber,TextHoleFilter.Text)))

 

 

 

 

All the SP lists are less than 2000 records, so i dont believe im running into delegation issues?

I have tried the following, but with no luck!

 

 

 

Filter(PalmersNDDPoints,NDDArea = Dropdown1.Selected.SiteArea + NDDNumber = TextInput1.Text)

 

 

 

and

 

 

 

Search(Filter(PalmersNDDPoints, NDDArea = DropdownSiteAreaSelector.Selected.SiteArea), TextHoleFilter.Text,"NDDNumber")

 

 

 

If anyone could help, that would be appreciated.

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @rowanb ,

Based on the formula that you mentioned, I think there is something wrong with it. Please consider modify your formula as below (set the Items property of Gallery to following😞

Filter(
       PalmersNDDPoints, 
       NDDArea = DropdownSiteAreaSelector.Selected.SiteArea,
       If(
          TextHoleFilter.Text = "Hole ID",
          true,
          StartsWith(NDDNumber, TextHoleFilter.Text)
       )
)

 

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
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

hi @v-xida-msft 

 

That formula appeared to work well. 

 

thankyou

 

rowan

View solution in original post

7 REPLIES 7
WarrenBelz
Super User
Super User

Hi @rowanb 

Try

Filter(
   PalmersNDDPoints,
   NDDArea = Dropdown1.Selected.SiteArea &&
   NDDNumber = TextInput1.Text
)

I am assuming of course that these are valid control outputs and they match the type and content of the target field.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

v-xida-msft
Community Support
Community Support

Hi @rowanb ,

Based on the formula that you mentioned, I think there is something wrong with it. Please consider modify your formula as below (set the Items property of Gallery to following😞

Filter(
       PalmersNDDPoints, 
       NDDArea = DropdownSiteAreaSelector.Selected.SiteArea,
       If(
          TextHoleFilter.Text = "Hole ID",
          true,
          StartsWith(NDDNumber, TextHoleFilter.Text)
       )
)

 

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @WarrenBelz 

 

That did the trick (nearly), however only filtered when a value was in the text input.

hi @v-xida-msft 

 

That formula appeared to work well. 

 

thankyou

 

rowan

Hi @rowanb ,

If the solution I provided above could help solve your problem, please consider go ahead to click "Accept as Solution" to identify my reply as Solution.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @rowanb ,

And I would have fixed that when you responded.

Thanks @WarrenBelz . I appreciate your help 🙂

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,315)