Setting up field dependencies
To ensure a seamless and meaningful user experience, the Continia Expense App and the Continia Expense Portal use the settings in Business Central to set up constraints between different fields. These constraints, known as field dependencies, consist of conditions and expectations.
By defining specific conditions, corresponding expectations are enforced. For example, if the dimension 'EXPENSE TYPE' has: Any value (including specific values such as 'FOOD'), then set the expected 'PROJECT' value to one of the following:
- Must have a value
- Must have a specific value
- Must have no value
Vigtigt
Field dependencies apply across all document types: expense reports, expenses, mileages, and per diems. As long as both fields are configured on a document type (for example if DEPARTMENT and PROJECT have a dependency) then it will apply for both expenses and mileage, as long as they are both configured.
There are two types of field dependencies:
- System field dependencies - Expense Management automatically calculates these based on your setup. For example, if you set a dimension as mandatory for a specific expense type, this generates a corresponding system field dependency that makes this dimension mandatory if that expense type is used.
- User-defined field dependencies - these are dependencies that you can freely configure to enforce rules and expectations when you create expense documents.
Add a field dependency
You can choose field types from the following field types table to create a system field dependency or a user-defined field dependency that you create yourself.
To set up field dependencies:
Search () for and select Field Type Dependencies (Continia Expense Management).
On the action bar, click + New.
Refer to the following fields table to help fill out all the required fields, then click OK.
On the action bar, click Consistency Check to enable this rule, then click OK.
On the action bar, click Continia Online > Synchronize with Continia Online and the rule will be pushed to associated mobile devices.
Note
The field dependency is only active if the field type and reference field type codes are Configured Fields.
Update system dependencies
System field dependencies are determined whenever you select Update System Dependencies. All resulting rules will be added to the Field Type Dependencies page. If any conflicts are detected in a field, a message displays, and the conflicting rules are disabled. When you select Update System Dependencies, a consistency check performs automatically, which reevaluates conditions.
The list of system field dependencies is calculated and updated periodically but you can also update it manually to reflect the latest setup changes in your company. When you update system field dependencies, they're created automatically on the Field Type Dependencies page, but you will always have to activate them manually, giving you complete control.
To calculate and update system field dependencies:
- Search () for and select Field Type Dependencies.
- On the action bar, click Update System Dependencies, then OK.
Expense Management updates from many places and determines the system field dependencies based on the following:
- Expense type with attendees required
- Default dimensions
Run a consistency check
When adding a new field dependency, you’ll notice that the dependency is disabled, this is by design to avoid conflicts, and a message displays: “Run the Consistency Check action to enable this dependency.”
Bemærk
An Admin must check the System Dependencies, run the Consistency Check, and fix any conflicts.
The consistency check helps you configure dependencies correctly, detect if rules have no use or are in conflict with one another, check for rule consistency and potential conflicts, and provide suggestions for solving any issues.
To run a consistency check:
- On the action bar, click Consistency Check, then click OK.
- Click Update System Dependencies to start the consistency check automatically.
- Click OK.