Description
Queries a single value of outputField with the searchField=searchValue condition from a registered database table.
If multiple values are found, only the first one is returned.
Parameter |
Value |
---|---|
version |
Version's fully qualified name (e.g. SDE.DEFAULT). |
table |
Name of the database table. The table name will be qualified by the user name configured in ags.sde.tableowner. |
searchField |
Field name of the query expression. |
searchValue |
Query expression's value. |
outputField |
The field name for which the value should be returned. |
Return value
The returned value is a string representing the output field. If the query has no results, an empty string is returned.
Example:
Description
Queries a single value of outputField from a registered database table, with the searchField1=searchValue1 condition and the searchField2=searchValue2 operator.
If multiple values are found, only the first one is returned.
Parameter |
Value |
---|---|
version |
Fully qualified name of the version (e.g. SDE.DEFAULT). |
table |
Name of the database table. The table name will be qualified by the user name configured in ags.sde.tableowner. |
searchField1 |
Field name of the query expression. |
searchValue1 |
Value of the query expression. |
operator |
Comparison operator for the query expression (e.g. AND, OR) |
searchField2 |
Field name for the query expression. |
searchValue2 |
Value for the query expression. |
outputField |
Name of the field for which the value should be returned. |
Return value
The returned value is output field string value. If the query has no results, an empty string is returned.
Example:
<xsl:value-of select="utiapi:lookupVersionedValue('SDE.DEFAULT','FCL_E_COMPONENT','FNAME','BL00186','AND','FNUMBER','00186','OBJ_ID')" />
Description
Retrieve a single value of the outputField based on the condition specified in the searchExpression from a registered database table.
If multiple values match the condition, only the first occurrence is returned.
Parameter |
Value |
---|---|
version |
Fully qualified name of the version (e.g. SDE.DEFAULT). |
table |
Name of the database table. The table name will be qualified by the user name configured in ags.sde.tableowner. |
searchExpression |
Conditional expression of the query. |
outputField |
Name of the field for which the value should be returned. |
Return value
The returned value is a string representing the output field value. If the query doesn't have any result, an empty string is returned.
Example:
<xsl:value-of select='utiapi:lookupVersionedValue("SDE.DEFAULT","FCL_E_COMPONENT","FNAME='BL00186' AND FNUMBER='00186'","OBJ_ID")' />
Please note that the nested quotes must be escaped: - single quote = ' - double quote = "
In this example the search expression FNAME='BL00186' AND FNUMBER='00186' is escaped to FNAME='BL00186' AND FNUMBER='00186'
Description
Queries list of outputField values from a registered database table using the searchExpression condition.
Parameter |
Value |
---|---|
version |
Fully qualified name of the version (e.g. SDE.DEFAULT). |
table |
Name of the database table. The table name will be qualified by the user name configured in ags.sde.tableowner. |
searchField |
Field name of the query expression. |
searchValue |
Value of the query expression. |
outputField |
Name of the field for which the value should be returned. |
Return value
The returned value is a NodeList containing the output field values. If the query has no results, an empty NodeList is returned. The NodeList consists of nodes of Text type.
Example:
1.Get size of NodeList:
<xsl:value-of select="count(utiapi:lookupVersionedValues('SDE.DEFAULT','FCL_E_SERVICE','FNAME','Luisenstr.','FNUMBER'))"/>
2.Get second value from NodeList:
<xsl:value-of select="utiapi:lookupVersionedValues('SDE.DEFAULT','FCL_E_SERVICE','FNAME','Luisenstr.','FNUMBER')[2]"/>
3.Iterate over NodeList with xsl:for-each:
<xsl:for-each select="utiapi:lookupVersionedValues('SDE.DEFAULT','FCL_E_SERVICE','FNAME','Luisenstr.','FNUMBER')">
<result><xsl:value-of select="." /></result>
</xsl:for-each>
Description
Queries a list of outputField values based on the "searchField1 equals searchValue1 and searchField2 equals searchValue2" condition, from a registered database table.
Parameter |
Value |
---|---|
version |
Fully qualified name of the version (e.g. SDE.DEFAULT). |
table |
Name of the database table. The table name will be qualified by the user name configured in ags.sde.tableowner. |
searchField1 |
Field name of the query expression. |
searchValue1 |
Value of the query expression. |
operator |
Comparison operator for the query expression (e.g. AND, OR). |
searchField2 |
Field name of the query expression. |
searchValue2 |
Value of the query expression. |
outputField |
Name of the field for which the value should be returned. |
Return value
The returned value is a NodeList containing output field values. If the query has no results, an empty NodeList is returned. The NodeList consists of nodes of Text type.
Example:
1.Get size of NodeList:
<xsl:value-of select="count(utiapi:lookupVersionedValues('SDE.DEFAULT','FCL_E_SERVICE','FNAME','Luisenstr.','OR','FNAME','Marienstr.','FNUMBER'))"/>
2.Get second value from NodeList:
<xsl:value-of select="utiapi:lookupVersionedValues('SDE.DEFAULT','FCL_E_SERVICE','FNAME','Luisenstr.','OR','FNAME','Marienstr.','FNUMBER')[2]"/>
3.Iterate over NodeList with xsl:for-each:
<xsl:for-each select="utiapi:lookupVersionedValues('SDE.DEFAULT','FCL_E_SERVICE','FNAME','Luisenstr.','OR','FNAME','Marienstr.','FNUMBER')">
<result><xsl:value-of select="." /></result>
</xsl:for-each>
Description
Queries a list of values of outputField with the searchExpression condition, from a registered database table.
Parameter |
Value |
---|---|
version |
Fully qualified name of the version (e.g. SDE.DEFAULT). |
table |
Name of the database table. The table name will be qualified by the user name configured in ags.sde.tableowner. |
searchExpression |
Conditional expression of the query. |
outputField |
Name of the field for which the value should be returned. |
Return value
The returned value is a NodeList containing values of the output field. If the query has no results, an empty NodeList is returned. The NodeList contains nodes of Text type.
Example:
1.Get size of NodeList:
<xsl:value-of select='count(utiapi:lookupVersionedValues("SDE.DEFAULT","FCL_E_SERVICE","FNAME='Luisenstr.' OR FNAME='Marienstr.'","FNUMBER"))'/>
2.Get second value from NodeList:
<xsl:value-of select='utiapi:lookupVersionedValues("SDE.DEFAULT","FCL_E_SERVICE","FNAME='Luisenstr.' OR FNAME='Marienstr.'","FNUMBER")[2]'/>
3.Iterate over NodeList with xsl:for-each:
<xsl:for-each select='utiapi:lookupVersionedValues("SDE.DEFAULT","FCL_E_SERVICE","FNAME='Luisenstr.' OR FNAME='Marienstr.'","FNUMBER")'>
<result><xsl:value-of select="." /></result>
</xsl:for-each>
Please note that the nested quotes must be escaped: - single quote = ' - double quote = "
In this example, the FNAME='Luisenstr.' OR FNAME='Marienstr.' search expression is escaped to FNAME='Luisenstr.' OR FNAME='Marienstr.'