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 31

I'm new to the powerapp space so apologies if this is a daft question. 

within my powerapp I’ve built 3 tabs where tab 1 is the default tab. Tab 1 will return everything in my data source and when tab 2 is selected by the user it filters and returns everything where the answer to the question is yes. I’m using the below function 

Switch(

    varTabSelected,

    1,

    'Signal Prep Sheet',

    2,

    Filter(

        'Signal Prep Sheet',

        'Is another prep shift required?'.Value = "Yes"

    )

)

 

I would like to now add tab 3 where if selected it would filter my data source (signal prep sheet) and find the question (is another prep shift required). Value = ‘no fully prepped’  and return the results in my gallery. 
Any help would be appreciated. 

thanks

 

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

    Hi @iknownothing 

     

    I assume 'Is another prep shift required?' is a choice column.

     

    Set the Items property of the gallery to 

     

    Switch(
    
     varTabSelected,
     1,
     'Signal Prep Sheet',
     2,
     Filter(
     'Signal Prep Sheet',
     'Is another prep shift required?'.Value = "Yes"
     ),
    3,
     Filter(
     'Signal Prep Sheet',
     'Is another prep shift required?'.Value = "no fully prepped" 
     )
    )

     

     

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @iknownothing 

     

    On select of the tab button/icon Set(varTabSelected,1) for First tab and Set(varTabSelected,2) for second tab vice versa

  • iknownothing Profile Picture
    31 on at

    Thank you I spent ages trying to get this to 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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard