Please enable JavaScript to view this site.

Version:

Navigation: Parameterization for Integration > XML/XSL Processing > VI XSL API

Lookup functions for registered database tables

Prev Top Next More

String lookupVersionedValue(String version, String table, String searchField, String searchValue, String outputField)

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:

<xsl:value-of select="utiapi:lookupVersionedValue('SDE.DEFAULT','FCL_E_COMPONENT','OBJ_ID','0003141824550443203002','FNAME')" />

String lookupVersionedValue(String version, String table, String searchField1, String searchValue1, String operator, String searchField2, String searchValue2, String outputField)

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')" />

String lookupVersionedValue(String version, String table, String searchExpression, String outputField)

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=&apos;BL00186&apos; AND FNUMBER=&apos;00186&apos;","OBJ_ID")' />

Please note that the nested quotes must be escaped: - single quote = &apos; - double quote = &quot;

In this example the search expression FNAME='BL00186' AND FNUMBER='00186' is escaped to FNAME=&apos;BL00186&apos; AND FNUMBER=&apos;00186&apos;

NodeList lookupVersionedValues(String version, String table, String searchField, String searchValue, String outputField) throws Exception

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>

NodeList lookupVersionedValues(String version, String table, String searchField1, String searchValue1, String operator, String searchField2, String searchValue2, String outputField) throws Exception

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>

 

NodeList lookupVersionedValues(String version, String table, String searchExpression, String outputField)

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=&apos;Luisenstr.&apos; OR FNAME=&apos;Marienstr.&apos;","FNUMBER"))'/>

2.Get second value from NodeList:
<xsl:value-of select='utiapi:lookupVersionedValues("SDE.DEFAULT","FCL_E_SERVICE","FNAME=&apos;Luisenstr.&apos; OR FNAME=&apos;Marienstr.&apos;","FNUMBER")[2]'/>

3.Iterate over NodeList with xsl:for-each:
<xsl:for-each select='utiapi:lookupVersionedValues("SDE.DEFAULT","FCL_E_SERVICE","FNAME=&apos;Luisenstr.&apos; OR FNAME=&apos;Marienstr.&apos;","FNUMBER")'>
  <result><xsl:value-of select="." /></result>
</xsl:for-each>

Please note that the nested quotes must be escaped: - single quote = &apos; - double quote = &quot;

In this example, the FNAME='Luisenstr.' OR FNAME='Marienstr.' search expression is escaped to FNAME=&apos;Luisenstr.&apos; OR FNAME=&apos;Marienstr.&apos;

© 2024 VertiGIS GmbH. All Rights Reserved. | Privacy Center | Imprint
Documentation Version 10.0 (fa3b2a93)