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 / Display mode with IF C...
Power Apps
Answered

Display mode with IF Condition for a circle

(0) ShareShare
ReportReport
Posted on by 15

Hello all,

 

I have a question, I would like to edit the display mode of a circle with colors. If the condition is true then green, else red. 
Also if the value is empty then grey. I started writing the code but i have done something wrong. Can anyone help me. Please check the attached imageMicrosoftTeams-image (13).png

 

If(LookUp(
Todolist_QC,
Dateid_Todo = Concatenate_date_2.Text && Shift = 'Schicht value_to_do_2'.Selected.Value && day_todo = tagvalue_2.Text,
toggle_3
) = "true", Green ,Red)

 

Thanks in advance and have a nice day.

 

@RandyHayes 

Categories:
  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    Hi @Gunayathi ,

    Firstly I assume your toggle_3 is a yes/no true/false field, so the below should work

    If(
     LookUp(
     Todolist_QC,
     Dateid_Todo = Concatenate_date_2.Text && 
     Shift = 'Schicht value_to_do_2'.Selected.Value && 
    	 day_todo = tagvalue_2.Text
     ).toggle_3 = true
     Green ,
     Red
    )

     Which value do you want to be empty to show grey? A Boolean has to be either true or false.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Gunayathi Profile Picture
    15 on at

    Hi @WarrenBelz ,

    The above code is not working, 
    if the toggle_3 value  is empty in share point list, i want it to be shown as grey. 
    If the toggle_3 value  is true in SharePoint list , i want it to be shown as green.
    If the toggle_3 value  is false in share point list , i want it to be shown as red.

  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    Hi @Gunayathi ,

    "Not working" does not really help solve this.

    What type of value is in Toggle_3? You referred to it as "true" and I suspect it was Boolean (true/false), which needs a Default (and therefore cannot be blank). Also a toggle only has two values (generally true/false).

    Note I used your filter code as I cannot see your model and the error may be there.

    If for example, toggle_3 was a text field in your list (but I don't think it is), your code would be something like

    With(
     {
     wTodo:
     LookUp(
     Todolist_QC,
     Dateid_Todo = Concatenate_date_2.Text && 
     Shift = 'Schicht value_to_do_2'.Selected.Value && 
    	 day_todo = tagvalue_2.Text
     ).toggle_3
     },
     Switch(
     wTodo,
     Blank(),
     Grey,
     "True"
     Green,
     Red
     )
    )

    Please confirm the type of field toggle_3 is in your list - and also confirm it is a field, not a control on your screen.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Verified answer
    WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    Hi @Gunayathi ,

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

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Gunayathi Profile Picture
    15 on at

    Thanks @WarrenBelz , it worked 🙂

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 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard