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 Platform Community / Forums / Power Apps / Toggle Yes/No using Th...
Power Apps
Answered

Toggle Yes/No using ThumbsUp Icon

(0) ShareShare
ReportReport
Posted on by 776

Hi Experts,

 

I need to achieve the following.

When I click on thumbsup icon it should set the toggle control to yes or true 

again when I click on thumbsup icon it should set the toggle control to no or false

Meaning i shall be able to control the toggle value using thumbsup icon with thumbsup icon being unfilled when false and filled

when true

Please guide me

Categories:
  • KvB1 Profile Picture
    1,596 on at

    You need to create a variable and:

    - OnSelect of thumbs: If variable is true, set variable to false, if variable is false, set to true

    - Fill of thumbs: If variable is true, border colour, if variable is false, white

    - Default of toggle: variable

  • Verified answer
    AshishJaiswal Profile Picture
    776 on at

    @KvB1 

    Thanks for replying to my post
    The default property of the toggle control also has another function/task in it.

     

     

    If(CountRows(Filter(DataCardValue4.SelectedItems,Email=User().Email))>0,true,false)

     

     

     

    How can I make it do both ??
    ; - does not work
    & - does not work
    && - does not work
    ----------------------------------------------------
    About Toggle control 

    Onselect of thumbs icon - Set(GiveLike,!GiveLike)

    then Default property of toggle to - GiveLike


  • Verified answer
    KvB1 Profile Picture
    1,596 on at

    Strange, && should work,

     

    If(CountRows(Filter(DataCardValue4.SelectedItems,Email=User().Email))>0&&GiveLike,true,false)
  • v-albai-msft Profile Picture
    Microsoft Employee on at

    Hi @AshishJaiswal ,

    You can use the Color porperty of the thumbsup icon to make sure if it is filled or not, if it is filled, add your other condition together, and set toggle to true.

    Assuming that the thumbsup icon filled with RGBA(0,18,107,1) when it is first clicked, so for the toggle, you can set its Default to:

    If(ThumbsUpicon.Color=RGBA(0,18,107,1),true,false)

    Above formula means when thumbsup button is filled, the toggle is set to true.

    On your side, you can try this full formula:

    If(ThumbsUpicon.Color=RGBA(0,18,107,1)&&CountRows(Filter(DataCardValue4.SelectedItems,Email=User().Email))>0,true,false)

    Here is my test result(current login user is allenbai):

    valbaimsft_0-1627529015705.png

    valbaimsft_1-1627529109756.png

    Best regards,

    Allen

  • v-albai-msft Profile Picture
    Microsoft Employee on at

    Hi @AshishJaiswal ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Best regards,

    Allen

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard