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
    • Canvas Apps Components Samples
    • Re: Toggle Set

    Re: Toggle Set

    09-30-2020 05:57 AM

    lras120265
    Advocate I
    3597 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    R3dKap
    R3dKap Community Champion
    Community Champion
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    Toggle Set

    ‎03-24-2020 03:25 PM

    [25-mar-2020 update] : removed Reset parameter, added MaxSelectedItems parameter

    _____________________________________________________________________________________________________________________________

    This component will allow you to add nice toggle sets to your applications. They are fully customizable so you will be able to give them the look and the behavior you want:

    ToggleSet.png

    Its parameters are as follow:

    - AllowNoSelection = if only one item is selected, allows the user to unselect it, thus having no items selected at all
    - BorderColor = color for the borders of the toggle set (as well as for the vertical separating lines between items)
    - BorderThickness = border thickness of the component
    - Color = text color for non-selected items
    - DisabledColor = text color for disabled items
    - DisabledFill = item fill color for disabled items
    - FontWeight = font weight for the item labels
    - Items = list of items for the toggle set (columns are: Id, Value, Disabled, Size, Selected)
    - ItemFill = fill color for non-selected items
    - MaxSelectedItems (number) = maximum number of items that can be selected (only if SelectMultiple is True, then value should be between 2 and number of items in Items)
    - Radius = in pixels, radius for the left and right corners of the component
    -Reset= resets the components to its defaults pre-selected items specified in the Itemsproperty (use the Selectedcolumn) (use Reset() function instead)
    - SelectedBorderColor = border color of selected items
    - SelectedColor = text color for selected items
    - SelectedFill = fill color for selected items
    - SelectMultiple = allows the selection of multiple items
    - Size = default font size for the item labels
     
    Here is the link to all detailed information: https://github.com/e-gallis/PowerApps/tree/master/Components/ToggleSet
     
    Enjoy!
    ToggleSet.zip
    Labels:
    • Labels:
    • Components
    Message 1 of 11
    8,813 Views
    7 Kudos
    Reply
    • All forum topics
    • Previous Topic
    • Next Topic
    • « Previous
      • 1
      • 2
    • Next »
    R3dKap
    R3dKap Community Champion
    Community Champion
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎03-25-2020 02:23 PM

    Just updated the component to remove one parameter and add a new one (see initial post above).

    Message 2 of 11
    8,631 Views
    0 Kudos
    Reply
    lras120265
    lras120265 Advocate I
    Advocate I
    In response to R3dKap
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-21-2020 05:43 AM

    @R3dKap : Really like the menu component! Planning to use it in my app. 

     

    I am new to PowerApps. How to click on the menu option to go to different screen?

     

    Thanks!

    Message 3 of 11
    3,705 Views
    0 Kudos
    Reply
    R3dKap
    R3dKap Community Champion
    Community Champion
    In response to lras120265
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-28-2020 03:13 AM

    Hi @lras120265,

    I'm glad you'll be using the component in your app (if you could post a screen shot of what you did with it I'd love it! 😉).

    If you want to navigate to another screen when you click on an item, here is how to do it:

    • let's say you have the toggle set component on Screen1 and you named it cmpToggleSet
    • let's suppose you set cmpToggleSet.SelectMultiple to: false
    • on Screen1 add a hidden Toggle Power Apps control (let's name it _togToggleSetOnChange)
    • Set _togToggleSetOnChange.Default to: cmpToggleSet.OnChange
    • Set _togToggleSetOnChange.OnCheck to:
    Switch(
        First(cmpToggleSet.SelectedItems).Id,
        1,
        Navigate(Screen4),
        2,
        Navigate(Screen3),
        23,
        Navigate(Screen8),
        etc...
    )

    That should do the trick. Don't forget to have a look at the component on Github as there are more detailed explanations: https://github.com/e-gallis/PowerApps/tree/master/Components/ToggleSet.

    Hope this helps,

    R3dKap

    Message 4 of 11
    3,623 Views
    1 Kudo
    Reply
    lras120265
    lras120265 Advocate I
    Advocate I
    In response to R3dKap
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-30-2020 05:57 AM

    @R3dKap 

     

    Thank you so much! I definitely will post my screen here. 

    Message 5 of 11
    3,597 Views
    0 Kudos
    Reply
    PowerdriveX6
    PowerdriveX6
    Frequent Visitor
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎10-03-2021 01:10 AM

    Absulutely must-have as default component in PowerApps, as i think 😉
    Thanks a lot for such amazing work!
    Is it possible to modify it to have different SelectFill for different buttons?
    I mean something like that:

    ToggleSet_plea.png

    In case of item 1 selected (Bad) - SelectFill=orange,

    default state - item 2 selected (Non checked) - SelectFill=Blue,

    item 3 selected (Good) - SelectFill=Green.

     

    Message 6 of 11
    2,205 Views
    0 Kudos
    Reply
    R3dKap
    R3dKap Community Champion
    Community Champion
    In response to PowerdriveX6
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎10-04-2021 01:47 AM

    Hi @PowerdriveX6,

    Glad you like it... 😊

    Yes sure it's possible to have a specific color for each entry when it's selected. Here is how to do it:

    1. Edit the component
    2. Edit the Items property and add a SelectedColor property of type Color to each item in the record like this:
      R3dKap_0-1633336959366.png
    3. Then, change the Fill property of the btnItem_TS button to the following formula:

     

    If(LookUp(ToggleSet.SelectedItems, Id=ThisItem.Id).Id <> Blank(), ThisItem.SelectedColor, ToggleSet.ItemFill)

     

     

    That should do it. I've tested it on my side and it works fine...

    Message 7 of 11
    2,185 Views
    1 Kudo
    Reply
    PowerdriveX6
    PowerdriveX6
    Frequent Visitor
    In response to R3dKap
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎10-04-2021 02:18 AM

    Yeah, now its work as i plan 🙂
    Im was only 1 step from the same solution, but stucked on last step, when use incorrect referring to SelectedColor value

    ToggleSet.SelectedColor, ToggleSet.ItemFill

     instead of

    ThisItem.SelectedColor, ToggleSet.ItemFill

    Again, a lot of thanks for component and support 🙂

    Message 8 of 11
    2,180 Views
    0 Kudos
    Reply
    RobotRising
    RobotRising
    Frequent Visitor
    In response to R3dKap
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎07-15-2022 12:46 PM

    Have tried to get this working as a navigation but it appears the OnChange value is not being passed from the component or rather it is not changing to true when a new selection is made. 

    Message 9 of 11
    1,177 Views
    0 Kudos
    Reply
    R3dKap
    R3dKap Community Champion
    Community Champion
    In response to RobotRising
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎07-23-2022 12:11 PM

    Hi @RobotRising,

    Just fixed the component so the OnChange event is really triggered... (a missing semi-colon 😒).

    Please download it again from Github.

    Thank your for your patience... 🙏

    Message 10 of 11
    1,156 Views
    1 Kudo
    Reply
    • « Previous
      • 1
      • 2
    • Next »

    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