This function allows you to get a list of values (single or multiple columns) from a data source directly in an XSLT transformation.
LookupList function uses the List part of the lookup definition so if you define multiple columns or special filter method you need to use ListDisplayMember or ListMethod respectively.
NAMESPACE
xmlns:AS="http://schema.advantages.cz/AsapFunctions"
SYNTAX
// In case a lookup has no parameters
XpathNodeIterator LookupList(string lookupElementId)
// In case a lookup has only one input parameter, you must specify its name.
XpathNodeIterator LookupList(string lookupElementId, parameterName, parameterValue)
// When a lookup has more input parameters, they have to be identified, so their name has to be defined.
XpathNodeIterator LookupList(string lookupElementId, parameter1Name, parameter1Value, parameter2Name, parameter2Value, parameter3Name, parameter3Value)
PARAMETERS
Name | Description |
---|---|
lookupElementId | Unique identifier (Guid) of lookup model element |
lookupInput | input value for a lookup parameter |
lookupParameterName | Name of Nth. input parameter (up to 3 parameters) |
lookupParameterValue | Value of Nth input parameter |
OUTPUT
Compared to LookupValue
function which returns a single value (e.g. string or number) LookupList function returns a list of values with multiple attributes and/or multiple rows.
Example Output
<list>
<item Id="xxxx-1111-..." refSomethingId="yyy" Price="999" .../>
<item Id="xxxx-2222-..." refSomethingId="zzz" Price="888" .../>
</list>
EXAMPLE
<xsl:variable name="list" select="AS:LookupList('xxxx-xxxx...')"/>
<xsl:value-of select="$list/list/item[1]/@Price"/>