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 Apps
Answered

Switch Function

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi ,

 

My app has few tabs and a gallery in homescreen, on the selection of tabs I want to sort the data in the gallery on the basis of certain condition 

1 clicking on the first tab will display the entire data from  sharepointlist in the gallery

* when clicking on the second tab , I want to filter the data in my sharepoint list , But it is showing some error,

 

Emptyglasses_0-1669265196746.png

 

Access Details is a choice column in my sharepoint list , by clicking on the second tab I only want to show the data where the Accessdetails column contains the value Display

 

Could anyone help me to fix this 

 

 

Categories:
I have the same question (0)
  • Verified answer
    NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi @Anonymous ,

    Try using below formula - 

    Switch(vartabselected, 1, SPUD, 2, Filter(SPUD, 'Access Details'.Value="Display"))

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi,

    Thanks for the reply that worked perfectly fine 

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi I;ve one more doubt 

    what if I need to sort the data not based on column , On shrepoint list 

    like i need need to showcase all the data in my app if my Sharepoint list contains the word Display

     

    Switch(vartabselected, 1, SPUD, 2, Filter(SPUD, .Value="Display"))

     

     will this work ??

     

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 431

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 280 Super User 2026 Season 1

Last 30 days Overall leaderboard