Skip to main content
Microsoft logo
Power Apps
    • AI Builder
    • Automate processes
    • Azure + Power Apps
    • Build apps
    • Connect data
    • Pages
    • Take a guided tour
  • Pricing
    • Overview
    • Become a Partner
    • Find a Partner
    • Find partner offers
    • Partner GTM Resources
    • Blog
    • Customer stories
    • Developer Plan
    • Documentation
    • For IT Leaders
    • Roadmap
    • Self-paced learning
    • Webinars
    • App development topics
    • Overview
    • Issues
    • Give feedback
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • User groups
    • Register
    • ·
    • Sign in
    • ·
    • Help
    Go To
    • Power Apps Community
    • Welcome to the Community!
    • News & Announcements
    • Get Help with Power Apps
    • Building Power Apps
    • Microsoft Dataverse
    • AI Builder
    • Power Apps Governance and Administering
    • Power Apps Pro Dev & ISV
    • Power Apps Portals
    • Connector Development
    • Power Query
    • GCC, GCCH, DoD - Federal App Makers (FAM)
    • Power Platform Integration - Better Together!
    • Power Platform Integrations
    • Power Platform and Dynamics 365 Integrations
    • Community Blog
    • Power Apps Community Blog
    • Galleries
    • Community Connections & How-To Videos
    • Community App Samples
    • Webinars and Video Gallery
    • Canvas Apps Components Samples
    • Kid Zone
    • Emergency Response Gallery
    • Events
    • 2021 MSBizAppsSummit Gallery
    • 2020 MSBizAppsSummit Gallery
    • 2019 MSBizAppsSummit Gallery
    • Community Engagement
    • Community Calls Conversations
    • Experimental
    • Error Handling
    • Power Apps Experimental Features
    • Community Support
    • Community Accounts & Registration
    • Using the Community
    • Community Feedback
    cancel
    Turn on suggestions
    Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
    Showing results for 
    Search instead for 
    Did you mean: 
    • Power Apps Community
    • Galleries
    • Webinars and Video Gallery
    • If and Switch Functions - The basics

    If and Switch Functions - The basics

    05-24-2018 14:07 PM - last edited 05-24-2018 14:08 PM

    rorybi
    Kudo Commander
    2072 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    rorybi
    rorybi Kudo Commander
    Kudo Commander
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    If and Switch Functions - The basics

    ‎05-24-2018 02:07 PM

    PowerApps and Flow are two closely related functions.  In this video I demonstrate how to use them to perform the task of changing fill the colour of a text box based on the dropdown selected.

     

    I don't go into this in detail, but my guidance would be

    1. If you only have 2 states then you might as well use IF
    2. If you are looking at more than 2 end states AND you are just looking at 1 thing (i.e. 1 dropdown, or even one global variable) then you are better off using Switch
    3. If you are looking at complex conditions that look at more than 1 dropdown/global variable as the routine progresses then you are back to using if.  I would question this approach however and suggest that there ought to be a better way of getting the behaviour in this scenario you'll be building statements that only you will understand and it will be very difficult to pass the app on to a colleague.

    Happy PowerApping

     

    watch?v=cVYpdnyMy8E

    Preview file
    57 KB
    Labels:
    • Labels:
    • Community Tips & Tricks
    • Friday Function Series
    Message 1 of 1
    2,072 Views
    1 Kudo
    Reply
    • All forum topics
    • Previous Topic
    • Next Topic

    Power Platform

    • Overview
    • Power BI
    • Power Apps
    • Power Pages
    • Power Automate
    • Power Virtual Agents

    Browse

    • Sample apps
    • Services

    Downloads

    • Windows
    • iOS
    • Android

    Learn

    • Documentation
    • Support
    • Community
    • Give feedback
    • Blog
    • Partners

    • © 2023 Microsoft
    • Follow Power Apps
    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Trademarks
    California Consumer Privacy Act (CCPA) Opt-Out Icon Your California Privacy Choices