Quantcast
Channel: Gurock Software Support Forum
Viewing all articles
Browse latest Browse all 829

[UI Script] Conditional formatting for cases

$
0
0

Based on this request: http://forum.gurock.com/topic/2043/ui-s … tom-field/

» Gist here «

http://content.screencast.com/users/Actine/folders/Jing/media/121cd325-0526-400f-9e6e-6d93ac03165c/2015-03-05_2314.png

How to use:

  • Define the rules in var rules (line 12). For each rule specify an expression and a class to add to the table row when expression is true. Note: in expression use this.fieldname, where fieldname is a system name of the field to be evaluated (see API reference)

  • Declare styles for the classes which you used in the rules. Remember that the class gets added to a <tr> item.

Review and remove the rules defined in the gist as example.

The script uses REST API, so make sure it is enabled in your installation. The styles should apply as soon as the cases are loaded, or whenever the table is recreated (e.g. another section is selected). The fact that conditional formatting is not applied to new/copied cases is a known issue (hopefully not critical for you — as I don't wanna fix that too smile)

Feel free to ask if anything works incorrectly.


Viewing all articles
Browse latest Browse all 829

Trending Articles