An Xbasic expression.
Evaluates an expression in the context of an object.
The <OBJECT>.EVAL() method applies to:
- Alpha Anywhere (for <OBJECT> use the keyword "A5")
- Control Panel (for <OBJECT> use the keyword "CONTROLPANEL")
- Browses (for <OBJECT> use either the <BROWSE> pointer or the name of the browse)
- Forms (for <OBJECT> use either the <FORM> pointer or the name of the form)
- Form Controls (for <OBJECT> use the <CONTROL> pointer or the address of the control)
The <OBJECT>.EVAL() method evaluates an expression in the context of an object.
The following example retrieves the value of the Firstname field by combining the name of the field with ".value". This illustrates how you can access a field's value by using its name, rather than a field pointer.
dim frm as P dim lst as C dim fld as C frm = form.view("Customer Information") lst = frm.child_enum() fld = word(lst,15,crlf()) ? eval(fld +".value") = "Michael
Desktop applications only.