Xbasic
OBJECT_NAME_EXPAND Function
Syntax
Object_Name_Expanded as C = OBJECT_NAME_EXPAND(C object_name, C object_class)
Arguments
- object_name
The name of an object.r
- object_class
The type of object. See Object Types.
Description
Expand an object name (in the current database) from <object name> to <object name>@<data dictionary>
Discussion
OBJECT_NAME_EXPAND() takes a library object name (such as a form, report, browse, append, copy, toolbar etc.), and expands the name to a fully qualified name that includes the object dictionary. If no object of the specified class exists, the function returns a NULL string. This function is useful for checking if a particular form, report, or other object really exists before attempting to do something with that object (such as opening a form).
Example
Formname = "customer" If (object_name_expand(formname, "form") = "") then ui_msg_box("Error", formname + " not found") Else Form.view(formname) End if
Limitations
Desktop applications only.
See Also