SetId Utility Class Methods

This section describes the SetId Utility class methods. The methods are discussed in alphabetical order.

Syntax

lookupSetCtrlValues (SetId, LookupType, LookupName, dvmTranslate, dvmMapName, PsftElementName, CommonElementName, needAnException) 

Description

You can use the lookupSetCtrlValues function to look up the set control values associated with a setId in the context of a record or record group. Furthermore, you can request that the set control value be translated through a specified DVM map from the element in the PeopleSoft domain to an element in the common domain. In a typical PeopleSoft implementation the set control values represent PeopleSoft Business Unit. In such case, you would have a DVM defined for Business Unit mapping for translation.

Parameters

Parameter

Description

SetId

The SetId value interested in lookup, as string.

LookupType

The type of lookup to perform. Valid values are 1 for record group ID and 2 for record name.

LookupName

Record group ID or record name, as string. The value should correspond to the LookupType specified.

dvmTranslate

Specify True if translation of set control values using the static value map (DVM) supplied is desired.

dvmMapName

The name of the static value map (DVM) to be used in translation, as string.

PsftElementName

The name of the element belonging to the PeopleSoft domain in the DVM to use in lookup, as string.

CommonElementName

The name of the element belonging to the Common domain in the DVM for which to return an equivalent value, as string.

needAnException

True to cause exception to occur in case set control values are not found. False to request an empty string in such case instead.

Returns

The equivalent values in array of string.

Example

This example looks up the set control values (representing PeopleSoft Business Units in this example) associated with the setID SHARE for the record group VENDOR and translates them to the common IDs for Business Unit by means of the DVM mapping BusinessUnit. An exception is requested if set control values are not found:

&oSetIdUtil = create EOTF_CORE:SetId:Functions(); 

   Local array of string &arrReturnValue = CreateArrayRept("", 0);

   try

      &arrReturnValue = &oSetIdUtil.lookupSetCtrlValues("SHARE", "1", "VENDOR", true, "BusinessUnit", "PSFT_BU", "COMMON", true);

   catch Exception &exReturn
. . .
       {Your Exception Handling Logic Here}
. . .
   end-try; 

Syntax

lookupSetID (LookupValue, dvmTranslate, dvmMapName, PsftElementName, CommonElementName,  LookupType, LookupName, needAnException)

Description

You can use the lookupSetID function to look up the setID corresponding to a set control value in the context of a record or record group. Furthermore, you can request that the set control value to use for lookup be translated through a specified DVM map from an element in a common domain to the element in the PeopleSoft domain. In a typical PeopleSoft implementation the set control values represent PeopleSoft Business Units. In this case, you would have a DVM defined for Business Unit mapping translation.

Parameters

Parameter

Description

LookupValue

Value to use in setID lookup, as string. Value should either be a set control value if dvmTranslate is false or a common element value if dvmTranslate is true.

dvmTranslate

Specify True if translation of set control values using static value map (DVM) supplied is desired.

dvmMapName

The name of the static value map (DVM) to be used in translation, as string.

PsftElementName

Name of the element belonging to the PeopleSoft domain in the DVM for which to retrieve the equivalent set control value, as string.

CommonElementName

Name of the element belonging to the Common domain in the DVM to use in lookup, as string.

LookupType

The type of lookup to perform. Valid values are 1 for record group ID and 2 for record name.

LookupName

Record group ID or record name, as string. The value should correspond to the LookupType specified.

needAnException

True to cause exception to occur in case setID is not found. False to request an empty string in such case instead.

Returns

The equivalent value as string.

Example

The following code looks up the setID associated with the common ID for Business Unit BUID001 in the DVM mapping BusinessUnit for the record group VENDOR. No exception is requested if setID is not found (empty string will be returned):

&oSetIdUtil = create EOTF_CORE:SetId:Functions(); 

Local string &ReturnValue;

&ReturnValue = &oSetIdUtil.lookupSetId("BUID001", "BusinessUnit", "PSFT_BU", "COMMON", "1" ,"VENDOR", false);