Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Switching Views

(0) ShareShare
ReportReport
Posted on by

I have a working formula for switching to one alternate view but when I try to add another view, it didn't work.  I'm not sure if my formula for the second view is correct but I'm trying to filter for only those actions that are not complete. Any assistance is appreciated!

 

Working formula:

SortByColumns(

    Switch(

         Dropdown1_1.Selected.ViewName,

 "My Candidates",

 Filter([@'Recruitment tracker'],Recruiter.Email = User().Email),

         Filter([@'Recruitment tracker'],StartsWith('Candidate Name', TextSearchBox1_1.Text))

),

"Title",

If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)

)

 

Attempted to add View:

SortByColumns(

    Switch(Dropdown1_1.Selected.ViewName, "My Candidates", Filter([@'Recruitment tracker'],Recruiter.Email = User().Email), "My Active Candidates", Filter([@'Recruitment tracker'],Recruiter.Email = User().Email && 'Action Complete' = "No", Filter([@'Recruitment tracker'], StartsWith('Candidate Name', TextSearchBox1_1.Text))), "Title", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))

  • IBrant Profile Picture
    on at
    Re: Switching Views

    Hi Amik, 

    I tried it again and it worked.  I don't know why it wasn't working before, but thank you so much for your help!

  • IBrant Profile Picture
    on at
    Re: Switching Views

    Working: 

    IBrant_0-1686671336497.png

    Not Working:

    IBrant_1-1686671353316.pngIBrant_2-1686671360897.png

     

  • IBrant Profile Picture
    on at
    Re: Switching Views

    Hi, Amik,

     

    I tried the above and it still didn't work.  I also tried adding a "complete" column with a toggle and the previous solution and that did not work either. These are the formulas that I tried:

     

    SortByColumns(

        Switch(Dropdown1_1.Selected.ViewName, "My Candidates", Filter([@'Recruitment tracker'],Recruiter.Email = User().Email), "My Active Candidates", Filter([@'Recruitment tracker'],Recruiter.Email = User().Email && 'Action Complete'.Value = "No", Filter([@'Recruitment tracker'], StartsWith('Candidate Name', TextSearchBox1_1.Text))), "Title", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))

     

    SortByColumns(

        Switch(Dropdown1_1.Selected.ViewName, "My Candidates", Filter([@'Recruitment tracker'],Recruiter.Email = User().Email), "My Active Candidates", Filter([@'Recruitment tracker'],Recruiter.Email = User().Email &&  Complete  = false, Filter([@'Recruitment tracker'], StartsWith('Candidate Name', TextSearchBox1_1.Text))), "Title", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))

  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: Switching Views

    @IBrant - for a SharePoint Choices column, you will need:  'Action Complete'.Value = "No".

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

  • IBrant Profile Picture
    on at
    Re: Switching Views

    It is currently a dropdown choice yes/no in my SharePoint list. I originally had it as a yes/no but it populated as a toggle in the app so I changed it. I tried your formula, but it still didn't work for me. Thanks for your assistance!

  • Verified answer
    Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: Switching Views

    Hi @IBrant ,

     

    This looks fine to me. I am assuming you're data source is SharePoint and "Action Complete" is a Yes/No field type? If yes, replace 'Action Complete' = "No" with 'Action Complete' = false

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

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,679 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard