Managing attributes
Create, edit, and delete attributes in the Initiate Attribute node. Use autofill to build formula expressions quickly from available telemetry fields.
The Initiate Attribute node allows you to create, edit, and manage data attributes throughout your IoT Logic flow. This guide covers the basic attribute management actions (create, edit, delete) and essential operations, including autofill functionality for formula creation.
Creating attributes
Here's how to create a new attribute in the Initiate attribute node:
Name the attribute
Enter a name for your attribute (e.g., "Speed mph"). This name will be displayed in Data Stream Analyzer and act as a custom sensor name in Navixy.
Define formula
Define the value expression. For faster formula building, use autofill.
The new attribute is saved in the node and the configured calculation is applied immediately in the flow.
Time settings for attributes
Time settings give you control over timestamps associated with your attributes:
Generation time: When the data was created
Use
now()to set the current time in millisecondsUse
genTime('parameter_name', 0, 'valid')to use the parameter's own generation time
Server time: When the data was received by IoT Logic
Use
now()to set the current time in millisecondsUse
srvTime('parameter_name', 0, 'valid')to use the parameter's server timeAdd offsets to adjust for time zones (e.g.,
srvTime('can_speed', 0, 'valid') + 120000adds 2 minutes)
Autofill attribute names
When creating calculation formulas, you need to reference existing attribute names from physical devices or calculated attributes from other nodes. To simplify this process and prevent misspellings, IoT Logic provides autofill functionality for attribute names.
To use autofill when building formulas:
Click
in the Formula field.Select the desired attribute from the appeared list, it supports manual text input for search purposes.
Click on the attribute name to insert it into your formula.
The selected attribute is automatically inserted in the ready-to-use format, using the short syntax of Navixy IoT Logic Expression Language. It means that autofilled entries access any latest value of the selected attribute.
You can modify the parameters as needed - change the index number for historical values or adjust the validity flag. To do it, you need to define the formula using the full syntax explicitly, inside the value() function.
The list is filtered based on your flow's data sources and matches what's visible in Data Stream Analyzer.
Indexed attributes in autofill
Some data attributes contain multiple values indexed within a single attribute, such as readings from multiple analog sensors connected to a main telematics device. To use these attributes in calculations, you need to specify the exact index number corresponding to the specific sensor or input you want to reference.
For example, if you need to work with voltage readings from the third analog input on your device, this data comes through the attribute analog_2 (using zero-based indexing where the first input is index 0). In your formula, this would appear as value('analog_2', 0, 'valid').
Autofill handles this scenario for you as well:
Indexed attributes are marked with
icon in the autofill list.These entries display the available index range in square brackets, such as
analog_[1..4]for attributes supporting five indexed values (indexes 1 through 4).When you select an indexed attribute, the cursor automatically positions at the end of the attribute name within the quotes, allowing you to immediately type the specific index number you need.
Expression language
All formulas in IoT Logic follow the specifications of Navixy IoT Logic Expression Language. Below, you find a brief reference to the two options of the language syntax. The choice of syntax depends on the particular case, and is designed for convenience:
Short syntax is easy to write and works best when you need only the recent data.
Long syntax is slightly more complex, but offers more control on the data depth when you need to handle historic values.
Syntax option doesn't affect the formula itself! You can also combine short and long syntax in the same formula.
Formulas can also call the geofence functions, which read the device position against the geofences in your account. geofenceName() returns the name of the geofence the device is in, as text, so it fits an attribute value directly. See Geofence functions.
Both syntax options can read a value that isn't there. A formula that then calculates with that value produces nothing, and the attribute is left out of the data packet. See Missing values in expressions.
Short syntax
Short formula option accesses the latest attribute value, without checking validity. Use it when you don't need historical values in a formula. The value that it reads can be empty, and most operators can't calculate with an empty value.
Syntax: attribute_name
Defaults:
Index:
0(current value)Validation:
'all'(includes null values)
For example, the short form temperature equals the full formula value('temperature', 0, 'all'). This means you can easily create calculations without adding the default parameters explicitly:
Full syntax
Using full formula syntax allows you to access historical values or explicit validation mode. This helps when you need to use the non-latest values and handle nulls. In the case of full syntax, you need to define the complete value() function.
Function: value(attribute_name, index, validation)
Parameters:
index
0-11
Historical position: 0=current, 1=previous, 11=oldest stored value
validation
'all' or 'valid'
'all'=includes nulls (exact index), 'valid'=excludes nulls (Nth valid reading)
Navixy stores 12 readings per attribute for each device, and keeps them for up to 30 days after the most recent message from that device. A device that returns after more than 30 days of silence starts with no history. On the first message back, value('temperature', 1, 'valid') resolves to null. To check what history a device currently has, open Data Stream Analyzer.
Examples:
Any previous reading
5th valid reading back
Temperature change (short and full syntaxes used in the same formula)
Editing existing attributes
To modify an existing attribute:
Open the node configuration window by hovering your mouse over the node to display quick actions, or double-clicking the node
Find the attribute you wish to edit in the attribute list
Make the needed changes in the text fields of the attribute properties: Attribute name, Formula or time settings
If you need to edit other attributes in this node, repeat step 3 for them
Click Save to apply your changes to the node configuration
Deleting attributes
To remove an attribute that is no longer needed:
Open the node configuration window by hovering your mouse over the node to display quick actions, or double-clicking the node
Find the attribute you wish to remove and click

Click Apply changes to confirm the node configuration
Last updated
Was this helpful?