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 Apps
Unanswered

CDS optionset

(0) ShareShare
ReportReport
Posted on by 144

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?

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    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.

     

     

  • A Wennerwik Profile Picture
    144 on at

    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.

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard