I want to underline text which fall under certain conditions.
Is alteryx able to do that?
Solved! Go to Solution.
@terrellchong
Actually you can do it with the option of "Formula Styles"
Formula StylesThis is an advanced option. When the basic style overrides are insufficient, you can create your own style overrides, by writing a formula that constructs a CSS-like style text. This formula is computed individually for each cell to which it applies, and can be very powerful. Use of this option requires a solid understanding of CSS styles and some knowledge of PCXML and Composer.
Some Common PCXML properties to use within formulas:
- background-color: The background color of a table cell or row.
- decimal-places: The number of digits that appear after a decimal point for a numeric value.
- postfix: Text that directly follows a value.
- prefix: Text that precedes a value.
- background-image: Set an image as the background
- color: Foreground color of the object.
- border: Define the borders around an element.
- padding: The space between the element border and the element content.
- font-weight: Set how thick or thin characters in text should be displayed.
- font-style: Set the style of a font.
- text-align: Align the text in an element.
- white-space: Declare how whitespace inside the element is handled: the 'normal' way (where whitespace is collapsed), as 'pre' (which behaves like the 'PRE' element in HTML), or as 'nowrap' (where wrapping is done only through BR elements).
- text-decoration: The decoration of the text such as overline, underline, line-through, none, or blink.
When the option you're looking for isn't shown on the rule settings, you have to use the formula to try and get what you're looking for. This is a little confusing since there are 2 "formula" settings. The first is the top one with radio button, where you use standard Alteryx filter syntax to determine when to apply the rule. The bottom one with the check box is where you add the pcxml code to apply the effect. Most of the time standard HTML 5 syntax works.
In this case using "text-decoration: underline;" adds the underline. in the cells that start with A
There isn't a published pcxml manual, so If you can't find the corresponding code, post a new question in the community and someone here will probably be able to help you
Dan