Return Information from a Related Item
If you store any data as documents, you can get all required information from them and show it on your workflow item form. To do so, you should make a reference to the application your workflow item belongs to. To retrieve particular data from a related item, use the following expression pattern:
Reference_Field_ID — the identifier of a field, which references to another item;
Related_Item_Field_ID — the identifier of any field of the referenced item.
To see how it works, you can use any existing application or, for example, create the «Customer» application for test purposes. Also several customers need to be created in the application as documents. If you store customers as documents, it is convenient to return any customer’s information to a support ticket or any other workflow item.
To create the rule:
1. Open workspace, open an application inside a workspace and click «Fields».
2. Create the «Customer» field of the Reference type and select the required application as a reference. This field references to the application and will be used for selecting one of related items on the form (customers in our example).
3. Go to «Form» and drag the created field into the form of a workflow item.
4. Return to «Fields» and create the required number of fields of the Reference type to display information returned from a related item. For example:
- Service level (ID: Service_Level) — calculated field, shows the service level of the customer has been selected;
- E-mail (ID: Email) — calculated field, shows the e-mail address of the customer has been selected.
5. Type the following expression in the «Field Expression» tab of the «E-mail» field:
6. Type the following expression in the «Field Expression» tab of the «Service level» field:
Create a new workflow item, fill in the required boxes and select a customer. Click «Save». The customer’s service level and e-mail will be displayed automatically in the corresponding fields.