Introduction
This article describes how to edit the underlying JavaScript in a Rule that has been applied to a table...
...so you can, for example, reverse a condition to apply text to cells larger than a specific value so that it instead does this for cells that are smaller than this value:
Requirements
A table with a Rule applied. This article uses the example from How to Add Text to Table Cells with Large Numbers. Note, Highlight Cells, Top/Bottom and Color Scale Rules cannot be modified in this way.
Method
1. Select your table.
2. Go to Properties > RULES on the object inspector.
3. Right-click the Rule you wish to edit > Edit > Edit JavaScript.
4. Amend the JavaScript code where necessary. In this example, we can identify the part of the code that applies the condition as follows:
if (value > threshold) {
To reverse this condition so that it applies instead when under this threshold, we would change this to:
if (value < threshold) {
5. Press OK > OK.
Note, if this Rule was originally applied to multiple tables at the same time, you have selected the Use for new table and charts option, or this is a copy of a table that had the Rule already applied, this change will apply to all these instances of the Rule.
See Also
How to Add Text to Table Cells with Large Numbers
Comments
0 comments
Article is closed for comments.