/
Creating a Point Conversion
Creating a Point Conversion
With the ability to auto-template events, your objects' data types must be numeric. Creating a point conversion provides you with this ability. In the screenshot example at the end of this paragraph, if an object has a database type of TEXT with the acceptable value of Occupied, you can convert this to a numeric value to represent "Occupied".
- In Connect, choose the Configuration Explorer icon.
- On the left pane, expand the Agents tree on the left pane and choose the device.
On the right pane, right-click on the object, and then choose Properties.
On the General Settings tab, choose the Conversion drop-down, choose Custom, and then choose Edit.
In the Conversion Editor, choose the Case Builder button.
Choose Add.
- In the Edit Expression window, double-click val on the Stored Objects tab within the window to add this to the expression window.
- Choose the LIKE button to add to the expression.
Choose the VAL button. In the pop-up window, enter Occupied.
The text must match the word exactly as returned by the point being converted, including case. For example, true or True.Choose the Result tab on the left.
- Choose the VAL button and enter 1.
- Choose OK in the pop-up window.
- Verify the expression is 1 and then choose OK.
In the Case Builder window, enter 0 for the Default Value.
- Verify the Case Expression is
CASE WHEN {val} LIKE 'true' THEN 1 ELSE 0 END
. Note that you can highlight and copy then paste the text in any text editor to use for Point Conversions for other objects with the same variables. - Choose OK.
- Repeat this process for each of the objects that have a Text data type and will be used in Templated Analytics. These are typically Occupancy, Heat Cool Mode, and some Heating or Cooling Outputs.
- If the object text is different, for example True as compared to true, then the text must be edited. The expression would be
CASE WHEN {val} LIKE 'True' then 1 ELSE 0 END
. - Other sample expressions may be:
CASE WHEN {val} LIKE 'Occupied' THEN 1 ELSE 0 END
CASE WHEN {val} LIKE 'occupied' THEN 1 ELSE 0 END
CASE WHEN {val} LIKE 'Heat' THEN 1 ELSE 0 END
CASE WHEN {val} LIKE 'heat' THEN 1 ELSE 0 END