|
Adding Custom Properties |
Top Previous Next |
|
Every Device has a number of standard properties that control communications with hardware and server-side data processing, such as Synchronization Period or Use Extended Status. However, it may be necessary to associate some non-standard information with a Device. For example, IT infrastructure management tasks require a way to easily find out current physical location of a Device, i.e. building, floor and room number. AggreGate permits to add any custom data to any Device account or system resource using Common Data facility. This tutorial illustrates how to add Device Location info to every device within a certain AggreGate installation using AggreGate Client. 1. Creating a Common Table First, we need to create a Common Table that will describe the format of our custom properties. A copy of this table will later be added to every Device account. Double-click the Global Common Data node (
Click OK to add create new common table. It will appear in the System Tree:
2. Adding Location Fields to Common Table If table configuration dialog did not pop up automatically after table creation, right-click on the newly created table and select Configure Common Table ( Click on Add Row (
Click on Selection Values and enter several buildings. Here is an example:
Leave other values at their defaults and add two other fields:
and
Here is what Fields table should look like:
3. Assigning Device Location Table as a Custom Property Now it's time to tell AggreGate Server that our new table is a Device's custom property. Switch to the Custom Properties tab and check Use common table as custom property. At this point Validity Expression field will become editable. It specifies what contexts to associate our table with. Click on [...] button inside Validity Expression field to open Expression Builder. 4. Writing Validity Expression In our case, the validity expression should resolve to TRUE for any Device context and to FALSE for all other contexts. Device Context article in the Context Reference states that context type for Device contexts has the following form: device.DEVICE_TYPE It means that any context type starting with "device" matches the device context. Select startsWith function from a Functions drop-down list to insert it into the expression:
According to the description of this function, it has two String parameters and returns TRUE if first string starts with a second ("prefix") string. Click inside function parameters and double-click Context Type in the Relative References area to add context type as a first parameter. Then manually add "device" string literal as a second parameter:
Click OK twice to apply changes to Validity Expression and Common Table configuration. Now every Device in the system has its own Location property. 5. Editing Device Location To access Device Location property of a certain Device, right-click on it and select Edit Custom Properties.
Now you can fill in the Device Location tab:
|