PeopleSoft Domain Value Maps

Often you need mapping tables for integrations. In PeopleSoft you can create your own records to store mapping data, but you do not have to.

PeopleSoft offers a functionality called Domain Value Maps (DVM), which you can use for this purpose. In this article we will explore how you can setup a DVM, populate it with data and use it in your code.

Set up a Domain Value Map

To set up a new Domain Value Map go to:
Enterprise Components > Integration Definitions > Transformation Framework > Define Value Maps

Here create a new entry. In this example we will setup a DVM to map gender values.

Now configure the DVM like below. The UniqueGUID is a required key value. Apart from this field you define the rest of the fields of your mapping table. Here we use Source and Target. The source field will contain the PeopleSoft value and the target field will contain the value that is required in the target system.

On the Domains tab add your fields to the domain and save the component:

Populate the Domain Value Map

Now you can populate your DVM with mapping data. For this go to:
Enterprise Components > Integration Definitions > Transformation Framework > Populate Domain Value Maps

Fill in the mapping data on this page. See an example below.

Using your Domain Value Map

Great, you have now set up a mapping table using PeopleSoft delivered functionality. But how can you use this in PeopleCode?

PeopleSoft delivers an application package for this, named EOTF_CORE.

You can use the following code-snippet to get the mapping for the genders that we set up. We are using the LookupValue function from the EOTF_CORE:DVM:Functions application class.

If you want the LookupValue function to raise an error if no value is found, set the last parameter to True.

If it is set to False, it will not generate an error, but instead return the default value that is specified in the 5th parameter.