Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Sorting and Switching for Views

(0) ShareShare
ReportReport
Posted on by

I'm trying to figure out how to use a search box, and ascending/descending order button with different views.  The below formulas work great on their own.  How do I combine them?

 

SortByColumns(Filter([@'Recruitment tracker'], StartsWith(Title, TextSearchBox1_2.Text)), "Title", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))

 

Switch(Dropdown1.Selected.ViewName,"My Candidates", Filter([@'Recruitment tracker'],'Recruiter'.Email = User().Email))

  • IBrant Profile Picture
    on at
    Re: Sorting and Switching for Views

    That worked perfectly!  Thank you so much!

  • IBrant Profile Picture
    on at
    Re: Sorting and Switching for Views

    That worked perfectly!  Thank you so much!

  • Verified answer
    v-bofeng-msft Profile Picture
    on at
    Re: Sorting and Switching for Views

    Hi @IBrant ,

     

    Please try:

    SortByColumns(
     Switch(
     Dropdown1.Selected.ViewName,
    		 "My Candidates", 
    		 Filter([@'Recruitment tracker'],'Recruiter'.Email = User().Email),
     Filter([@'Recruitment tracker'],StartsWith(Title, TextSearchBox1_2.Text))
    	), 
    	"Title", 
    	If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)
    )

     

    Best Regards,

    Bof

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,017 Most Valuable Professional

Leaderboard