mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 14:46:55 +01:00
Lead with a complete plugin quick start and add task-oriented usage, troubleshooting, customization, and contribution guides. Preserve the broader plugin framing, correct conflicting contract guidance, support Agents folder reviews, and align repository validation. Convert existing sample references to clickable links without changing knowledge rules. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1.5 KiB
1.5 KiB
| bc-version | domain | keywords | technologies | countries | application-area | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
ui |
|
|
|
|
StyleExpr: Boolean toggle vs Text variable
Description
StyleExpr on a page field serves two distinct purposes depending on its type:
- Boolean — When
StyleExpris a Boolean expression, it controls whether theStyleproperty is applied. In this case theStyleproperty carries the style name; analyzeStyleand ignoreStyleExpritself. - Text — When
StyleExpris a Text variable (e.g.StyleExpr = StatusStylewhereStatusStyle: Textand is assigned literals such as'Favorable'), the variable contains the style name at runtime. There may be noStyleproperty at all — theStyleExprvariable is the style.
When StyleExpr is Text, you must trace the variable's assignments — typically in OnAfterGetRecord or OnAfterGetCurrRecord — to determine which styles can be applied, then apply the same accessibility rules as for a literal Style value.
Best Practice
Inspect the declared type of the symbol referenced by StyleExpr before drawing conclusions. If it is Boolean, evaluate the Style property. If it is Text, follow every assignment to the variable and check the full set of possible style values against cosmetic-styles-need-no-textual-context.md and semantic-styles-need-independent-textual-meaning.md.
See sample: style-expr-text-vs-boolean.good.al.