Articles in this section
Category / Section

How to Apply Conditional Formatting in a Text Widget

Published:

Conditional formatting in a text widget can be achieved with the help of expression columns and label parameters. This guide will walk you through the process of changing the color and text dynamically in an HTML structure.

Example HTML Structure

<p style="color:red;">I am red</p>

rte_image_88(4).png

Steps to Apply Conditional Formatting

  1. Create a table with the necessary columns.

    image.png

  2. Create an expression using the CONCAT operation and merge all required static and dynamic text (used as columns).

    Expression:

    CONCAT('<p style="color:',(IF([Status] = 'ON', 'green','red')),';">',[Message],'</p>')
    

    rte_image_90(1).png

  3. Use the created expression (i.e., Formatted Text) as the label parameter for the Text widget.

    image.png

  4. The Text widget will now display conditionally formatted color and text based on the status.

    image.png

Please refer to the gif image below for a visual representation of the process.

TextwidetConditionalFomattion.gif

Additional References

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
IJ
Written by Israel Jebaraj Chandirakumar
Updated
Comments (0)
Please  to leave a comment
Access denied
Access denied