Query prompts can help users limit the results that will be returned by the query. In some cases, however, users might not know what to select or type in a query prompt. This might be especially true if the prompt does not present a list of values and the user must enter the value as it is stored in the database in order to return any results.
To address this concern, you can configure a query prompt to accept the percent (%) wildcard. When a user enters only a percent symbol in the prompt text box, the query will return records where the field on which the prompt was built contains any value. When a user enters a combination of text and the percent symbol, the query will return records where the field on which the prompt was built contains a value that contains the specified text, preceded or followed by any combination of characters (depending on where the percent symbol is placed in the prompt text box).
To configure a prompt to accept a percent wildcard, you must use the Like operator instead of the equal (=) operator in the expression that defines the prompt.
For example, suppose you build a prompt on the Asset Manufacturer field with no list of valid values. The expression for the prompt would look like this:
If you want users to be able to enter a percent symbol in the prompt to return records where the Asset Manufacturer field contains any value, you can replace the equal operator (=) with the Like operator. The expression for the prompt would look like this:
When you run the query, you could enter the percent symbol (%) in the Manufacturer box on the prompt window. In this case, the results would display records where the Asset Manufacturer field contains any value.
Additionally, you could enter SEI%, and the query would display records where the value in the Asset Manufacturer field begins with the letters SEI, followed by any combination of characters, such as SEIMENS-AL and SEIGER.
Copyright © 2018 General Electric Company. All rights reserved.