TreeFields

Example in the "Requests" module (There is NO reference to a ticket field.)

This example shows an articulated tree structure whose nodes are loaded on first access. The editable records are loaded directly from the database when the nodes are selected and saved when changes are made. The data (user - location/customer assignment) is also taken from the i-net HelpDesk database in this case.

1. Set up connection to data source

You set up the connection to the data source in Configuration > General > Connections > Other Databases. In this case a second i-net HelpDesk test database was used. If the add-on should display internal HelpDesk data, e.g. statistical or other data from views or self-created tables, "HDS" i.e. the HelpDesk database could also be used as the name.

Fig. 2: Configure database connection

2. Creating the configuration file

DatasourceName=DB1
ForeignTableGrouping=tblGebaeude.GebID;GebBezeichnung
SelectionGrouping=tblUser.GebID
SelectionColumn=tblUser.UsrID;LastName
TableLinkedColumn=tblUser.UsrID
SelectionFilter=tblUser.deleted=0
ShowColumn1=tblUser.FirstName;FirstName
ShowColumn2=tblUser.LastName;LastName
ShowColumn3=tblUser.CostCenter;CostCenter
ShowColumn4=tblUser.Department;Department
ShowColumn5=tblUser.Email;E-mail
ShowColumn6=tblUser.Free1;Hobbies
Updateable=true 
Line Explanation
DatasourceName=DB1 Name of the datasource connection defined in Configuration > General > Connections
ForeignTableGrouping=tblGebaeude.GebID;GebName Describes the grouping level of the tree structure. This entry is composed as follows "Table name" "." "Column name Key value" ";" "Column name for node text"
SelectionGrouping=tblUser.GebID "TableName" "." "ColumnName" according to which the data of the grouped records are assigned to the nodes.
SelectionColumn= tblUser.UsrID;LastName Describes the assignment of the nodes in the second level to the records that are loaded into the text fields. This entry is composed as follows "TableName" "." "ColumnName KeyValue" ";" "ColumnName for NodeText"
TableLinkedColumn= tblUser.UsrID Identifies referenced table and column in the foreign data source: i.e. the comparison value Record-Key-Value, which must match the node Key-Value. In this case it is the same table and column, but this need not be the case for more complex constellations (see TreeList),
ShowColumn1= tblUser.UsrID;Username ShowColumnX must be numbered continuously starting at 1. This is followed by "table name" "." "column name" (database field from which the display value is to be taken) ";" and the "text of the label displayed for the field".
SelectionFilter=tblUser.deleted=0 Optional SQL expression that restricts the amount of data.
Updateable=true Specifies that write access to the record should be possible.

The file must be located in the path of the changeable HelpDesk program data.

  • Windows: C:\ProgramData\i-net software\helpdesk_System_i-net HelpDesk
  • Linux: /root/.i-net software/helpdesk_System_i-net HelpDesk
  • Mac: /var/root/.i-net software/helpdesk_System_i-net HelpDesk
  • Note: If you had already configured an alternative storage path for attachments for HelpDesk version 7.x, then this path will be used as "root" and the structure helpdesk_System_i-net HelpDesk will be created below it.

3. Defining the "TreeFields" add-on

Add-ons are configured in the Configuration > Components > Add-Ons. In the example, the specific definition of the add-on is located in the text file "Definition.txt" created in point 2.