This topic contains syntax suggestions and requirements for expressions on text fields, as well as details about how GE Digital APM reformats expressions on text fields.
When you create an expression on a text field, the value(s) within the expression must be placed within single quotation marks.
If you want to create an expression for the Asset Description field to return the records where the field contains the value This is a test, the expression would be:
WHERE [Asset].[ASSET DESC CHR] LIKE 'This is a test'
...where This is a test is within single quotation marks because it is the stored value that you want to use to limit the query results.
Note that text fields are stored in the database differently than character fields and are, therefore, handled differently. One difference is that you cannot use the = operator with text fields. Instead, you must use the like operator. When creating text field expressions, be sure to specify the like operator.
Note: When you are using an Oracle schema, the value is case sensitive by default. This means, for example, that if you enter WHERE [Asset].[ASSET DESC CHR] LIKE 'This is a test' in a field where values are stored in the database as This is a test, the query will not return any results.
If you enter something for a text field in the Criteria cell or the Or cell of the grid in the Conditions section, and you do not enter single quotation marks yourself, GE Digital APM will insert them automatically for you. For example, if you want to search for records where the Asset Additional Information field contains the text This asset exists for testing purposes, you can enter the phrase with or without the single quotation marks. If you omit the single quotation marks, GE Digital APM will insert them for you.
Note: While GE Digital APM will insert the single quotation marks automatically, it will not insert the like operator. When creating text field expressions, be sure to specify the like operator. Otherwise, GE Digital APM will assume the is equal to (=) operator and return an error.
Copyright © 2018 General Electric Company. All rights reserved.