Report functions
This document outlines the known IUCLID (“iuclid.”) Reporting Functions to support report builders creating Freemarker Report Templates (FTL). Examples are provided per function.
Level | Function name “iuclid.” (with (<parameters>) to parse) | Description |
---|---|---|
Entity | iuclid.webUrl.entityView(<document variable>.documentKey) |
Get the URL of the main Entity, such as a Substance or a Mixture. Example get the parent entity URL for a study. |
Document | iuclid.webUrl.documentView(<document variable>.documentKey) |
Get the URL of a section document. Example get the document URL for a study. |
Entity and Document | iuclid.getDocumentForKey(<IUCLID field path to reference>) |
This function gets the Document key for either an Entity reference or Document reference. Example get the reference substance name linked to a ‘SUBSTANCE’ document:
|
Entity and Document | iuclid.getSectionDocumentsForParentKey(<root entity>.documentKey, "<document type>", "<document sub type") / |
This function returns a section document key. The function should be iterated using #list to fetch all section documents Example get a list of keys for all ‘FLEXIBLE_RECORD.IntermediateEffects’ documents.
|
Sorting (Entity, Document, Repeatable block) | iuclid.sortByField(<path to repeatable block or a variable representing a repeatable list>, “<IUCLID field path to picklist>”, <list of phrases in order of preference> /> |
This function sorts an order of returned values based on the order of picklist phrases This function could condition a returned set of IUCLID Documents, e.g.:
Example return a list of studies by the order of phrases assigned in:
*Note that ‘study’ represents a list of IUCLID endpoint documents, e.g. for ‘Explosiveness’:
|
Document | iuclid.getHistoryForDocumentKey(<document variable>.documentKey) |
This function gets the history of user modifications. To get the list, you need to list through the Directive used to get the document key. Example (get the history of a document):
|
Field | iuclid.localizedPhraseDefinitionFor(<field path>.code, locale) |
This function gets the phrase definition of a picklist. The returned value can then be used to get either (if content is available):
Example
To get languages other than the default ‘locale’ (i.e. English), you do not use the above function. Instead, you list through the:
Here is an example for "FLEXIBLE_RECORD.SDSInfoMixtures":
|
Field | iuclid.getMetadataForAttachment(<path to attachment>) |
This function gets the metadata object for an attachment in IUCLID. The objects available are listed below, including the variable to use to extract that object:
Example 1 (get structural formula attachment data in reference substance):
Example 2a (get the image of a file, using:
Example 2b (Get the multilingual text of an 'other' text field in a phrase)
|