Format rules allow you to customize icons, text, and more. This helps you make your app more unique. You can also make different formatting rules for each row, creating different formatting for different data.

An app can define more than one format rule and, in fact, more than one rule can match the same data at the same time. In such cases, the order of the formatting rules in the app determines the actual behavior.

The rules are processed in order from the first to the last. If two matching rules conflict in their formatting information, the last rule takes precedence. So for example, if Rule 1 matches and sets the Text Size to 1.5 and Rule 2 also matches and sets the Text Size to 2.5, the final Text Size will be 2.5.

In the case of icons, the rules are additive. So if Rule 1 matches and assigns an icon and Rule 2 also matches and assigns an icon, both icons are shown for the data.

Performance tip: Note that expensive format rules--those that require a lot of computation each time a screen is scrolled--can impact the interactivity and performance of the app.

Practice: Using Format Rules in the Editor

Go to the Editor>UX>Format Rules:

When you create a new rule, the first thing you need to choose is which table the rule applies to in the "For this data" dropdown. 

Then specify a condition that must be satisfied for the formatting rule to take effect. If you leave this blank, the rule applies to all rows in the table. However, you could specify a simple formula like [Country] = "USA" or a more complex formula for richer behaviors.

Next, choose the columns that you want formatted. You can hold the 'Ctrl' key to select multiple columns. 

Finally, specify some formatting settings. You will see a list of components that you can customize.


You can choose to show an icon next to the row, inside the map pin, or on any UX view.

Use the Editor's UX>Format Rules tab to set icons based on rules for the data in your app. Make sure to select any column where you would like the icon featured (choose your location column to feature icons inside map pins instead of numbers). You can browse through the icons and click on the one you want to use, or search for a specific icon using the text box.

Note: Adding icons will affect the size of columns in the Table view.

Text Color

Text color and highlight color can be chosen from the list of theme-based colors. Highlight color determines the color of the icon.

You can also manually type in any hex-based color code you want, such as #0F77FF. You can use this tool to find color codes:

The image below results from the above format rule.

Individual format rules can be disabled. If so, they remain in the app definition but they do not run. This is useful if you want to define and test a format rule, but do not yet want to enable it for live use.

Did this answer your question?