Cross Referencing Fields From Another Data Source

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 command takes four parameters:

  1. The field/column youโ€™re searching within (this will be in the external/foreign data source)
  2. The content youโ€™re looking for.
  3. The field/column to return when a match is found
  4. The name of the data source to search within

So, in the above example:

  1. We’re searching the ‘foreign_key’ field (in the data source specified by parameter 4, ‘price.txt’)
  2. for the content of the ‘key’ field
  3. when a match is found we want to return the content of the ‘price’ field
  4. from the price.txt data source.