Difference between revisions of "BROWSE"

From Recital Documentation Wiki
Jump to: navigation, search
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Class==
 
Screen Forms
 
 
 
 
==Purpose==
 
==Purpose==
 
User-Interface tool browse
 
User-Interface tool browse
Line 43: Line 39:
  
 
[OVERLAY]
 
[OVERLAY]
 
[STYLE <expC1>]
 
  
 
[TIMEOUT <expN2>]
 
[TIMEOUT <expN2>]
Line 60: Line 54:
  
 
==See Also==
 
==See Also==
[[@...GET]], [[ABROWSE()]], [[APPEND]], [[CHANGE]], [[DBEDIT()]], [[EDIT]], [[SET EDITFIELD]], [[SET FORMAT]]
+
[[@...GET]], [[ABROWSE()]], [[APPEND]], [[CHANGE]], [[DBEDIT()]], [[EDIT]], [[SET EDITFIELD]], [[SET FORMAT]], [[SET KEYWORD]]
  
  
Line 72: Line 66:
 
!Keyword||Description
 
!Keyword||Description
 
|-
 
|-
|COLOR <color code>
+
|COLOR <color code> &#124; COLOR SCHEME <color-scheme>||Specifies a set of color pairs or the number of an existing color scheme in the COLOR SCHEME to change the default color of BROWSE.  A color scheme is a set of 10 predefined color pairs.  The color pairs in a color scheme can be changed with the SET COLOR OF SCHEME.  A color pair is a set of two letters separated by a forward slash.  The first color letter specifies the foreground color and the second letter specifies the background color.
| COLOR SCHEME  
+
<color-scheme>||Specifies a set of color pairs or the number of an existing color scheme in the COLOR SCHEME to change the default color of BROWSE.  A color scheme is a set of 10 predefined color pairs.  The color pairs in a color scheme can be changed with the SET COLOR OF SCHEME.  A color pair is a set of two letters separated by a forward slash.  The first color letter specifies the foreground color and the second letter specifies the background color.
+
 
|-
 
|-
 
|COMPRESS||Places column headings on the top line of the BROWSE work surface, with no separating line above the records, to allow more records to be displayed.
 
|COMPRESS||Places column headings on the top line of the BROWSE work surface, with no separating line above the records, to allow more records to be displayed.
Line 159: Line 151:
 
|-
 
|-
 
|OVERLAY||Allows format files to be overlaid on the BROWSE worksurface rather than clearing the screen.
 
|OVERLAY||Allows format files to be overlaid on the BROWSE worksurface rather than clearing the screen.
|-
 
|STYLE <expC1>||Specify the font style, <expC1>, to be used.  Recital Mirage only.
 
 
|-
 
|-
 
|TIMEOUT <expN2>||Specify how many seconds, <expN2>, BROWSE should wait for input before closing automatically.
 
|TIMEOUT <expN2>||Specify how many seconds, <expN2>, BROWSE should wait for input before closing automatically.
Line 179: Line 169:
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
use demobrowse field title:c="MR.Mrs,Miss,Mr",;
+
use demo
 +
browse field title:c="MR.Mrs,Miss,Mr",;
 
   last_name:w=10,;
 
   last_name:w=10,;
 
   first_name
 
   first_name
Line 186: Line 177:
  
 
==Products==
 
==Products==
Recital Mirage Server, Recital Terminal Developer
+
Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Screen Forms]]
 
[[Category:Screen Forms]]
 
[[Category:Screen Forms Commands]]
 
[[Category:Screen Forms Commands]]

Latest revision as of 10:21, 30 September 2016

Purpose

User-Interface tool browse


Syntax

BROWSE

[COLOR <color code> | COLOR SCHEME <color-scheme>]

[COMPRESS]

[FIELDS <field list>]

[FOR <expL1>]

[FORMAT]

[FREEZE <fieldname>]

[KEY <key expression>]

[LAST | NOINIT]

[LOCK<expN1>]

[NOAPPEND]

[NOCLEAR]

[NODELETE]

[NOEDIT | NOMODIFY]

[NOFOLLOW]

[NOMENU]

[NOWAIT]

[OVERLAY]

[TIMEOUT <expN2>]

[TITLE <expC2>]

[VALID [:F] <expL2> [ERROR <expC3>]]

[WHEN <expL3>]

[WIDTH<expN3>]

[WINDOW <window name>]


See Also

@...GET, ABROWSE(), APPEND, CHANGE, DBEDIT(), EDIT, SET EDITFIELD, SET FORMAT, SET KEYWORD


Description

The BROWSE user-interface tool displays the records from the currently active table in a grid window. Browse can also have an edit window, and/or a memo window active at the same time. If the table being browsed is related to other tables, then these related tables can also be edited from within the edit widow. Full automatic record locking in the browse window is performed on shared tables.

All the dictionary attributes defined in the Application Data Dictionary (ADD) are active in BROWSE. From the ADD, field validation, editing pictures, static and dynamic choice lists, calculated and default attributes can be defined. Security and field protection can also be defined. Enabling or disabling of update, append, delete and hidden fields by user and group ID is available.


Keyword Description
COLOR <color code> | COLOR SCHEME <color-scheme> Specifies a set of color pairs or the number of an existing color scheme in the COLOR SCHEME to change the default color of BROWSE. A color scheme is a set of 10 predefined color pairs. The color pairs in a color scheme can be changed with the SET COLOR OF SCHEME. A color pair is a set of two letters separated by a forward slash. The first color letter specifies the foreground color and the second letter specifies the background color.
COMPRESS Places column headings on the top line of the BROWSE work surface, with no separating line above the records, to allow more records to be displayed.
FIELDS <field list> The comma-separated <field list> enables you to: specify the order in which the specified fields display and incorporate special handling options for each field. Please see below for these options.


<field> [:R] [:column width]

[:B = <expr>, <expr> [:F]]

[:C = <expC> | <@alias>,<expC>]

[:V = <expL> [F:] [:E = <expC>]

[:P = <expC>]

[:H = <expC>]

[:W = <expL>]


Each field in the <field list> may be followed by special handling options. A delimiter precedes each option, either : or .


Option Description
:R Fields are read-only, so may be viewed, but not edited.
:<column width> The <column width> allows you to specify the numeric display width of a field.
:B = <expr>,<expr> [:F] Restricts valid data input to a range of values. The expressions specified must match the data type of the field and represent low <expr1> and high <expr1> values. The specified range is only enforced when the field value changes unless the :F option is used.
<@alias>,<expC> The Choicelist option associates a pop-up choicelist or a User Defined Function (UDF) with a field. The choicelist may be either 'static', a string of comma-separated choices, 'dynamic', @alias,string or a UDF, a function name prefixed with a question mark.
:V = <expL> [:E = <expC>] [:F] Validates the field value based on the evaluation of <expL>. If <expL> returns true (.T.), the field value is considered valid. If <expL> returns false (.F.), the value is rejected and an error message displayed. If the :E option is specified, <expC> replaces the default error message. The validation is only enforced when the field value changes unless the :F option is used.

This option does not work on memo fields.

:H = <expC> Replaces the default field headings, field name or description, with the character expression <expC>.
:M = <expC> Displays <expC> in the message line when the field is selected.
:P = <expC> Sets the picture format to <expC>. For more information on picture template characters and picture formatting, see @...GET.
:W = <expL> Only allows data entry when <expL> evaluates to true (.T.), otherwise the field is read-only.


The <field list> can also include memory variables calculated by specified expressions. These take the format <memvar> = <expression>. The memory variables may not be manually updated in the BROWSE.


Keyword Description
FOR <condition> Restricts the BROWSE to those records matching the <condition>.
FORMAT Causes BROWSE to assumes the triggers and @...GET attributes as defined in the currently active format file.
FREEZE <fieldname> Restricts cursor movement to the column containing the field <fieldname>.
KEY <key expression> Restricts the BROWSE to those records whose index key matches the specified <key expression>.
NOINIT Causes BROWSE to inherit the settings and clauses from the previous BROWSE.
LOCK <expN1> Locks the specified number of columns <expN1> from the left. As you pan right and left, the locked columns remain on the screen and the columns to the right are panned.
NOAPPEND Disables the appending of new records into the table.
NOCLEAR Leaves the BROWSE window displayed on the screen when you exit.
NODELETE Disables record deletion.
NOMODIFY Disables record editing, providing read-only access to the table.
NOFOLLOW Prevents repositioning in the worksurface when an index key field value is edited.
NOMENU The NOMENU clause disables the BROWSE menu system.
NOWAIT Continues program execution immediately after the BROWSE command has been issued, rather than when the BROWSE is exited. The BROWSE is displayed, but not active.
OVERLAY Allows format files to be overlaid on the BROWSE worksurface rather than clearing the screen.
TIMEOUT <expN2> Specify how many seconds, <expN2>, BROWSE should wait for input before closing automatically.
TITLE <expC2> Specify a title, <expC2> to be displayed. Recital Mirage only.
VALID [:F] <expL2> [ERROR <expC3>] Allows record-level validation in a Browse window. VALID is executed only if a change is made to the record and an attempt is made to move the cursor to another record. The VALID clause is not executed if the only change is to a memo field. If <expL2> evaluates to true (.T.), the cursor can be moved to another record. If <expL2> evaluates to false (.F.), the cursor remains in the current field, and the system message "Invalid input" appears. An alternative error message can be specified, using the optional ERROR clause and the character expression <expC3> will be displayed. To force the VALID clause to execute before moving to another record even if no changes have been made, include the optional :F.
WHEN <expL3> FoxPro syntax compatibility only.
WIDTH Specifies a display size for all fields. This option will override the width specified at the field level.
WINDOW <window name> Causes the BROWSE output window to take on the characteristics of the named <window name> pre-defined window. The specified window need not be visible or active.


Example

use demo
browse field title:c="MR.Mrs,Miss,Mr",;
  last_name:w=10,;
  first_name


Products

Recital