Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Function Index > G

GETPROPERTY

Scroll Prev Top Next More

(GETPROPERTY('arg1','arg2'))

 

The GETPROPERTY function captures the current properties of forms, form controls, applications, reports, report controls, labels, and label controls. The function behaves just as the GETPROPERTY command.

 

arg1 is the Component ID value or the APPLICATION, RBASE_FORM, REPORT, or RBA_FORM keyword that the property is being captured from.

 

arg2 is the name of the object's property you wish to get the value for.

 

APPLICATION

Specifies to capture an application property such as the CAPS lock status, if it is compiled, or the title

 

Component ID

Specifies the unique identifier assigned to a control (e.g. DB Edit). The Component ID within the GETPROPERTY function must match the unique identifier listed in the control properties. The "Component ID" field is located in the Object Properties for all forms, reports, labels and controls. A "Component ID" option is also located in the speed menu list when you right click on a report/label control.

 

RBA_FORM

Specifies to capture an application form property such as the current theme, the enabled status for an action, or a caption

 

RBASE_FORM

Specifies to capture a form property such as height, width, etc.

 

REPORT

Specifies to capture a report property such as the report name, the total page count, or the number of tables used in the report

 

Tips:

 

The properties of any form control objects can be captured with assigned Component ID values ONLY.

Always use the current QUOTES character around the variable name.

The resulting variable value will be TEXT. To manipulate any values to INTEGER, use the INT, FLOAT, or other conversion function.

To change any property of a form control after the form is displayed, use the PROPERTY command(s) within the "On After Start" EEP section of the Form Properties.

 

Notes:

 

The complete list of GETPROPERTY command parameters are available within the FormProperties.pdf and FormProperties_TOC.pdf PDF documents, which are provided within the R:BASE program directory and are available for download at the R:BASE Technologies Support page: http://www.rbase.com/support/

An optional syntax builder add-on product called R:Docs, containing all PROPERTY/GETPROPERTY commands and parameters constructed in an R:BASE application, is also available. Please contact the R:BASE Technologies Sales Staff at sales@rbase.com if you wish to acquire an annual subscription to the stand-alone R:Docs database and application.

 

Examples:

 

Example 01.

-- To check an applied "Column Sort" setting value (ON or OFF) for a Variable Lookup List View and alter the control properties for the List View and a button object.

IF (GETPROPERTY('VarLookupListView','COLUMN_SORT')) = 'TRUE' THEN

  PROPERTY VarLookupListView COLUMN_SORT 'FALSE'

  PROPERTY Btn_ShowSortStatus FONT_COLOR 'GREEN'

  PROPERTY Btn_ShowSortStatus CAPTION 'Enable Column Sort'

ELSE

  PROPERTY VarLookupListView COLUMN_SORT 'TRUE'

  PROPERTY Btn_ShowSortStatus FONT_COLOR 'RED'

  PROPERTY Btn_ShowSortStatus CAPTION 'Disable Column Sort'

ENDIF

 

Example 02.

-- Captures the value for a report label

SET VARIABLE vCoverPageTot = (FLOAT((GETPROPERTY('CoverPageInvoiceTotal','VALUE'))))

 

Example 03.

-- Captures the form caption

SET VAR vCaption TEXT = (GETPROPERTY('RBASE_FORM','CAPTION'))

 

Example 04.

-- Checks if the program is an R:BASE compiled application

SET VAR vIsCompiled TEXT = (GETPROPERTY('APPLICATION','ISCOMPILED'))

 

Example 05.

-- Captures the page count for a report

SET VAR vPageCount = (GETPROPERTY('REPORT','TOTALPAGECOUNT'))