R:BASE supports the following RBTI System Variables used in Forms:
•RBTI_DBGRID_COLUMN
This variable holds the name of focused column for a DB Grid.
•RBTI_DIRTY_FLAG
Returns 1 if any DB Control value(s) in form were changed or 0 if nothing was changed.
•RBTI_FORM_ALIAS
This variable holds the name of focused form, if used AS alias.
•RBTI_FORM_CLICKED
This variable is set to the clicked control's Component ID property (if exists). The value can then be used by the PROPERTY/GETPROPERTY commands to manipulate the control.
•RBTI_FORM_COLNAME
This variable holds the name of focused column DB Control on form.
•RBTI_FORM_COLVALUE
This variable holds the value of focused column DB Control on form.
•RBTI_FORM_COMPID
This variable holds the value of focused DB/Variable Edit control's Component ID, if defined.
•RBTI_FORM_CTRLTEXT
This variable is set to the clicked control's "Caption" or "Text" property. Display-only controls like a Label and Panel use the "Caption" property to hold text. For entry controls like DB/Variable Edit or Combo Boxes, the property to hold text is "Text". When setting the value of RBTI_FORM_CTRLTEXT, the control is first checked if it has the "Caption" property. If "Caption" was not found "Text" is used. If both "Caption" and "Text" were not found, the variable is set to null.
•RBTI_FORM_DATATYPE
This variable holds the data type of focused column DB Control on form.
•RBTI_FORM_DBLCLKED
This variable is set to the double clicked control's Component ID property (if exists). The value can then be used by the PROPERTY/GETPROPERTY commands to manipulate the control.
•RBTI_FORM_DIRTYVAR
Returns 1 if any Variable Control value(s) in form were changed or 0 if nothing was changed.
•RBTI_FORM_FORMNAME
This variable holds the name of the current form in use, which is particularly useful when using a form on top of another form or if multiple forms are running at the same time. The variable also provides the current form name displayed in the Form Designer.
•RBTI_FORM_MODE
This variable holds the value of current mode of the form, such as ENTER, EDIT or BROWSE.
When the form is brought-up as ENTER USING formname ... the value for RBTI_FORM_MODE will be returned as 'ENTER'.
When the form is brought-up as EDIT USING formname ... the value for RBTI_FORM_MODE will be returned as 'EDIT'.
When the form is brought-up as BROWSE USING formname ... the value for RBTI_FORM_MODE will be returned as 'BROWSE'.
•RBTI_FORM_TBLNAME
This variable holds the name of the current table in a form. This is especially useful when used within a multi-table form.
•RBTI_FORM_VARNAME
This variable holds the name of focused Variable Control on form.
•RBTI_FORM_VARVALUE
This variable holds the value of focused Variable Control on form.
•RBTI_FORM_DSGN
This variable holds the value of "YES" when a form is open in the Form Designer.
•RBTI_FORM_EXT_DSGN
This variable holds the value of "YES" when a form is open in the External Form Designer.
Tips and Techniques:
•If you have variables controls on a form in EDIT mode and the value of the variable control is changed - then RBTI_FORM_DIRTYVAR will change. You can then use this to take appropriate action.
•In form EDIT mode, RBTI_DIRTY_FLAG will only change if a DB control is changed that affects the displayed dataset. In ENTER mode RBTI_DIRTY_FLAG is always set to 1. In EDIT mode this allows you to easily cater for a form with a mix of DB controls and variable controls - by using RBTI_FORM_DIRTYVAR you can trap in an EEP the situation where the user has only made a change to a variable control and not to any DB controls. (In this situation RBTI_DIRTY_FLAG will be 0 but RBTI_FORM_DIRTYVAR will be 1.)
•An added PROPERTY APPLICATION is available parameter to specify if "RBTI Variable" (RBTI_*) processing is enabled in forms. If perhaps the variables are seldom used in an application, the processing may be turned off, as the variables are assigned in nearly all forms aspects. The property is ON by default. To take advantage of the optimization, set the value to OFF upon the application startup. Then, turn it ON only in forms that use the RBTI_* variable values. Make sure the property is turned OFF again when the form is closed.
PROPERTY APPLICATION CAPTURE_RBTI_FORM_VARS OFF