What can we improve?

Documentation

(Edit)

Translation is in progress...
Not all topics are available at the moment and content links may be broken.

IPS_GetObjectIDByName

integer IPS_GetObjectIDByName (string $ObjectName, integer $ParentID)

Parameters

ObjectName The searched object name
ParentID ID of the object whose children object are searched

Returns

ID of the found object, otherwise FALSE

Description

This function tries to detect the object with the name ObjectName whose parent object has the ID ParentID. It will return the ID of the first object whose name matches ObjectName. If no object is found, this function returns FALSE.

The parameter "ObjectName" must not be an empty string ("").

Caution: Names in IP Symcon can be chosen freely, so they are not unique. For this reason, the command can return the ID of another object.

This function generates a warning if the ident is not found. The @ operator can be used to supress this message. Please see the PHP manual for the exact functionality of this operator.

Example

$ObjectID = @IPS_GetObjectIDByName("Rain sensing", $ParentID);
if ($ObjectID === false)
    echo "Object not found!";
else
    echo "The Object ID is: ". $ObjectID;
Deutsche Webseite verfügbar
Go to cart
Any questions?