Conditional styling by property value

I’m trying to achieve the result described by @RichardMarsot in

https://support.pega.com/question/how-conditionally-change-row-background-color-optimized-cosmos-table

Doesn’t appear to work anymore, despite the property autocomplete popping up on the cell classes ruleform. It allows me to specify a property that will contain the style, e.g. prop name StyleTotalGRQuantity, but the DOM result is always like:

This behavior makes some sense to me - how is the rule form supposed to know the difference between a property name and a CSS class. Is there a way to specify explicitly a property ref? If not, should someone remove the property selection prompt from the classes entries on the control rule form?

@mjosborn85 you do not set the class on the autocomplete but you wrap your field by a section

see in my post ‘inlude a section in the cell that should be styled conditionally’ - you set the class on the section include directly - not on the field

@RichardMarsot , thanks for replying! I appreciate all the help you provide on the forums. You’re correct I didn’t zero in on the section include. Three things to mention if you’ll bear with me.

First, I’m also trying to style things not in a table, so unsure if your advice still applies. I tried the section include just now, applying the style to the “include”. I got the same result, illustration attached. Does this technique work only in tables? Or at all these days?

Second, if you can reread my original post, I’m not trying to style an autocomplete. My complaint is that the controls’ configuration typically presents a property list popup (section include notwithstanding) when you type a period in the custom style cells. This is misleading and useless, right?

Third, I arrived at an approach to conditional styling that the UI team might find useful if it could be incorporated into the product. I’ll post a little article tomorrow using “Start a discussion” if you keep an eye out.

@mjosborn85 many thanks for posting the Discussion Proposal for dynamically styled controls

@Sam Alexander @RichardMarsot could one of you comment on Matthew’s last observations?

The discussion is continued in the following Developer Knowledge Share:

Proposal for dynamically styled controls