HOME COMMUNITY BLOG
Skip to end of metadata
Go to start of metadata

This function works the same way as LookupValue but in case nothing is found it will create the missing record. This is useful for integration and ETL projects where you can simplify the data import scripts. 

Namespace

xmlns:AS="http://schema.advantages.cz/AsapFunctions"

Syntax

Parameters

lookupId

Unique identifier (Guid) of lookup model element

parameterValueValue to lookup by (that the lookup's data structure will use as a filter parameter).
createParametersKey-value pairs providing data for a new record (in case it does not exist).

Remarks

This function uses the ListDataStructure entity of the lookup for creating the record. For this you will need to set AllFields to True so the data will be safely inserted to the database. This is mandatory. Primary key and other system fields (creation time and user) will be filled in automatically.

 

Warning

You should use this function carefully as it writes data during transformations. Especially be careful when state-machines exist on the entity being written to. For a sake of simplicity you should mainly use this function for inserting missing records into simple lists e.g. while importing data from external data sources.

Example

Stylesheet
  • No labels