cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
McMonty
Resolver I
Resolver I

CDS optionset

Hi, I'm trying to set the fill property based on an items optionset value, and can't get it to work.

Is there a secret to doing this? I thought this would be straightforward, but it's proving to be nothing but that.

 

If(ThisItem.'Contact Match' = 'Contact Match (Mailing List Contacts)'.Yes,Color.Red,Color.Blue)

 

Any ideas?

2 REPLIES 2
Drrickryp
Super User
Super User

Hi @McMonty 

I have no idea if the equation in your formula is correct, but if it is,  try

 

 

If(
    !IsBlank(
             ThisItem.'Contact Match' = 'Contact Match (Mailing List Contacts)'
     ),
      Red,
      Blue
)

 

If you want to test for a contact that is in your mailing list, you may have to use 

 

If(
    !IsBlank(Lookup(ContactList, ContactName=ThisItem.ContactName),Red, Blue
)

 

As the equation to test where the you are looking to establish membership of a ContactName in a table of contacts. You would replace ContactList and ContactName with the actual table and field names.

 

 

Hi, managed to fix it. The syntax was correct, but the app only accepted it after I saved, closed and reopened again. Haven't seen that before.

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (3,098)