Følg

Configuring tree type of field

Configuring tree type of field

Tree is a field type that gives you the possibility to select values from a tree structure. It can be used in two different ways:

  1. As a multilevel list, where you can browse for a value for a field
  2. As a linked list (also called Cascading ListBoxes, Cascading Lists, Chained DropDowns), where the values of a dropdown control is dependent on the selected value of some previous dropdown control

Example:                                   1. Multilevel list                                                                                      2. Linked list

Tree1.jpg           Tree2.jpg
The difference between the two options are, that a multilevel list will as a result only fill in one iProperty value, where the linked list will as a result fill in many iProperty values (in the example two iProperty values).

Setting up a tree 

Select a type for the field. In this case Tree:

ScreenHunter_04_Nov._16_11.10.jpg

Tree options

The tree structure and the values in a tree are set up using Tree values option. To define the tree, click on Edit button:

Tree3.jpg

In the TreeEditorDialog the tree structure is built up by adding nodes to the tree. To add a child node, click RMB (Right Mouse Button) on a node and choose Add Child Node. A node can be removed by clicking RMB on a node and choosing Remove. For every node you need to define the Name, Alias name and if the the value can be selected (User can select=True/False).

Note: You can add additional root nodes by clicking RMB, when the mouse pointer is not pointing on the tree (but somewhere else in the window), and choosing Add Root Node:

Tree4.jpg

If needed, the configuration can be Exported and Imported (Export/Import).

As a result, you have defined a multilevel list:

Tree5.jpg            Tree1.jpg

 In the example the chosen value from the tree will be written to the iProperty named TOLERANCE.

 

Linked list

A linked list is built in the same way as a multilevel list. The only difference is, that you need to define some additional iProperties and link them to the defined tree.

In the example the TOLERANCE iProperty is first renamed to GENERAL TOLERANCE:

Tree6.jpg

This iProperty is automatically linked to the first level (node level) in the Tree.

To be able to choose the value for the second level in the tree (according to the first level), you need to define one more iProperty. Choose an existing iProperty or define a new one. In this example we define a new one called TOLERANCE. Remember to select as type Tree:

Tree7.jpg

From the Tree options, select Controlled by. From the Dropdown you should find the iProperty where the tree was defined. In the example the iProperty is GENERAL TOLERANCE. Select that iProperty and you are ready. You have now defined a Linked list.

Note: If you have defined a tree with more levels, you need to define additional iProperties and link them to the tree in the same way.

 

Example: When using the linked list that was defined in the example, you notice that if you choose as the GENERAL TOLERANCE value "ISO 2768", you are only able to choose as the TOLERANCE value "ISO 2768-1:1989" or "ISO 2768-2:1989". If you then decide to change the TOLERANCE value to "ISO 22034", it  will automatically change the value for the TOLERANCE to "ISO 22034-1:2007" (the first value that can be chosen). You can then choose as the value for the TOLERANCE any of the allowed values "ISO 22034-1:2007", "ISO 22034-2:2007" or "ISO 22034-3:2007":

                                             If "ISO 2768" is chosen                                                                                     If "ISO 22034" is chosen

Tree2.jpg                          Tree8.jpg

Var denne artikkelen nyttig?
0 av 0 syntes dette var nyttig
Har du flere spørsmål? Send oss en henvendelse

0 Kommentarer

logg på hvis du vil legge inn en kommentar.
Levert av Zendesk