Using single source lookup value to set more than one destination attribute

Created: 2023-08-02 14:16:34
Modified: 2023-08-28 11:24:55
Tags: Custom Mapping UnitySync

This article explains an advanced use of of Custom mappings that utilize a Lookup table. The typical use of a Lookup Table allows you to input a source attribute value and return a replacement value (in place of the original value). For example, “ACME” may be replaced with “ACME Corporation”.

Please refer to the Lookup table KB to familiarize yourself with the basic use of Lookup tables before attempting this more advanced configuration.

This special lookup configuration is useful if you want one source attribute value to control multiple unique values assigned to multiple destination attributes.


Based on one source attribute (postalcode) you want to set three destination attributes to unique values. The Dest Attributes are: Description, Department, telephonenumber

In your Custom map file, you’ll modify these three attribute mappings to incorporate the lookup table as detailed below.

  1. Each Custom Mapping utilizes the ?lookup? syntax. Also Notice:

    a) There is a unique prefix within the ?lookup? of each mapping. (desc, dept, telephone). Each prefix corresponds to attribute being mapped. Note, you can use any prefix you want. It is recommended you match the dest attribute name for easier comprehension.

    b) The source attribute ^postalcode^ is used in each mapping

  2. Example Custom mappings:


  3. Example Lookup table (Example includes two unique postalcodes, 45201 or 90210)

    desc45201|Northern Team
    desc90210|West Coast Team
    dept90210|Corporate Hiring

    Note, the final line above allows for a non blank source value to be changed to a default value (i.e. Other).

  4. Results based on the source postalcode examples: 45201 or 90210.

If source postalcode is 45201 - Dest attributes are set as:

Description: Northern Team
Department: Sales
telephone: 555-111-1111

If source postalcode is 90210 - Dest attributes are set as:

Description: West Coast Team
Department: Corporate Hiring
telephone: 555-333-3333

Share this article:

  1. Directify - Self Service

  2. Mimic - Replication

  3. UnitySync - Sync
  1. emPass - Sync
  1. Profiler
  2. SimpleSync