Edit documentation Edit document
GH-Elements

Data Reference

Data Reference is a gh-element that allows to automatically pull data from other items. It works only in pair with item reference. Depending on the value of the item reference, it identifies the item and retrieves the corresponding data from the fields that were selected in the settings.

Functional Characteristics

This element is useful for automatic data extraction that can be used for automatic filling the documents. User can also use data reference for maintaining data integrity across multiple applications.

Value Format

This element retrieves the value via item reference, but does not always contain it. The data reference is only relevant when Use Save Value is enabled.

{
    "field_value": "john@dow.com"
}

Element Options

This gh-element has three groups of settings.

Field Settings

The first group is a pair of standard field settings.

Settings of data reference field

Options And Cases Settings

Next two groups contains main element settings. They are the most important for data reference work.

Settings of data reference options and cases

Name Description
Field To Watch allows to select the item reference field for with the element will be watch; details...
Use Self Value allows to use the first select value all the time; details...
Use Save Value allows to save selected value; details...
Application allows to select the source application; details...
Field allows to select the source field; details...
Filter allows to add conditions which filter items; details...
Edit allows to edit or delete the case; details...

Field To Watch

The current gh-element with this function determines which field the information should be pulled from.

Use Self Value

Due to this function the data book stores the first value entered and then uses it as its own value. This means that the value of its field will be the same for all values of the element reference.

Use Save Value

This function allows you to save the data as a field value. It can only be used when the Use Self Value function is disabled.

Application

This is the source application from which the data will be taken.

Field

This field is the source of the data.

Filter

This feature allows you to add filters that determine what data can be displayed in this field.

Edit

There are two buttons here. One allows you to edit a case, the other allows you to delete it.

Default Value Settings

As you may have already gathered, these settings are responsible for the default value of the data reference.

Settings of data reference default value

Name Description
Use default value allows to use the default value

Use Default Value

This function allows you to use the default value after applying the item.

Element Style

The data reference style is configured using standard style options and a few additional ones from general style settings. You can also change its type of interpretation, then its appearance will also change.

Style of data reference element

General Settings

General style settings of the data reference contains a couple of interesting options. They increase the capabilities of the element.

General settings of data reference style

Name Description
Editable descendants allows to change the source data; details...
Show field name for descendants allows to show the field name of the source data; details...

Editable Descendants

This element allows you to change the data in the source (ancestor) fields through the descendant.

Show Field Name For Descendants

This function allows to show the field name of the data ancestor in descendants.

Data Model

The data model contains the values of all the settings that have been applied to the item.

{
    "data_model": {
        "cases": [{
            "app_id": "27904",
            "field_id": "648759",
            "filters_list": []
        }],
        "default_array_value": [],
        "interpretation": [],
        "use_default_value": false,
        "use_save_value": false,
        "watch": {
            "field_id": "680567"
        }
    }
}
Name Type Description
cases array contains all configured cases of the element
app_id string contains ID of the source application
field_id string contains ID of the source field
filters_list array contains all filters which filter items for the case
default_array_value array contains array of the element default data
interpretation array contains all element interpretation types
use_default_value boolean shows whether the default value is used or not
use_save_value boolean shows whether the selected value will be saved or not
watch object contains data about the element that the current element is observing
field_id string contains ID of the field to watch

Filtration

Since a data reference can contain different types of data, it can be filtered using a variety of filters.

Interpretation

The current element has only two interpretation types. Their differences mainly depend on general style settings.

Types of data reference interpretation

Input With Name

This type displays the value of the selected field. It allows you to edit the source data if the corresponding settings are enabled.

Default

This is the default type that displays the data corresponding to the selected item reference value.

Value

The last type of interpretation displays the value of the field even if it is not saved.