Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Row Styling Rules Underline Text

terrellchong
8 - Asteroid

I want to underline text which fall under certain conditions.

terrellchong_0-1644747684675.png

 

Is alteryx able to do that?

2 REPLIES 2
Qiu
20 - Arcturus
20 - Arcturus

@terrellchong 
Actually you can do it with the option of "Formula Styles"Capture2A.PNGCapture2B.PNG

Formula Styles

This 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.

 

danilang
19 - Altair
19 - Altair

Hi @terrellchong 

 

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.

 

danilang_0-1644749354305.png

In this case using "text-decoration: underline;" adds the underline. in the cells that start with A 

 

danilang_1-1644749825198.png

 

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 

Labels