About Expressions and Data Providers

Autodesk Expression Builder

 
About Expressions and Data Providers
 
 
 

Most expression functions behave the same way across all data providers, but there are a few exceptions.

Unsupported Functions

You can use any function when creating a filter or a calculated property. These results are not saved back to the data store. However, if you use a function that returns an unsupported data type to insert a value into the Data Table, you will get an exception because that operation is not valid for the data provider. For example, SHP files do not support the FdoInt16 or FdoDouble data types. If you try to save a value of that data type back to a SHP data store, you will get an error.

ODBC Providers

You can apply an expression before you actually connect to the data store, for example, when you query to add features to a map. This can be an issue for ODBC providers, which can connect to multiple data sources. Support of expression functions may not be supported by the ODBC source. For this reason, the functions are evaluated as part of the expression-building process in all cases, even if the connected data source can do so.

Soundex

The Soundex function is natively supported by all relational database management systems (RDBMS). Any expression including this function is evaluated by the underlying RDBMS. However, the result returned by a MySQL provider may differ from the result you receive from other providers.

Boolean Value Representation

SDF and SHP providers represent a Boolean value with the terms TRUE and FALSE. RDBMS providers represent a Boolean value with 0 and 1. This can affect the display of labels. For example, a label that indicates whether or not a valve is open might be defined by the expression:

Concat('Valve is open: ', <valve_status_property>)

For SDF and SHP data, the label will say “Valve is open: True.” For RDBMS data, the label will say, “Valve is open: 1.”

AddMonths and MonthsBetween

The AddMonths and MonthsBetween functions do not take day information into account, but RDBMS systems do.

For example, for the expression AddMonths(<date_property>, 88.7), an RDBMS provider might add 88.7 months to the provided date. The function in expressions you create in the product adds 88 months only.

Similarly, for the expression MonthsBetween(<date_1>, <date_2>), an RDBMS provider might return a value of 77.4. The function in expressions you create in the product returns 77.

Cache-based Operation Versus RDBMS-based Operation

Some operations (for example, the creation of a calculated property) are cache-based operations and use the expression-building process for evaluation. Other operations (for example, a filter on a RDBMS data store) use the underlying RDBMS system.

Due to differences between providers, the results may be different. For example, if you connect to a MySQL data store you can create two calculated properties CP1 and CP2, where CP1 is defined by the expression Soundex(<property>) and CP2 is defined by the expression Soundex(<literal>). In the Data Table, the value for CP1 and CP2 may be identical. However, if you use a filter containing the expression Soundex(<property>) = Soundex(<literal>), the resulting values may be different. In the Data Table, the expressions are evaluated by the expression-building process, but the filter is evaluated by the MySQL data store, which uses a different function definition.