You are here: Home / Documentation / Administration Center / 6. Old Administration Settings / 6.12 Workflow Diagrams / 6.12.1 Workflow Actions / Check Presence of Relation – Action Description

Check Presence of Relation – Action Description

Check Presence of Relation action is intended to control whether or not a link is created between a given item and another selected item in the eWay-CRM system. For example, whether or not the Handover protocol of a project type is attached, when the project continues to the Invoicing status.

Relation Type Enter the relation type.
Related Table Name Enter the table name in the database you wish to check.
Empty Message Intended for entering the text to be displayed when the desired relation doesn't exist.
Fields to Check

A new relation to be checked can be added to the Fields to Check table via the Add button. The table contains two columns:

  • Enter the database field name to the Field column that you wish to check. The database field name can be found out if you click into the field in the item window and the press Alt+F1 - the name of the field/column will show.
  • The Value column field is intended to enter the expected value. In the same way you can enter more relations that the item has to have, if it needs to be allowed to continue to another workflow status.

System variables can be used in fields during actions creating. For more information, go to System Variables Available in Actions.

Depending on the Completion Level adjustment from the last step, condition completion will be mandatory (Cannot Ignore for selected user groups) and until the condition is completed, the transition will not be available for user. In the case of the less strict control variant (Can Ignore) the notification will be displayed to the user that the expected and real values are not identical and whether he wishes to continue to the next workflow status or not.

If you wish to save the currently defined action for future use in another workflow type, you can do it via the button Template->Export. If you have already defined and exported an action of the Check Presence of Relation type from earlier workflow editing, you can reuse it via menu Template->Import. More information about import and export of workflow actions can be found in the chapter: Import and Export of Workflow Action Definitions.

Example – Check If the Offer Is Attached to the Project

Relation Type

The relation type that we wish to check. You can remain it blank for most cases. If you want to search specific relation between item and its superior item, type in SUPERIORITEM.

Related Table Name

Table name in the database, to which the relation of given type should exist. It will be the Documents table in our case.

Empty Message Text that will be displayed to the user when the relation doesn't exist, e. g. The offer is not attached.

Fields to Check

Field that will be checked. We want to check whether the attached document type corresponds with value contract. So by clicking on Add button we need to insert DocTypeEn value.

Expected Value

The value to be checked with the Fields to Check of the related object. We will use an SQL request that returns the identification of the Offer value in the drop down menus table. We fill in:

SQL#SELECT EnumValues.ItemID FROM EnumValues INNER JOIN EnumTypes ON EnumValues.EnumType = EnumTypes.ItemID WHERE EnumTypes.EnumName = 'DocumentType' AND EnumValues.en = 'Offer'