Conditional map styles let you change how poles and other nodes appear on the map based on their field data. For example, you can show completed poles in blue and incomplete poles in red, or color-code poles by type (power only vs. joint use). This guide explains how to set up these rules in the Cloneable web portal.
In This Guide
How Conditional Styles Work
Each node type (pole, guy anchor, reference, etc.) in your configuration can have multiple icon styles. Each icon style has:
A fill color and stroke color that control how the icon looks on the map
An optional conditional rule that determines when this icon style should be used
When the map renders a pole, it checks each icon style in order from top to bottom. The first rule that matches determines the icon. If no rule matches, the last icon (which should have no conditional) is used as a fallback.
Note: Conditional styles only affect how things look on the map. They do not change what data is collected or how data is exported.
Where to Find Icon Settings
Icon settings are part of your configuration's Visualizations section. If you haven't imported a configuration yet, see How to Import a Katapult Model into Cloneable to get started.
Log in to the Cloneable web portal
Open your configuration
Navigate to the Visualizations section
Select the node type you want to style (e.g., Pole)
You'll see a list of icon configurations on the left side. Each one can have its own color and conditional rule.
Writing Conditional Rules
Conditional rules use a format called JSON Logic. The basic structure looks like this:
{"==": [{"var": "field_name"}, "value"]}
Here's what each part means:
Part | What It Does |
| The comparison operator. Checks if two values are equal. |
| References a data field on the pole. Replace |
| The value to compare against. Must match exactly, including capitalization. |
Important: Field names in conditional rules use the stored format, which is lowercase with underscores. For example, a field displayed as "Power Only" in the template editor is stored as power_only. You can find the exact stored field name by checking the data template for the node type in the web portal.
Not Equals Operator
To check that a field does NOT equal a specific value, use the != operator:
{"!=":[{"var":"field_name"},"some_value"]}
Checking for Empty or Non-Empty Fields
To check if a field has no value (is empty):
{"==":[{"var":"field_name"},null]}
To check if a field has any value (is not empty):
{"!=":[{"var":"field_name"},null]}
Common Examples
Show completed poles in blue and incomplete poles in red:
Icon 1 (blue):
{"==": [{"var": "field_completed"}, "true"]}Icon 2 (red): Leave the conditional empty (this is the fallback)
Color-code poles by type (Power Only vs. Joint Use):
Icon 1 (grey):
{"==": [{"var": "power_only"}, "Yes"]}Icon 2 (red):
{"==": [{"var": "power_only"}, "No"]}Icon 3 (default color): Leave the conditional empty (fallback for poles without a value)
Change the icon when a specific task is done (e.g., SFU Done):
Icon 1 (green):
{"==": [{"var": "sfu_done"}, "true"]}Icon 2 (default color): Leave the conditional empty
Show which poles have been exported vs. not exported:
This is especially useful for tracking export progress on the map.
Icon 1 (green, successfully exported):
{"!=":[{"var":"last_export"},null]}Icon 2 (red, not yet exported):
{"==":[{"var":"last_export"},null]}
Note: The last_export field records the timestamp of the last successful export. Poles that have never been exported and poles where the export failed will both show as "not exported" since neither has a last_export timestamp.
Note: The value you compare against depends on how the field stores data. Some fields use "true"/"false", while others (especially fields imported from Katapult) may use "Yes"/"No". Check your field's actual values if the rule isn't matching as expected.
Icon Order and Fallback Rules
The order of your icon styles matters. The system checks them top to bottom and uses the first match.
Best practice:
Put your most specific conditions at the top
Put less specific conditions below
Always include a default icon with no conditional at the bottom as a fallback
Important: If you don't include a fallback icon (one with an empty conditional), poles that don't match any rule may not display correctly on the map.
Finding the Correct Field Name
The field name you use in {"var": "field_name"} must match the stored field name in your configuration. Field names are stored in lowercase with underscores. To find the correct name:
Open your configuration in the web portal
Navigate to the data template for the node type (e.g., Pole)
Look at the field names listed in your attribute selections
Use the stored field name exactly as shown (lowercase with underscores)
Tip: If you imported your configuration from Katapult, the field names in Cloneable will be the lowercased, underscore-separated versions of the attribute names from your Katapult model. For example, "Power Only" becomes power_only.
Troubleshooting
All poles show the same color regardless of data values
This usually means the conditional rule is matching (or not matching) everything. Common causes:
You used a "has any value" check instead of checking for a specific value. For example, the auto-generated "Has Measurements" rule checks whether the field has any entry at all. If you copy that pattern for a Yes/No field, it will match every pole that has any value in that field, whether it's "Yes" or "No".
The field name is misspelled or does not match the stored format (remember: lowercase with underscores)
The comparison value doesn't match (e.g., comparing to "true" when the field stores "Yes")
Conditional styles work on the web but not on the mobile app
If poles show the correct colors in the web portal but display as default blue/red on the mobile app, make sure you have selected an icon shape (Circle, Diamond, etc.) in the icon customizer for each style. Color-only styles without a selected shape may not render correctly on mobile devices. Selecting a shape resolves this.
I see an error when saving the conditional
Check that your JSON syntax is valid. Common mistakes include:
Missing or extra commas
Missing closing brackets
}or]Using single quotes instead of double quotes (JSON requires double quotes)
Tips & Reminders
Conditional styles only affect map display. They do not change exports or data collection.
Field names use the stored format: lowercase with underscores. Match them exactly to your data template.
Always include a default icon with no conditional as the last item in the list
Fields imported from Katapult may store values as "Yes"/"No" rather than "true"/"false". Check the actual stored values if your rules aren't matching.
Select an icon shape (Circle, Diamond, etc.) for each style to ensure it renders correctly on both web and mobile
You can safely experiment with conditional styles. Changes are only visual and won't affect your data.
Use
nullcomparisons to check whether a field is empty or has any value. This is especially useful for fields likelast_export.
