Import/Export User-Defined Labels

Import/Export through Data Management Framework

We provided several data entities to support import/export scenarios for User-defined labels using the Data management framework. These are:

  • Docentric User Defined Labels Groups,
  • Docentric User Defined Labels Languages,
  • Docentric User Defined Labels,
  • Docentric User Defined Labels Translations,
  • Docentric User Defined Labels Combined.

 

 

The first 4 data entities from the above list can be used for transferring the content of only one related table (Label Groups, Label Languages, Labels, Labels Translations). They need to be used in the same order as listed above, because Translations depend on Labels and Languages, while Labels depend on Labels Groups.

Alternatively, you can use only one entity, the last one from the list: Docentric User Defined Labels Combined, which combines the previous 4 individual data entities. If you experience some difficulties using the Docentric User Defined Labels Combined data entity, we suggest you switch back to the individual data entities.
For Import/Export purposes we recommend using the XML-Element data format.
If you plan to additionally modify the data prior to importing it into the target environment, it may be more convenient to use the Excel data format.

If you choose to use Excel, then be careful when adding new Labels and Labels Translations into the exported Excel file. In the data entities where GLOBALLABELID field appears (e.g. @DOC_LABEL:LabelId) you could get the following error: That function isn’t valid.

This error comes from Excel which considers every cell content starting with an '@' character as a function.

To prevent this error, the formatting of Excel column which contains the GLOBALLABELID values should be changed from General to Text:

After you change the formatting for GLOBALLABELID column you will be able to add new Labels and/or Labels Translations without facing the Excel error.

There is one more consideration if you decide to use the Docentric User-defined Labels Combined data entity and to add new labels in Excel before importing. In that case, ensure to match LANGUAGEID and LINENUM values as in already existing Labels. For example, in the image below we already had the InvoiceNumber label, where you can see that the languages have the following LINENUM values assigned:

LANGUAGEID LINENUM
de 4
en-us 1
es 2
fi 5
it 3

When we add in Excel a new LABELID with a name NewLabelId, we copy the already existing (range of cells from LANGUAGEID to LINENUM, into the corresponding range for NewLabelId, to make sure that the correct LINENUM for each LANGUAGEID is used. Then we can enter the TRANSLATION text as needed.

Update through Excel Add-In

Besides import/export scenarios, you can use the previously listed data entities to update the labels and their translations in Excel, which you open from the corresponding User-defined label setup forms.

 

 

If you choose to update the labels and their translations using Excel Add-In, it might happen that you enter a new Global label ID in a next available cell (see cell A3 below) and get the following error: That function isn’t valid:

This is because you are trying to add new data outside of the cell range linked to the D365FO data (A1 to B2 in the image above). To avoid this error, you can first manually expand the cell range linked to the data:

You can also use the trick with changing the formatting for entire Global label ID column into the Text type:

See also

Docentric Label Setup >>
How to Use Deployment Tools >>

IN THIS ARTICLE