Skip to main content

 

 

Coupa Success Portal

Bespoke Template Data Types

Overview

Out-of-the-box, DocGen ships with a number of data types, allowing the Power Author to more tightly control the allowed values/format for a particular data point. For example, the data type could be a “String”, which allows any text. However, if you want to capture a date, it is required to be a bit more precise. Should it be short form or long form? US format or another country’s format, etc.?

Within DocGen all data types are defined within the “logictypes.xml” file, stored in the DocGen repository. If a particular data type is not available, it is possible to extend the list of data types by creating data type definitions in “logictypes-local.xml”. (These are placed in a separate file to ensure they are not overwritten on upgrade).

Similarly, DocGen also has a number of ‘scripts’ defined in the “scriptslibrary.xml” file, stored in the DocGen repository. Scripts are used for common data transformations, e.g. changing a date from US format to UK format. It is also possible to extend the list of available scripts by adding definitions in the “scriptslibrary-local.xml” file.

Considerations

  • Always check that an existing definition does not already exist. The name tries to be descriptive, but it is the definition itself which ultimately determines how it works.
  • When promoting templates between environments, if bespoke data types/scripts have been used, ensure that you also export these files to ensure the template will run in the new environment. (This is only required when these files have been modified.)
  • Power authors will not see the actual definition, just the names of the data types or scripts. As such, ensure that the names of bespoke data types / scripts convey the definition as much as possible.

Things to avoid

  • Only add definitions that will be used. Avoid having a multitude of definitions for “just in case”, as this will just make it more confusing to the Power Author when needing to select the correct data type
  • Was this article helpful?