GH-Elements

Print Document

Print Document is a gh-element that allows to print items or other data from application. Namely, it allows user to print a document filled with data from some items. This button works in conjunction with the MSE text editor, where user can create document templates.

Functional Characteristics

The direct purpose of the element is to print documents. When the user clicks the button, a view with the final version of the document opens. In this way, the user can check the document before printing.

Value Format

This element does not have any value.

Element Options

Current element has two blocks of settings.

Field Settings

The first block contains the standard field settings and the main settings of the element that sets up the data sources.

Settings of print document field

Name Description
Application for Printing allows to select the application whose items will be printed; details...
Template Application allows to select the app from which data will be taken for templates; details...
Template field name allows to select the field whose value will be used as a template name; details...
Template field allows to select the template field; details...
Print Item Current allows to print the item that is open at the current moment of time; details...

Application For Printing

Document templates can contain fields that will be automatically filled with certain data when the user clicks the Print Document button. That data is taken from items of the application for printing.

Template Application

This is the application from which all the necessary templates will be taken. These templates are created in the Text Editor MSE element, which allows you to define fields to fill in automatically.

Template Field Name

This is the field whose values will be used as the names of the printable template variants in Template List.

Template Field

This is the field where the document template is located. As was mentioned above, the document templates are created in the Text Editor MSE. Thus, the template field is a tiny MSE that is located in the template application.

Print Item Current

This feature allows you to print the document with the data from the current item. That is if the print button is located in the item whose data should be in the document, thanks to this function, the document will be filled with data from this element.

Template List

When user clicks on the Print Document button, the drop-down list of names of document templates will be opened. Options from the second setting block allows to add a new template to the list, edit the order of template name, and delete templates from the drop-down.

Template list of print document

Name Description
Template allows to select the certain template for the list by its name; details...
Edit allows to edit and delete the templates in list; details...

Template

The first column is consists of the names of templates which were configured in Template Field Name. These names will be displayed in the drop-down list in the order set in this settings block.

Edit

This column contains the edit and delete buttons for each pattern separately in the drop-down list.

Element Style

The current button has no special style options, only a set of standard options and its own types of interpretations.

Style of print document element

General Settings

Except for one option, the general style settings are common.

General settings of print document style

Name Description
Show button name allows to show and hide the button name

Show Button Name

When this switch is off, the button name is not displayed in any of the interpretation types.

Data Model

All element settings are in its data model: demise

{
    "data_model": {
        "doc_app_id": "27904",
        "interpretation": [],
        "print_item_current": 0,
        "ref": {
            "app_id": "28856",
            "field_id": "680375"
        },
        "template_field": {
            "field_id": "680375"
        },
        "templates": [{
            "item": "28856.3109109"
        }]
    }
}
Name Type Description
doc_app_id string contains ID of the application, the data of which are used to fill the document template
interpretation array contains all element interpretation types
print_item_current boolean shows whether the current item will be printed or not
ref object contains the data of the reference
app_id string contains ID of the source application
field_id string contains ID of the field from which names for the templates will be taken
template_field object contains settings of the source of the document template
field_id string contains ID of the field contains the identifier that contains the document template
templates array contains the list of templates
item string contains references to items with templates

Filtration

This element cannot be filtered out.

Interpretation

Since this element is a button, it has the same types of interpretation as the other buttons.

Types of print document interpretation

Default

This type displays the item as an icon with the name of the button next to it.

Icon

The second type displays an icon with the name of the button below it.

Button

The last type of interpretation allows you to display the element as a blue button with its icon and the button name.