lookupSetID

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);