? Special character
- Last Updated: February 11, 2026
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
The question mark is a special character that
represents the Unknown value. ABL treats a quoted question mark ("?")
in a procedure or an input field as a question mark character. It
treats an unquoted question mark (?) in a procedure
or an input field as an unknown value.
The following table indicates the results when using the Unknown value
(?) in a comparison expression (EQ,
GE, GT, LE, LT,
NE). These results are true for both character and integer variables.
| Comparison operator | One argument is ? | Both arguments are ? |
|---|---|---|
EQ or = |
F | T |
GE or
>= |
? | T |
GT or
> |
? | F |
LE or
<= |
? | T |
LT or
< |
? | F |
NE or
<> |
T | F |
?) in an HTML input field as a character.Additional
points about the Unknown value (?) are:
- Any
number of Unknown value (
?) records can be in a unique index. This is useful in cases where you want to defer choosing key values for a unique index. - If you define a field as mandatory in the Dictionary, that field
cannot contain the Unknown value (
?) when the AVM writes the record to the database. - For sorting and indexing purposes, the Unknown value (
?) sorts high. This means that fields with the Unknown value (?) are sorted after all other values, so when you display all records of a table, the records with the Unknown value (?) in the field(s) used for ordering the record appear last. However, if the query does a range match on that field, the rules in Table 1 still apply. That is, a query with aWHEREclause with"field < ?"does not return any records due to the rules described in Table 1. That also impacts a query with theINDEXED-REPOSITIONoption and a range match where the runtime needs to validate that the record is part of the query's result-set. For that reason, it is recommended that theWHEREphrase of such queries use theEQorNEoperator with the Unknown value (?) to define if they should be included or not, if that field could have the Unknown value (?). - The question mark (
?) character in the first position of a field equals the Unknown value (?), not a question mark. - When using the Unknown value (
?) in a comparison expression for SQL, the result is unknown. - When using the Unknown value (
?) in an expression, the result of that expression is usually unknown. For example, when you concatenate first, middle, and last names, and the middle name is?, then the result is?.
For information
on how the Unknown value (?) works with logical data types,
comparison operators, and conditional statements, see the following
reference entries: EQ or = operator, GE or >= operator, GT or > operator, IF...THEN...ELSE statement, LE or < = operator, LT or < operator, NE or <> operator