Item Reference
Item reference is a special gh-element for creating connections between items. It a complete instrument that allows to places values from one application in items of others.
Functional Characteristic
Use this element to connect task with certain projects. Due to it, you also can add new items in the source application. It is very useful for controlling data and ensuring its integrity.
Value Format
Item reference value looks like this:
{
"field_value": "23823.2992890"
}
It consists of two parts:
-
application ID: 23823
-
item ID: 2992890
The both IDs belong to the source application.
Item reference is used mostly in different methods. Due to this we can connect a few applications, update linked data without any problems.
Element Options
Element options of item reference consists of only two blocks, Field and Reference settings. As you can see, this gh-element does not have default settings and default value correspondingly. Though it has extra settings for options from Reference Settings.
Field Settings
In field settings, item reference has only two options, besides the standard Field Name and Name Space.
Name | Description |
---|---|
Multiple value | allows to add multiple value; details... |
Express add | allows to add entered value to the source item, if it does not exist there; details... |
Multiple value
This function allows to select the multiple value.
Express add
Enable this function to add items to the source application from the current application. It also has advanced settings.
Reference Settings
Name | Description |
---|---|
Application | allows to select the source application; details... |
Field | allows to select the source field; details... |
View | allows to select the view that will be opened; details... |
Filter | allows to add filters for items; details... |
Settings | contains additional settings of the express add; details... |
Edit | contains two buttons that allows edit and delete option; details... |
Application
This is the application from which the data will be taken and to which the field will be referenced.
Field
The values of this field will be used as values of item reference field.
View
This is the view of the source application that opens after clicking on the reference value.
Filter
Use filters to configure which items can be selected in the item reference and which cannot.
Edit
The last column contains edit and delete buttons.
Settings
As was mentioned above, this group of settings are advanced settings of the express add. Specifically, it allows you to set the default values of any field in an element, just like in Add Items element.
Additional Reference Settings
With these settings, you can select the item reference field from other application and leave notes about settings of the current.
Name | Description |
---|---|
Field for reference | allows to select the item reference setting; details... |
Notes | allows to note something in settings; details... |
Field for reference
This is a reference field to the item from source application, which will be automatically filled with data from the certain field selected in its settings.
Notes
This field is useful to make notes about the current set of settings. Use it to mark which application is being used for reference or what data will be added to that application's form.
Additional Fields Settings
The current group configures default values for fields. Depending on Show Input the table has two views:
-
Source Field
-
User Value
Name | Description |
---|---|
Field | allows to select the destination field; details... |
Show Input | allows to select the type of field value; details... |
Source Field | allows to select the field whose value will be taken for filling other field; details... |
User value | allows to enter the value for the field; details... |
Destination Field
This is the field that will be filled with certain data.
Show Input
This function allows to set the type of the value that will be entered in selected field. If it is on, the User Value is used. If it is disabled, the Source Field is used.
Source Field
This is the field whose value will be used for filling the destination field. This value depends on the element from which the new element is created.
User value
This is the value entered in the settings that is used to populate the destination-field. It will be the same for all new items.
Element Style
Despite the different types of source fields, Item Reference has a standard set of style settings and one additional setting. Its interpretation types are also independent of the source field.
General Settings
The only additional style setting is located in general settings.
Name | Description |
---|---|
No Link | allows to disable the link |
No Link
This function allows to disable the link of the selected value. This means that if the No Link option is enabled, the user will not be able to follow the link and open the original item by clicking on the value.
Data Model
The data model of the current element consists of element settings:
{
"data_model": {
"express_add": 1,
"interpretation": [],
"multiple_value": false,
"refs": [{
"app_id": "38996",
"field_id": "645003",
"filters_list": [],
"settings": {
"notes": "Your notes",
"reference_field_id": "623002",
"refs": [{
"field_id": "643402",
"source_field_id": "683450"
}]
}
}],
"view_id": "1635936"
}
}
Name | Type | Description |
---|---|---|
express_add | boolean |
shows whether the express add is used or not |
interpretation | array |
contains all interpretation types |
multiple_value | boolean |
shows whether the element accepts multiple value or not |
refs | array |
contains all the settings of the reference instances |
app_id | string |
contains ID of the source application |
field_id | string |
contains ID of the source field |
filters_list | array |
contains all filters of the source items |
settings | object |
contains additional settings of the express add |
notes | string |
contains notes of the express add |
reference_field_id | string |
contains ID of the item reference field |
refs | array |
contains additional settings of reference of the express add |
field_id | string |
contains ID of the destination field |
source_field_id | string |
contains ID of the source field |
view_id | string |
contains ID of the source view |
Filtration
Despite the complexity of item references, there are five filters that can filter them out:
Interpretation
Item reference has a few not very different interpretations.
Input With Name
This type of interpretation allows to display and change selected value. Due to it you also can delete value from the field.
Default
Default interpretation for item reference is the same to the one above.
Input List
The last interpretation type for item reference also allows to display selected value, but not to change or delete it.
Value
The last interpretation type displays the value of the selected item.