Add value mappings

Current version: 3.0

You use value mappings to associate a value accessor for a source object with a value accessor for a target object. Related value mappings are grouped together under a value mapping set.

Create a value mapping set

Just like related value accessors (such as all the value accessors used to read values from a specific type of text file) are grouped together under a value accessor set, related value mappings are grouped together under a value mapping set.

In this example, you create a value mapping set to represent all of the values you must map from a row in a text file to a Sitecore item. You then create value mappings for the Identifier, Country, and City Sitecore items. These mappings associate the value accessors you use to read values from the text file with the value accessors you use to write values to the corresponding Sitecore item

To create a value mapping set with value mappings:

  1. To create a value mapping set, in the Content Editor, navigate to /sitecore/System/Data Exchange/File System Provder Test Tenant/Value Mapping Sets.

    Empty value mapping sets in tenant
  2. In the right-hand pane, on the Folder tab, click Value Mapping Set. Name it Row from City Information File to City Information Item

Create value mappings for the target items

You must create value mappings for the Identifier, Country, and City Sitecore items

To create the value mappings:

  1. To create a value mapping, in the content tree, navigate to the new value mapping set.

    Empty value mapping set in tenant
  2. In the right-hand pane, on the Folder tab, click Value Mapping. Name the new item Identifier. Select the new item in the content tree.

  3. Select the new item.

  4. In the right-hand pane, in the Source section, specify the following field values:

    Field

    Value

    Source Accessor

    Data Access/Value Accessor Sets/Providers/File System/City Information File Fields/Identifier from City Information File

    Target Accessor

    Data Access/Value Accessor Sets/Providers/Sitecore/City Information Item Fields/Identifier on City Information Item

    Source and target accessor fields.
  5. Save the item.

  6. Repeat steps 4 to 7 to add the following value mappings:

    Name

    Source accessor

    Target Accessor

    Country

    Data Access/Value Accessor Sets/Providers/File System/City Information File Fields/Country from City Information File

    Data Access/Value Accessor Sets/Providers/Sitecore/City Information Item Fields/Country on City Information Item

    City

    Data Access/Value Accessor Sets/Providers/File System/City Information File Fields/City from City Information File

    Data Access/Value Accessor Sets/Providers/Sitecore/City Information Item Fields/City on City Information Item

Do you have some feedback for us?

If you have suggestions for improving this article,