The name of a field of a table.
Default = Primary table. Table_Name_List is a list of tables in a CR-LF delimited list. This parameter indicates what tables to open in order to evaluate the expression.
Returns the length of the key specified by Key_Expression.
Return the maximum length of the data an expression can return.
EVAL_KEYLENGTH() returns the integer length of the key specified by Key_Expression.
Knowing the key length of an index or query key can be important because Alpha Anywhere only supports key lengths of 100 characters of less. If you use a key length of more than 100 characters, your data may not appear to sort correctly because Alpha Anywhere ignores key values past the first 100 characters.
EVAL_KEYLENGTH() differs from the LEN() function in that it always returns a length that is based on the defined size of a field. For example, assume that lastname is defined as a 20 character field. len(alltrim(LASTNAME)) would return 5, if LASTNAME contained "Smith", but eval_keylength("alltrim(LASTNAME)") always returns 20, regardless of the contents of the field.
Assume you have a button on a form that executes this Xbasic. If the LASTNAME field is defined as 20 characters the message box will display 20, even though the length of the actual data in LASTNAME may be less.
lkey = eval_keylength("alltrim(employees->lastname)") ui_msg_box("keylength",str(lkey))