« Back to Product

Documentation

GetValueFormatted

 string GetValueFormatted (int $VariableID) 

Parameters

VariableID

ID of the variable

Returns

Value of the specified variable, formatted according to its presentation or profile

Description

The function returns the content of the IP-Symcon variable with the ID VariableID after being formatted according to the variable's presentation or profile. If a presentation is assigned to the variable, it is used for formatting, otherwise the variable profile. If the variable has neither a presentation nor a profile, the value is returned unformatted as string. The formatted result is always returned as string.

Example

echo GetValueFormatted(47788); //Profile = ~Switch
//Returns: On or Off

echo GetValueFormatted(46250); //Profile = ~Temperature
//Returns: 17.5 °C
Any questions?