A5_OPEN_DEFAULT_BROWSE()

Syntax

A5_OPEN_DEFAULT_BROWSE( Table_Set_Name as C [, Filter as C [, Order as C [, Description as C [, Options as C [, Show_All as L ]]]]] )

Argument

Description

Table_Set_Name

The name of the table or set to display.

Filter

Optional. Default = .T. (all records). A character filter expression that evaluates to a logical value. Selects records from the table.

Order

Optional. Default = record order. A character order expression that sorts selected records.

Description

The description that you assign to the query that Alpha Five creates when the browse is opened.

Options

Optional. Default = Record order, ascending, not unique. Controls whether Alpha Five uses an index, a new query list, or an existing query list to satisfy a query. This string can contain one or more of the following codes:

Code

Description

N

Builds a query list even if an index matches the query definition.

D

The descending order option puts the records in descending alphabetical order or, for a numeric field, from highest to lowest value.

T

Temporary query. Alpha Five will automatically delete this query if necessary if building a new query would cause it to run out of query slots. there are a maximum of 16 query slots.

U

The unique option includes only unique records in the query list.

M

Builds a new query list even though a) an existing query list exists, and b) an existing Index exists (both of which, Alpha Five could have used rather than running a new query).

X

Use an index even if an existing query exists (which Alpha Five would otherwise have used in preference to the index).

I

The I flag is obsolete. It was used by Alpha Five V1 to indicate that the index should be case-insensitive. However since V2, Alpha Five automatically builds all indexes as Case-insensitive. It is documented because in some situations, the Script Recorder will show Xbasic code that includes the "I" flag.

Show_All

Optional. Default = .F. Specifies whether the Show All icon that appears on the toolbar is enabled.

  • .T. = Icon enabled.

  • .F. = Icon not enabled.

Description

The A5_OPEN_DEFAULT_BROWSE() function displays the default browse for the selected table or set. If you specify an optional filter and order, you can give the query a description (which shows up when you press Control I to display the index selector).

options are the standard options that apply the to <tbl>.query_create() method.

If you do not want the user to remove the filter/order that you specified for the default browse, you would want Show_All icon to be disabled. otherwise the user could press the icon and remove the filter that you specified.

Supported By

Alpha Five Version 5 and Above

Limitations

Desktop applications only.

Example

The following displays all the entries from the Customer table where the lastname field starts with the letter M or greater. The entries are also ordered by lastname.

a5_open_default_browse("customer", "lastname > " + quote("M"), "lastname")

See Also

Browse Functions and Methods