When you work with a Contract, you work with items from source apps added to it. These can be ELMA365 apps from any workspaces or solutions. To add a new source and configure the way its fields are displayed on a contract’s page, you need to match the source app’s fields with the contract’s fields. After that, values of the app’s fields will be passed to the Contract fields. You will be able to use them as variables in business processes and scripts.
There are two groups of fields used in contracts:
- System fields. These are properties added to each contract by default. Most of them correspond to fields that exist in each ELMA365 app: ID, Created on, Author, Changed, Editor, Deleted, and Name. There is also a special field added only to contracts: Link to original. This field helps to link the contract item with the original app item. This field is convenient when you need to access the original app item in business processes or scripts.
System fields cannot be deleted. When you add a new source to the contract, the app’s and the contract’s system fields are matched automatically.
- Custom fields. To let other app properties (apart from system fields) be passed to the contract, you need to add fields to link them to the contract’s context. Note that to let contract and source fields be properly matched and linked, their types need to be the same. Before you add a new source, make sure the app includes fields that can be matched with each field of the contract. Otherwise, it will be impossible to link the app to the contract.
Adding contract fields
You can add custom fields to a contract while creating it, in the Form settings window. If you skipped this step or if you need to change the contract’s properties, you can do it in Contract settings.
When you add fields, keep in mind that each source app that is going to be linked with the contract needs to include a field of the same type for each field of the contract. Otherwise, it will be impossible to link them.
To open the Contract settings:
- Click the gear icon to the right of the contract’s name.
- In the menu that opens, select Contract fields.
- The Contract settings page with a list of all added properties will open. Click the +Add button on the right.
- In the window that opens, select the field’s Type* and specify the Display Name*. Specify other field settings that may vary depending on the field’s type.
- Click the Create button. If you need to add another field, click Create & add new.
The new field will be displayed in the list of properties. To delete a property, select it in the list, click the Delete button above the list on the right, and confirm the operation. Note that you cannot delete system fields from a contract.
As you create and configure fields, you can enable the Search and sort by field option. You can also enable Full text search for fields of the String type. In this case, you can search by parameters on a contract’s page. To do that, click the icon in the search bar, specify the parameters, and click Search.
If you’re going to use certain search parameters more than once, you can save them as a filter. Filters you create will be displayed on the side panel of the Search by parameters window. To apply a filter, click its name.
Moreover, you can view items that were deleted from a contract. To do that, open the Search by parameters window and click Removed in the upper right corner.
If you want to learn more about searching for app items using search parameters, read the Search and Filters article.
Example of field matching
Let’s consider an example of how contract fields and source fields interact.
Let’s say you created the “Employee documentation” contract, and you want to link it with two apps, “Resumes” and “Employment agreements”.
A contract is an empty interface that items from other apps are passed to. To link a contract with apps, you need to add custom properties to the contract’s context. Data from other apps (for example, the responsible HR manager or the attached document) will be passed to them. Note that an app cannot be properly linked with a contract if the contract doesn’t include fields of the same types.
Let’s add a field for the HR manager to the contract. To do that, go to Contract settings > Contract fields as described above and click the +Add button. Let’s name it “HR manager” and select the Users type. Now let’s add a field of the Files type the same way and call it “Document”.
Now you can open Source settings and add the “Resumes” and “Employment agreements” apps to the contract. As you add these source apps, match the “HR manager” contract field with the “Responsible manager” field from both apps. Then link the “Document” field with the “Resume file” and “Agreement file” fields.
Note that if the contract’s and the source app’s fields have the same name and type, they are matched automatically.
If your company has multiple legal entities, you can state which one is specified in each employment agreement in a separate contract field. Information about legal entities is stored in My legal entities system app. To pass the value of the “Legal entity” field in the “Employment agreements” app, you can add an App type field to the contract. However, the contract’s link to the “Resumes” app will be lost, as this source app doesn’t have a field of the App type. This app will be highlighted red in the list of apps on the Contract settings page.
Found a typo? Highlight the text, press ctrl + enter and notify us