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 Apps / Filter SharePoint cont...
Power Apps
Answered

Filter SharePoint contacts list using letter buttons

(0) ShareShare
ReportReport
Posted on by 44

I've created a PowerApp using a SharePoint contacts list as the data source. I'm trying to filter the list by either entering text into a text input field or by clicking a button that corresponds to a letter in the alphabet or a 'See All' button to toggle back to showing all entries. I can't figure out which formula to use in the 'OnSelect' property of each letter button, as well as the 'See All' button. Here's what I'm trying to create:

 

2019-02-18 18_25_09-Window.png

Any help would be greatly appreciated!

Categories:
I have the same question (0)
  • Verified answer
    Mickyw Profile Picture
    47 on at

    Don't use OnSelect and buttons. Just use two galleries:

    • G1 - gallery with all the letters. You can just use list of strings as a Items property. Put label with Text set to This item.Value as the only control in this gallery.
    • G2 - gallery showing contacts. Modify its Items property to use Filter(<original Items>, Starts with(<searched column>, G1.Selected.Value). Add If at the top to accommodate search based on input box (I'm on mobile so I refrain from giving full example) - something like If(!IsBlank(Input.Text), Filter <by input>, Filter <by g1 selected>)

    For "See All" button - you can also use G1 - but you would need to put empty string there and add logic to display "see all" if Value is blank - or - create a separate button and set additional contex variable (call it here: "display_all_contacts") onVisible to true. Then "See All" button would also reset it to "true" but OnSelect on G1 should set it to false. Then add another clause within If under Items of G2 to show entire contact list if "display_all_contacts" is true.

     

    Mick

  • pvanolinda Profile Picture
    44 on at
    Thanks for the suggestion. I'll give that a try!
  • alealbright Profile Picture
    20 on at

    great solution

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard