SetID Functions

This section describes the SetID XSLT extension function.

Syntax

SetID:lookupSetCtrlValues (SetId, LookupType, dvmTranslate, dvmMapName, SourceElementName, TargetElementName, needAnException) 

Description

Use the lookupSetCtrlValues function to look up the list of set control values associated with the setID in the context of a record group or record. Optionally, each set control value can be translated through a DVM map if a map name, source element name, and target element name are provided.

Parameters

Parameter

Description

SetId

The SetId value interested in lookup.

LookupType

The lookup type is used to indicate the type of lookup. You can specify either 1 for the record group name or 2 for the record name.

LookupValue

Value should be either a record name or record group ID as determined by LookupType.

dvmTranslate

Specify True if translation to Common ID using DVM Name supplied is desired. Specify False if no translation is needed.

dvmMapName

DVM map to be used in translation if requested.

SourceElementName

The source element name to be used in DVM translation if requested.

TargetElementName

The target element name to be used in DVM translation if requested.

needAnException

Specify true or false to indicate whether an exception should occur if set control values are not found.

Returns

This function returns a list of set control values or a list of translated set control values as a concatenated string that could be parsed in XSLT.

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:

xref:lookupSetCtrlValues("SHARE","1", "VENDOR",true(),"BusinessUnit","PSFT_BU","COMMON",true())

Exceptions can occur for the following reasons:

  • The DVM map name specified is not valid.

  • The source element name specified is not associated with the DVM map.

  • The target element name specified is not associated with the DVM map.

  • No translated value is found for the set control value in the DVM map.

  • If needAnException is set to true, an exception will occur if the set control values cannot be found for the given SETID/Record or record group ID.

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

xref:lookupSetCtrlValues("SHARE","2", "VENDOR_LOC",true(),"BusinessUnit","PSFT_BU","COMMON",false())

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. An exception is requested if set control values are not found:

xref:lookupSetCtrlValues("SHARE","1", "VENDOR",false(),"","","",true())

An exception can occur if the set control values cannot be found for the given SETID/Record or record group ID.