CHILD_

Parameters

Child Asset Name: A name (or part of a name) to search for in the assets that are located inside (within the Location relationship) of the Active Asset.

Property Name: The name of the property on the child asset. Note that this is optional - if you don't include the property name, the ID of the child asset will be written into the space.

Example

Let's assume you wanted to make an SVG file for a generic tank on your site.

You could use the following code to connect to a level sensor inside that tank.

connection.Subscribe("[CHILD_Level Sensor_Level",function (val) {
		$('#tanklevel').html(parseFloat(val).toFixed(1) + "%");		
	});	

This would search the tank for any asset inside it with 'Level Sensor' in its name. If found, it the function would be called every time its Level property updated.

You can also create hyperlinks using the CHILD function without the property name. For example…

<a href="[SITE]/dashboard/[CHILD_Left Motor]"><rect x="0" y="0" width="50" height="50" fill="green"/></a>

The above code would add a link to the rectangle. If you clicked on it, it would take you to the dashboard page for the Left Motor asset.