Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Command Index > B

BROWSE (Short name: BRO)

Scroll Prev Top Next More

The BROWSE command starts the Data Browser and displays the information you specify. With BROWSE, the data is not editable. To edit data with the Data Browser, use the EDIT command.

 

BROWSE_CMD

 

*

Specifies all columns.

 

,

Indicates that this part of the command is repeatable.

 

(expression)

Determines a value using a text or arithmetic formula. The expression can include other columns from the table, constant values, functions, or system variables such as #date, #time, and #pi.

 

ALL

Specifies all columns.

 

AS alias

Determines the alias of the column.

 

colname

Specifies a column name. The column name is limited to 128 characters.

 

In a command, you can enter #c, where #c is the column number shown when the columns are listed with the LIST TABLES command. In an SQL command, a column name can be preceded by a table or correlation name and a period (tblname.colname). You can enter tblname.* to specify all columns in the table.

 

corr_name.

Correlation name. A nickname or alias for a table or view name. Use corr_name to refer to the same table twice within the command, or to explicitly specify a column in more than one table. The correlation name must be at least two characters.

 

DISTINCT

Suppresses the display of duplicate rows.

 

EXCEPT colname

Specifies column names to be excluded from the Data Browser. The EXCEPT clause is helpful with tables which have many columns, to exclude columns from the result set. EXCEPT saves time to avoid typing a long list of column names. When using EXCEPT there can only be one table specified.

 

FROM tblview

Specifies the table or view.

 

MDI

Specifies a modeless Data Browser window, where other windows within R:BASE can be accessed without closing the current Data Browser window first. This option is used in R:BASE for Windows only.

 

NOCHG

Prevents changes to the issued BROWSE command and stops users from reaching additional data by adding columns to the command or changing the command's WHERE clause with the Update Query menu option. When the NOCHG option appears in the command, users cannot toggle from BROWSE to EDIT by pressing [F4], nor by using the Edit menu in R:BASE for Windows. NOCHG is particularly useful when the BROWSE command is issued within an application or command file.

 

ORDER BY clause

Sorts rows of data. For more information, see ORDER BY.

 

=READ

Specifies that the column is read-only, preventing changes to data.

 

tblname.

Specifies a column using the table name. Use tblname.* to specify all columns in the table.

 

WHERE clause

Limits rows of data. For more information, see WHERE.

 

OPTION parameters - provides the ability customize the Data Browser Window. These enhanced parameters are supported at the R> Prompt, in command files, EEPs and stored procedures.

 

OPTION Parameters

Value

Description

CAPTION

value

specifies the window caption

CELL_HINTS

ON (Default)

OFF

specifies if NOTE column cell hints are displayed

COLUMN_WIDTH[x] y

values

specifies the column width for a column, where X is the zero-based column index and Y is the width in pixels

CURRENT_FIELD_VALUE_VAR

value

specifies to capture the field value for the current focused cell

CURRENT_FIELD_VAR

value

specifies to capture the column name for the current focused cell

EXPORTRESULT

ON (Default)

OFF

specifies if the "Export Result to->" menu item is available

GRIDVIEW


specifies the "View as Grid" mode is displayed

HEIGHT

value

specifies the window height, in pixels

IMAGE_HINT

ON (Default)

OFF

specifies if image hints are displayed

LEFT

value

specifies the window location, in pixels, from the left of the screen over

LOCK

nnn

specifies to lock a number of columns

MODAL

ON (Default)

OFF

specifies if the window is modal or non-modal. With the MODAL set to OFF, the Data Browser window displays as a separate button on the Windows task bar.

NO_FOCUS_FIELDS

value

specifies columns that cannot receive focus. The value is a comma separated list of columns.

ON_CELL_CLICK_EEP

value

specifies to execute the EEP command file when a cell is clicked

ON_CELL_DBL_CLICK_EEP

value

specifies to execute the EEP command file when a cell is double-clicked

PRINTDATA

ON (Default)

OFF

specifies if the "Print Data" menu item is available

READONLY

ON

OFF

specifies if the data is read only

ROW_NUMBERS

ON

OFF (Default)

specifies if a record number is displayed (column to the far left)

ROWVIEW


specifies the "View as Row" mode is displayed

ROW_VIEW_DESCRIPTIONS

ON

OFF (Default)

specifies to display the column comments from the table definition (when present) to the right of the data, when ROWVIEW mode is specified

SAVERESULT

ON (Default)

OFF

specifies if the "Save Data As->" menu item is available

SAVERESULTTEMPONLY

ON

OFF (Default)

specifies if the "Save Results As->" menu items are available for both permanent and temporary tables/views

TOP

value

specifies the window location, in pixels, from the top of the screen down

TREEGRIDVIEW


specifies the "View as Tree Grid" mode is displayed

UPDATE_QUERY

ON (Default)

OFF

specifies if the query can be updated

WIDTH

value

specifies the window width, in pixels

WINDOW_STATE

MAXIMIZED

NORMAL

MINIMIZED

specifies the windows state

ZEBRA_STRIPE

ON

OFF

specifies if zebra stripes are displayed

 

Examples

 

Example 01:

 

The following command displays all columns in the transmastertable and sorts the rows by the customer identification numbers contained in custid column.

 

BROWSE * FROM transmaster ORDER BY custid

 

Example 02:

 

The following command displays the custid, company, custaddress, custcity, custstate, and custzip columns in the customer table. Only the rows where the customer identification is equal to 100 are displayed.

 

BROWSE custid, company, custaddress, custcity, custstate, custzip FROM customer WHERE custid = 100

 

Example 03:

 

The following command displays the custid column and restricts editing. Do not place a delimiter, such as a comma or a space, between options prefaced with an equal sign when you are building a command.

 

BROWSE custid=read, company, custaddress, custcity, custstate, custzip FROM customer WHERE custid = 100

 

Example 04:

 

The following command open all records for the Customer table with a maximized Data Browser window and "Customer Data" as the caption. Row numbers are displayed within the far left column.

 

BROWSE ALL FROM customer OPTION WINDOW_STATE MAXIMIZED|CAPTION 'Customer Data'|ROW_NUMBERS ON

 

Example 05:

 

The following will start the Data Browser for custid 125, displaying the data as a single row in read only mode.

 

BROWSE ALL FROM customer WHERE custid = 125 OPTION WINDOW_STATE NORMAL|ROWVIEW|READONLY ON

 

Example 06:

 

The following opens the Data Browser for the Customer table, with a limited height and width and located near the top left corner of the screen.

 

BROWSE ALL FROM Customer +

OPTION WINDOW_STATE NORMAL +

|TOP 25 +

|LEFT 25 +

|WIDTH 1000 +

|HEIGHT 500

 

Example 07:

 

The following opens the Data Browser for active customers in the Customer table, with column alias names, a custom caption, and specified column widths for three that contain shorter data lengths.

 

BROWSE +

CustID AS `Customer ID`, +

Company AS `Company Entity`, +

CustAddress AS `Home Office Address`, +

CustCity AS `Home Office City`, +

CustState AS `Home Office State`, +

CustZip AS `Home Office Zip Code`, +

CustPhone AS `Primary Phone Number`, +

CustFax AS `Fax Number`, +

LastUpdateDate AS `Last Date Modified`, +

LastOrderDate AS `Last Order Date`, +

CustURL AS `Company Home Page`, +

CustEMail AS `Primary Email Address`, +

CustStatus AS `Active Status`, +

PaymentTerm AS `Payment Terms`, +

CreditLimit AS `Imposed Credit Limit` +

FROM Customer +

WHERE CustStatus = 'A' +

ORDER BY Company ASC +

OPTION CAPTION 'Active Customer Information'+

|WINDOW_STATE NORMAL +

|COLUMN_WIDTH[4] 50 +

|COLUMN_WIDTH[5] 50 +

|COLUMN_WIDTH[12] 50

 

Example 08:

 

The following opens the Data Browser for contacts with email addresses in the Contacts table, and launched the CellDblClick.rmd command file when a cell is double clicked.

 

BROWSE CustID,ContFName,ContLName,ContEMail FROM Contact +

WHERE ContEMail IS NOT NULL +

OPTION ON_CELL_DBL_CLICK_EEP CellDblClick.rmd

 

Example 09:

 

The following opens the Data Browser for California customers in the Customer table, and captures the column name and value wherever the focus is upon a cell.

 

SET VAR vCurFieldName TEXT = NULL

SET VAR vCurFieldValue TEXT = NULL

BROWSE CustID,Company,CustCity,CustState,CustZip FROM Customer +

WHERE CustState = 'CA' +

OPTION CURRENT_FIELD_VAR vCurFieldName +

|CURRENT_FIELD_VALUE_VAR vCurFieldValue