Zurück

Automatically populate field values

  • 5 Min.

"Some vendors send invoices with different date formats, or with contact names that are a variation of what we have in Business Central. It slows me down to always make the same corrections to the recognized values. So I want to find out how I can set up the template to automatically change these values to what I need them to be."

Ester, Accounts Payable at Cronus

With smart use of field formulas and translations in Document Capture, you can use the recognized text and values in a document to derive the value you need for Business Central. Adding these formulas and translations to a template means that these transformations are automatically applied to future documents you receive from the same vendor.

Take a tour in the solution

In this scenario, you're working with accounts payable at the demonstration company, Cronus. You want to streamline how you assign approvers to purchase invoices from one vendor, based on the department that the purchase is related to.
To set it up, you need to update the fields on the source template. The steps to follow are:

  • Apply a formula to duplicate the value of the Department field into the Approval Flow field.
  • Set up translations from each department value to the relevant Approval Code field.

Other common scenarios using translations and formulas

There are many examples of how you can reduce a lot of repetitive manual entry by using template field translations and formulas. Different scenarios use these features in coordination with each other or in isolation, depending on the goal of the task. Below are four worked examples to inspire you.

1. Assign a department value based on a combination of values in Our Contact and Project

On the template field card for Department:

  • In the Formula field, create a combination of the Our Contact and Project fields. For example, OURCONTACT+&+JOBNO. You can use the three dots to select from a list of available template fields.
  • Create a translation from using the target combination. For example, RB&PR00050.
  • Create a translation to a specified department. You can use the three dots to select from a list of available values.
Template Field Card_Formula_Translations

Tipp

You can create multiple field translation lines to handle different combinations of Our Contact and Project. For example, an additional field translation line could handle the combination of JO&PR00010 and translate this value to the SALES department.

2. Translate the project name in a received document to the Project code

On the template field card for Project:

  • Create a translation from the text recognized in the received document. For example, DEERFIELD.
  • Create a translation to a specified project code. You can use the three dots to select from a list of available values.

Tipp

You can create multiple field translation lines to handle variations in how each project is described in received documents. For example, an additional field translation line could handle when the received document text is ‘Deer Field’ instead of ‘Deerfield’.

3. Populate the Purchaser field from the Our Contact value

From the document journal or document card, recognize the purchaser's name from the received document for the Our Contact field.
Then, on the template field card for Purchaser:

  • Enter ‘Project’ in the Formula field. You can use the three dots to select from a list of available template fields.

4. Assign a G/L account based on the project

On the template field card for No.:

  • Enter ‘Project’ in the Formula field.
  • Create a translation from a required project value.
  • Create a translation to a specified G/L account.

Tipp

You can base the G/L account on a combination of values instead of just on the Project field. The set up for this is like the above example, “Assign a Department based on a combination of values in Our Contact and Project”.

More resources

Check your knowledge

      1

      Match each template field term with its correct definition.

      A
      Formula
      B
      Translation from ...
      C
      Translation to ...
      D
      Template Field Card
      2

      Why are translations and formulas used when processing received documents in Document Capture?