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 / Gallery to display dis...
Power Apps
Answered

Gallery to display distinct results with Textbox

(0) ShareShare
ReportReport
Posted on by 53

Hello,
I am trying to display distinct results in a gallery via textbox input.

The text box allows for either the SIN or Last Name to be used to search the MFDANotes table. My table is sitting in dataverse.

This is what I have so far in the Gallery Items
Filter(MFDANotess, StartsWith(SIN, FilterBox.Text) || StartsWith(Last_Name, FilterBox.Text))

 

I've tried:

Distinct(Filter(MFDANotess, StartsWith(SIN, FilterBox.Text) || StartsWith(Last_Name, FilterBox.Text)), SIN)

with no result.

Thanks

Adrian

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    154,951 Most Valuable Professional on at

    Hi @adrianlochan ,

    This will get you unique records on the combination of Last_Name and SIN with all the other fields in the Group in the Data Table field.

    GroupBy(
     Filter(
     MFDANotess, 
     StartsWith(
     SIN, 
     FilterBox.Text
     ) || 
     StartsWith(
     Last_Name, 
     FilterBox.Text
     ),
     "Last_Name",
     "SIN",
     "Data"
     )
    )

    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.

    Visit my blog Practical Power Apps

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @adrianlochan ,

    I took a different approach and put this formula in the OnChange property of the Textinputbox.  I put a magnifying glass icon next to the box to prompt the user to leave the textinput box. 

    ClearCollect(
     rslt,
     Distinct(
     Filter(
     MFDANotess,
     StartsWith(
     SIN,
     FilterBox.Text
     )
     ),
     SIN
     )
    );
    Collect(
     rslt,
     Distinct(
     Filter(
     MFDANotess,
     StartsWith(
     Last_Name,
     FilterBox.Text
     )
     ),
     Last_Name
     )
    )

    The Items property of the Gallery was simply rslt and a single label control with Text property Result.  
    !1.jpg

     

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard