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 swith used with IF
Power Apps
Answered

Toggle swith used with IF

(0) ShareShare
ReportReport
Posted on by 522

Hi

 

I am using the value of a toggle switch to change the templatefill color of a gallery.

 

 

If(And(ThisItem.CraHotFormat=2;Toggle2_2.Value=true);LightGreen;If(And(ThisItem.CraHotFormat=3;Toggle2_2.Value=true);LightCoral;WhiteSmoke))

 

Powerapps say this function is not possible.   Mark Toggle2_2 with green.

 

How can I change this?

 

Regards

 

Tony

 

 

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

    If(

    ThisItem.CraHotFormat=2 && Toggle2_2.Value = true;

    LightGreen;

    If(ThisItem.CraHotFormat=3 && Toggle2_2.Value=true;

    LightCoral;

    WhiteSmoke

    )

    )

     

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • Thansson Profile Picture
    522 on at

    Hi @Nogueira1306 

     

    Thank you for your answer.

     

    Both my solution and your solution are working.

     

    But powerapps mark Toggle2_2 with green, and comment that this solution is not supported

     

    Regards

     

    Tony

     

     

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Print please

  • Thansson Profile Picture
    522 on at

    Toggle.JPG

     

    Hi @Nogueira1306 

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    I dont want that.. I already know the code... Print from the Item/Gallery

     

     

  • Thansson Profile Picture
    522 on at

    Hi @Nogueira1306 

     

    Gallery connected to sharepoint

     

    Sharepoint.JPG

     

    Gallery with toggle2_2

     

    Gallery.JPG

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 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard