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 / function Search with G...
Power Apps
Answered

function Search with Groupby?

(0) ShareShare
ReportReport
Posted on by 997

Hello,

No idea what we are doing wrong
But i like to add groupby on field_7
With the function Search because it shows me everything we use in a search criteria
Not with startswith i don't get all my results.
So i used before without groupby
And that works well, except i get duplicated field_7 names

Search(

 Filter(
 [@colMyList2];field_3
 )

 ;
 SearchInput_1.Text;
 "field_7";
 "Title";
 "field_1";
 "Lastname";
 "Firstname"
)

So to prevent that i want to try it with groupby
But seems it won't show me everything from my search criteria
Only when you write it as been stored in the colMyList2

GroupBy(
 Search(
 Filter(
 [@colMyList2]; field_3;
 field_7 in SearchInput.Text || 
 Firstname in SearchInput.Text ||
 Lastname in SearchInput.Text ||
 Title in SearchInput.Text ||
 field_1 in SearchInput.Text
 
 );
SearchInput_1.Text;
 "field_7";
 "Title";
 "field_1";
 "Lastname";
 "Firstname"
 );
 "field_7";
 "Data"
)

 Any help
Thank you

Categories:
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @TimmyBoy - are you trying to apply the Search function on the Grouped table? Or run the Search first, and then Group the results?

  • TimmyBoy Profile Picture
    997 on at

    Hello @Amik 

    I run the search first then group the results

  • Verified answer
    Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @TimmyBoy - below is an example of a pattern you can use.

     

    With(
     {
     _search_results: Search(
     colMyList2,
     SearchInput_1.Text,
     "field_3",
     "field_7",
     "Firstname",
     "Lastname",
     "Title",
     "field_1"
     )
     },
     GroupBy(
     _search_results,
     "field_7",
     "GroupedItems"
     )
    )

     

     

    However, I suspect this is not going to give you the answer you need.

     

    What I suggest is that you forget PowerApps for a moment, and draw a sample of what you're table looks like in Excel, and then draw another example of the result you're expecting. Then paste both tables as images in your reply.

  • TimmyBoy Profile Picture
    997 on at

    Hi @Amik 

    Amazing, with a few adjustments it works how i wanted it
    Thank you 😉

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard