Desktop Workspace


An Alpha Anywhere User Guide to the Desktop.

Addin Manager

Background information on using the addin manager and using the addin manager.

Adding a Global Image to Your Workspace

Bitmap images, as well as icon files, can be added and stored in the workspace and accessed globally in desktop applications.

Adding Tables or Sets to a Workspace

You can add an existing DBF table, perhaps previously created in another Alpha Anywhere workspace, or some other program, to your current workspace.


Aliases let you create transportable applications. An "Alias" in Alpha Anywhere refers to a name you assign to represent a local directory on a computer where workspace information is stored.

Appending Selected Records from another Table

You may append selected records from another DBF table to the current DBF table using the Append Operation or when viewing a DBF table through a form or browse.

Attaching a Library to the Current Workspace

To attach an external library to the current workspace:

Automatic Recovery of Indexes

The following two scripts allow a user to take a snapshot of all of the indexes in all of the tables in their application, and then check the actual indexes against the index definitions stored in the snapshot.

Backup Workspace

You can backup and restore desktop applications using the Backup Workspace utility on the Desktop Control Panel.

Cannot Refresh Workspace Problem

When Alpha Anywhere is refreshing a shadow workspace, it creates a file named after your database (.ADB file) by appending "LOCK" to the filename.

Clearing the Record Filter

This demonstration of Action Scripting adds a button to the Edit_Customer_Info form. This script will remove any restrictions to the records that the form displays.

Compacting the Workspace

When designing forms and reports, the size of the data dictionaries (the DDD and SET files) grows over time as you continue to make edits to the objects in your workspace. It is a good practice to periodically remove the extra bulk by compacting the workspace.

Creating a Desktop Application

In this lesson, you learn about designing a desktop application. You create a new workspace and DBF tables, and learn about defining data fields.

Creating Periodic Backups

You can provide an Alpha Anywhere setting to create weekly workspace backups of your desktop applications. If your workspace gets very frequent use, you might want to back it up daily.

Disallow Edits

The Disallow Edits action prevents the user from making any changes to records in the specified form or browse window. If the data entry style is set to modal, then edits will automatically be disallowed after the record is saved.

Dropping DBF Tables or Sets from a Workspace

To remove a DBF table or set from a workspace:

Exporting Selected Records from a DBF Table

You may export selected records from a DBF table using the Export Operation or when viewing a table through a form or browse.

Expression Library

The Expression Library stores expressions that can be inserted into your script with only a couple of keystrokes.

Filtering Records to Include Multiple Field Values

This demonstration of Action Scripting adds a button to the Edit_Customer_Info form. This script will restrict all the records that the form displays to those where "CT", "MA", "ME", "NH", "RI", or "VT" is the value in the Bill_State_Region field.

Font Equation Genie

The Font Equation Genie guides you through creating logical expressions for determining font face and size, as well as text decoration for a field. Each row represents one expression. You can use multiple rows to set several different Font Equations for the same field, which are evaluated in the same order which they appear in the Genie.

Global Scripts

Alpha Anywhere allows you to create Global Scripts. These are scripts that are not attached to any form buttons or events. Global Scripts are shown in the Code page of the Control Panel and they can be played back directly from the Control Panel by double clicking on the script name. Global Scripts can also be called by another script using the SCRIPT_PLAY() or SCRIPT_SPAWN() command. For example, the script that is attached to a button on a form might include this command:

Go to Record Number

The Go to Record Number action displays a specified record number based on the current index/query order. This option is a staple part of record navigation.

List View Genie

The List View Genie allows you to present a user with either an attractive, well formatted, and easy-to-use static list of choices or a dynamic list of choices and return the user's selection. You can:

Managing Addins

Background information and using the addin manager:

Marking and Deleting Selected Records in a Table

Covers marking, unmarking, and deleting records

Moving Selected Records to another Table

When you are viewing a form or browse, you can move the currently selected set of records.

Multi-User Architectures

In an environment where the Alpha Anywhere application is fully developed, the simplest multi-user architecture has multiple client PCs, each with a Runtime license, and a PC acting as a server. Depending on performance considerations, the server PC could be one of the client PCs.

Network Optimization

There are a number of issues relating to network optimization including how it works, dealing with files copied by network optimization, optimization options and how to customize optimization, refreshing a shadow database, and what you should do after creating a shadow database.

Numbering Child Records

Many applications create a set with a parent table in a one-to-many relationship with a child table. Field Rules auto-numbering can assign unique ID numbers to the records in the parent table. The problem of numbering the child table records is cannot be solved with Field Rules, particularly if you want to reset the child record counter to 1 for each new parent record. For example, the solution might provide the following record numbers:

One-Step Backup

Alpha Anywhere allows you to backup your desktop application with a single menu selections by selecting the Tools, Backup/Restore Database, One-step Backup command. Before you can run a one-step backup, you must first have saved backup settings.

Optimizing Performance of Advanced Record Lists

If you are displaying a record list for a large table, you can optimize the performance of the record list by constructing an index with the keylist_expression. If you have an index for the keylist_expression, the syntax for the advanced drop-down record list becomes:

Pack Tables

You pack a table if there have been design changes (changes to the data dictionary) or you have deleted records that you want to permanently remove. The Pack Tables action allows you to pack tables in your database. This will delete records marked for removal and compress memo files.

Preparing a Runtime Installation to use a Shadow Database

This technique describes how to run the initial network optimization after a user installs a runtime application on his computer. It involves creating a "Bootstrap" application. Here is how to create a "Bootstrap" application.

Record List - Combo Box Table Lookup

The Record List - List Box tab of the Table Lookups form contains two list boxes.

Record Locking

Alpha Anywhere places a lock on a record when:

Renaming Workspaces

A workspace consists of several files. They have the same prefix as the workspace, and have the extensions: .ALB, .ALX, .ALM, and .ADB

Restore a Workspace Backup

In Alpha Anywhere the Restore Workspace utility supports dates in MM/DD/YY formats.

Select Workspace Dialog

The Select Workspace dialog appears when you start Alpha Anywhere. Here you can select what you want to do, and quickly get started. The Workspace & Tasks tab allows you to open or create a new workspace.

Send Tables, Sets, and Workspaces

You can send Alpha Anywhere tables, sets, or entire workspaces via email.

Send Workspace

You may send all or parts of a workspace using email.

Sets vs Tables

Alpha Anywhere is a relational workspace management system. A relational system allows you establish links between data in several tables.

Sorting Records

There are two ways to specify the records to print and the order in which they print. You can either save the criteria in the label layout, or prompt the user at print time. These options are not mutually exclusive, so you can choose to save order and selection criteria, and then make changes to the criteria just before the Labels print.

Testing if a New Record Was Created

If you want conditionally run a script only when a new record was created, you can place this code in the CanSaveRecord event of the form.

Updating Selected Records in a Table

When viewing a form or browse, you may update selected records in the current table using an Update Operation or when viewing a table through a form or browse.

Using a Lookup to Set the Current Record

This topic describes how to use a table lookup to set the current record. The example is based on the Customer table of the AlphaSports sample database.

Using a Query to Find a Record

The following script shows how a query works. First, we open a table and set the query dot variable parameters. In this case the default record order is fine. We only filter for records where the field Bill_State_Region equals "MA". Finally, we create the query list.

Using Addin Variables to Create a Multi-Database Application

In this article, Tom Henkel explains how to use addin variables to create a multi-database desktop applications.

Using an Index to Find a Record

The following script is provides a simple example of how to use an index to determine whether a record exists, and to act accordingly. To start, we create an index based on lastname and firstname named "LF". The Order Expression for the index is alltrim(lastname) + "," + alltrim(firstname).

Using Tables and Sets That are Not Part of a Workspace

There is actually no need to have all of the tables and sets in an application be members of the workspace. Iin fact, you could build an application where none of the tables and sets are in the workspace. If you do this, the change that you would have to make in your Xbasic would be to full qualify references to forms, reports, tables, etc.

Using the New Table/Set Genie

To open the New Table/Set Genie :

Using the Shortcut Genie

The Create Shortcut Genie creates a shortcut to load Alpha Anywhere and start a particular desktop application. You can place the shortcut on the Start menu, in a particular group, or on the desktop. The Create Shortcut Genie lets you specify your own splash screen, title, and icon for the Alpha Anywhere program window, and also to specify special flags, such as whether the Alpha Anywhere window should be opened minimized or maximized and whether the user should be able to resize the main Alpha Anywhere window. To open the Create Shortcut Genie, select Tools > Create Shortcut.

Using the Spell Check

The Alpha Anywhere Spell Check lets you check the current record, the current selection of records, or the current field. To start the Spell Check :

Using Transactions

Many databases allow you to perform record updates within the context of a transaction. A transaction is useful when you want to make multiple updates or no updates at all. You bracket the INSERT, DELETE, or UPDATE commands with the SQL::Connection BeginTransaction(?) and CommitTransaction(?) methods. In the case when you cannot complete all the required updates, you conclude with the RollBackTransaction(?) method instead of the CommitTransaction() method. Suppose you want to copy records from the Product table to the New_Product table. Then, after you have confirmed the copy, you want delete these records from the Product table.

Working with Workspaces

Tables, sets, and workspaces are the primary structures for storing data in an Alpha Anywhere desktop applications. Your workspace files keep track of all of the tables, sets, toolbars, forms, and such, used for managing information. When you open an existing workspace, Alpha Anywhere displays the objects (tables, forms, etc.) that make up the workspace in the Control Panel. With Alpha Anywhere, you work with one workspace at a time.

Workspace Specifications

Covers categories, tables/fields, indexes, layouts, saved settings, queries, and expressions that relate to a desktop application.

Zip Workspace

A Zip file is a standard file format that is used to store files in a compressed form. You can use products such as WinZip? to view the contents of a zip file. If you don't have WinZip, you can download a shareware version from You may zip all or parts of a desktop workspace into a compressed zip file.

Zip Tables, Sets, and Workspaces

You can zip tables, sets, and entire workspaces from within Alpha Anywhere in your desktop applications.

Zoom to Record

If a form has an embedded browse, you can use the Zoom to Record command to switch to a user-selected form to display more detail on the current record in the embedded browse.


Desktop applications only. Not available in Community Edition.