Add a value accessor set for the target items

Abstract

How to create value accessors in Sitecore Data Exchange Framework to write read values to the target file.

To write values to the Sitecore items (target items) that act as the target objects, you must create a value accessor for each item. You group related value accessors into a value accessor set. Each value accessor represents a specific field on the template used for the target items.

Create a folder for the value accessor set

Under a tenant, value accessor sets are organized by provider. Each provider has its own folder. A folder is needed to hold the value accessor sets for the new provider.

To create a folder:

  1. In Sitecore Content Editor, navigate to sitecore/System/Data Exchange/File System Provider Test Tenant.

  2. Navigate to Data Access/Value Accessor Sets/Providers.

    Providers folder in the content tree
  3. Add a new Sitecore Value Accessor Sets item.

    Note

    This template is a command template. It does not prompt for the item name. Command templates assign the item name automatically.

Create a value accessor set

Next, you need to create a value accessor set that represents all of the fields you want to write to on the target items.

To create a value accessor set:

  1. Navigate to the Sitecore provider.

    Sitecore provider in the content tree
  2. On the Folder tab, click Sitecore Item Field Value Accessor Set to create a new item, and name it City Information Item Fields.

Create the value accessors

For each value you want to write to a target item, you need a separate value accessor. Each value accessor represents a field on the target item.

To create a value accessor:

  1. Navigate to the City Information Item Fields item.

    City Information Item Fields value accessor set in the content tree
  2. On the Folder tab, click Sitecore Item Field Value Accessor to create a new item, and name it Identifier on City Information Item.

  3. Set the following field values:

    Field

    Value

    Field

    Templates/User Defined/City Information/Data/Identifier

  4. Save the item.

  5. Repeat step 1 to 4 to add two more Sitecore Item Field Value Accessor items:

    Item name

    Field value

    Country on City Information Item

    Templates/User Defined/City Information/Data/Country

    City on City Information Item

    Templates/User Defined/City Information/Data/City