Using Custom Fields, it’s possible to import fields from another EasyCatalog data source. A Custom Field is a field that appears only in EasyCatalog (so it’s not present in the source data) and is populated using one of our inbuilt functions.
The XREFFIELD custom field function can be used to import data from another data source:
In this example, we have two data sources – one containing product information, one containing pricing. A pre-requisite of the XREFFIELD function is that you have data available in both data sources that you can use to cross reference the records by.
To create a Custom Field:
- Right click in the panel and use the “New Custom Field” option from the pop-up menu
- Give the new field a name at the top of the panel
- In the Content area, enter the custom field command:
- The field/column you’re searching within (this will be in the external/foreign data source)
- The content you’re looking for.
- The field/column to return when a match is found
- The name of the data source to search within
So, in the above example:
- We’re searching the ‘foreign_key’ field (in the data source specified by parameter 4, ‘price.txt’)
- for the content of the ‘key’ field
- when a match is found we want to return the content of the ‘price’ field
- from the price.txt data source.