Open-AudIT can store information in additional fields that are associated with each device.

Once an Additional Field has been created it can be used in queries and groups just like any other attribute in the database.

How Does it Work?

Fields attributes are:

If you select a List type, an additional field will appear called Values. You should put a comma separated list of selectable values here. These will display in a dropdown box whenever the field is edited.

Like most other attributes, Additional Fields can be bulk edited. Use the Bulk Edit function as you normally would and you will see the Additional Fields are available for input.

You can edit the value of the Additional Field for each individual device in the group you have assigned the field to. View the device details screen, open the section containing the field and (if you have sufficient access) you can click on the field value to edit it, as below. In the below screenshot you can see I have assigned the "Test List" field to the 'custom' section.

Creating a Field

To make another network go to menu: Manage -> Fields -> Create Field. 

View Field Details

Go to menu: Manage -> Fields -> List Fields.

You will see a list of fields. You can view a field by clicking on the blue view icon. You can also edit or delete your fields.

Database Schema

The schema for the database is below. It can also be found in the application if the user has database::read permission by going to menu: Admin -> Database -> List Tables, then clicking on the "fields" table.

CREATE TABLE `fields` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL DEFAULT '',
  `org_id` int(10) unsigned NOT NULL DEFAULT '1',
  `group_id` int(10) unsigned NOT NULL DEFAULT '1',
  `type` enum('varchar','list') NOT NULL DEFAULT 'varchar',
  `values` text NOT NULL,
  `placement` enum('custom','system') NOT NULL DEFAULT 'system',
  `edited_by` varchar(200) NOT NULL DEFAULT '',
  `edited_date` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
  PRIMARY KEY (`id`)

Example Database Entry

Field are stored in the database in the "fields" table. A typical entry will look as below.

         id: 1
       name: Ink Type
     org_id: 2
   group_id: 8
       type: varchar
  placement: custom
  edited_by: Administrator
edited_date: 2017-05-22 00:26:38

API / Web Access?

You can access the /fields collection using the normal Open-AudIT JSON based API. Just like any other collection. Please see the API documentation for further details.

API Routes

Request Method
Resulting Function
URL Example
Example Response
collection/fieldsReturns a list of fields.fields_collection.json
read/fields/{id}Returns a field's details.fields_read.json
update/fields/{id}Update an attribute of a fields entry.fields_patch.json
create/fieldsInsert a new fields entry.fields_create.json
delete/fields/{id}Delete a fields entry.fields_delete.json

Web Application Routes

Request Method
Resulting Function
URL Example
GETncreatecreate_form/fields/createDisplays a standard web form for submission to POST /fields.
GETyupdateupdate_form/fields/{id}/updateShow the connection's details with the option to update attributes using PATCH to /fields/{id}