cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sudosaurus
Post Prodigy
Post Prodigy

Conditional fill background on choice selection

Hello,

 

I am trying to set a background colour on either the entire row or the choice or just the choice selection but neither are working with the below code - any pointers to what I'm doing wrong?

sudosaurus_0-1641812986023.png

 

If(
DataCardValue19.Selected.Value = "ANo! Product deemed to high a hazard! Use alternative product or method.",
Red,
DataCardValue19.Selected.Value = "Yes, Follow this COSHH assessment.",
Green,
White
)
1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @sudosaurus,

 

I think you have some small typos in your formula.

 

The first text begins with an A. And the second option ends with a dot. The text of your choice options looks different.

 

Can you try below and see if that works?

 

If(
DataCardValue19.Selected.Value = "No! Product deemed to high a hazard! Use alternative product or method.",
Red,
DataCardValue19.Selected.Value = "Yes, Follow this COSHH assessment",
Green,
White
)

 

View solution in original post

2 REPLIES 2
Expiscornovus
Super User
Super User

Hi @sudosaurus,

 

I think you have some small typos in your formula.

 

The first text begins with an A. And the second option ends with a dot. The text of your choice options looks different.

 

Can you try below and see if that works?

 

If(
DataCardValue19.Selected.Value = "No! Product deemed to high a hazard! Use alternative product or method.",
Red,
DataCardValue19.Selected.Value = "Yes, Follow this COSHH assessment",
Green,
White
)

 

sudosaurus
Post Prodigy
Post Prodigy

Thanks @Expiscornovus 

 

Yes I noticed the typo with the "A" at the beginning. However then realised that I had put a "." at the end of one of my choice values in SP list. Which is likely why the formula wasnt working. 

Works great now thanks! 😄

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,326)