Custom Variables
You can create custom variables when you need a suitable variable name for your device mapping configuration. For instance, you could use it when you need a variable for a custom purpose or when you need it for your own language.
How to create a new custom variable
1. Go to Main Menu > Site Admin > Devices > Device Variables window.
On this page, you can see the overview of custom variables.2. In the top right corner you can press on add Custom variables.
3. Create the name, add a description and data type
Type: select Double, String, or Boolean depending on what kind of value will you store in this new variable. Typically:
- Double: anything that stores a number or "something that could be measured" like any analog signal (fuel level, temperature, speed, etc).
- String: anything that stores a string of characters (for example, RFID or iButton that sends the "driver identification number)
- Boolean: stores a signal that can only handle two states (true/false, 0/1, etc). For example: door open, lights on, SOS, etc.
4. Click the Save button and refresh the browser.
How to use the custom variable
The new variable will be available in the Device Mapper in the application for any device type selected.
1. Select Main Menu > Admin > Device Mappers
2. Select your device from the list
3. Go to Mappings
4. Select the Input and your new variable
Note: your new variable will show if it matches the type of input you're selecting.
Check which type you selected when creating the variable.
Export-Import your custom variables
Custom variables can also be exported and imported in case of backup or server migration.
Exporting custom variables
To backup your custom variables, follow these steps:
1. Go to Main Menu > Site Admin > Devices > Variables
2. Press the button Export
Now a file message_fields.xml will be downloaded onto your computer.
Importing custom variables
To import your custom variables, follow these steps:
1. Go to Site Admin (Legacy) > Import
2. Select Templates from the list.
3. Select the message_fields.xml file downloaded from the import step.
Now your variables should be listed under Devices > Variables.