Professional Documents
Culture Documents
Release 2.0
Sesame Database ManagerTM User Guide
The software described in this Users Guide is furnished under a license agreement and may be
used only in accordance with the terms of that license agreement.
Copyright Notice
Copyright 2007 Lantica Software, LLC. All Rights Reserved.
Documentation version 2.0
NO WARRANTY: This documentation is delivered to you AS-IS. Lantica Software, LLC makes no
warranty as to its accuracy or use. Any use of this documentation or the information contained
herein is solely at your own risk. This documentation may include technical or other inaccuracies
or typographical errors. Lantica Software, LLC reserves the right to make changes to this
documentation without notice.
No part of this publication may be copied by any means without the express prior written
permission of Lantica Software, LLC, P.O. Box 27, Penns Park, 18943-0027
Acknowledgements
Sesame uses parts of the iMatix SFL package, Copyright 1991-2000 iMatix Corporation
http://www.imatix.com.
Sesame is based in part on the work of the FLTK project (http://www.fltk.org).
Sesame makes use of the PCRE library. Copyright (c) 1997-2006 University of Cambridge
this software is provided by the copyright holders and contributors "as is" and any express or
implied warranties, including, but not limited to, the implied warranties of merchantability and
fitness for a particular purpose are disclaimed. in no event shall the copyright owner or
contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential
damages (including, but not limited to, procurement of substitute goods or services; loss of use,
data, or profits; or business interruption) however caused and on any theory of liability, whether
in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the
use of this software, even if advised of the possibility of such damage.
Trademarks
Sesame Database Manager is a trademark of Lantica Software, LLC.
Windows, Microsoft Office, Microsoft Word, and Microsoft Excel are registered trademarks of
Microsoft Corporation.
WordPerfect is a registered trademark of Corel Corporation.
Other product names mentioned in this documentation are trademarks of their respective
companies and are hereby acknowledged.
4
MENU TREES
Search Menu
5
MENU TREES
6
Table of Contents
Introducing Sesame................................................................ 21
1 Getting Started................................................................. 23
What is Sesame? ........................................................................... 23
Why are there two Sesame programs?.......................................................... 23
What is a database? ................................................................................... 23
What is a layout? ....................................................................................... 23
What is a layout element? ........................................................................... 24
What is a field and a record? ....................................................................... 24
Summary .................................................................................................. 24
Installing Sesame.......................................................................... 25
Starting & Using Sesame ............................................................... 25
Start Sesame Database Manager ................................................................. 25
Converting your Q&A databases to Sesame ................................................... 30
To Start Sesame Designer........................................................................... 30
Using Sesame Help .................................................................................... 31
Uninstalling Sesame ................................................................................... 32
7
Contents continued
9
Contents continued
10
Contents continued
12
Contents continued
13
Contents continued
16
Contents continued
Layout and Layout Element settings tab Define element level access .......... 441
Application Settings tab Define application-wide rights.............................. 443
Using a protected application..................................................................... 445
Password Controls.................................................................................... 446
Deployment and preventing design changes ................................................ 446
Server administration ............................................................................... 447
Summary ................................................................................................ 449
Temporarily Disable Security ..................................................................... 449
Security frequently-asked questions ........................................................... 450
17
Contents continued
18
Contents continued
------------------------- -------------------------
19
Introducing Sesame
SESAME is a powerful and flexible database manager designed to meet the needs of a
wide range of users and developers. Whether you are a small business do-it-
yourselfer, the head of an organization, a corporate department administrator or a
professional developer, Sesame gives you the tools you need to easily create database
applications and organize and present the information in them.
If you are new to databases, Sesame makes getting started with simple applications
easy, fast, and fun. As you learn, Sesame offers more advanced tools to further
enhance your applications. For those with more experience, Sesame provides a variety
of options all within easy reach for customizing and programming your
applications. Basic design tasks are easy to perform, but when you need to move
beyond the basics, the tools to do so are at your fingertips.
If you are making the switch to Sesame from another database manager, a variety of
integrated facilities can help simplify that transition. Sesame provides Symantec
Q&ATM users with an extensive translator for Q&A databases. Those using other
programs can take advantage of Sesame's data import facilities, including the ability
to perform hierarchical imports when migrating from a relational product.
The documentation that comes with Sesame is designed to get you quickly started and
to serve as a complete reference library as you begin to explore Sesames features
and capabilities. Four guides are included with the product:
21
INTRODUCING SESAME
Sesame Quick-Start Tutorials This practical hands-on guide demonstrates the
basic commands and building blocks of Sesame by guiding you step-by-step through
creating four database applications, each with a focus on different features and tasks.
If you are new to Sesame or database managers in general, we encourage you to
work through these tutorials as a first step to using Sesame.
The above guides are designed to help you learn and build on your experience with
Sesame. As your interest and requirements grow, and you need to further adapt,
customize and expand your applications, you will find sections in these guides covering
the information you need.
22
Section 1
Getting Started
In order to begin using Sesame and working with the tutorials in the Sesame Tutorials
booklet, there are a few things it will help you to know. All of the concepts in this
section are covered in greater detail elsewhere in the Sesame User Guide, but a quick
overview of the basics will make it easier for you to get started.
What is Sesame?
Sesame is a database management system (DBMS). It is a program that gives you the
tools to add, store, retrieve, and work with your information.
What is a file with a .DB extension as opposed to one with a .DSR extension?
The Sesame Tutorials and Sesame User Guide refer either to a .db file or a .dsr file,
depending on the task you are performing.
Each Sesame application consists of a pair of files. The working application that you
use to enter and update records, run reports, and otherwise work with your data is
made up of a .db file and .dat file pair. When you open an existing application, Sesame
shows only files with the .db extension.
The copy of the application that you use in Sesame Designer to make design changes
is made up of a .dsr file and .ddt file pair. When you open an existing Designer file,
Sesame shows only files with the .dsr extension.
What is a database?
A Sesame application contains one or more databases that are in some way related
such as a customer database, an orders database, and an inventory database.
Basically, a database is all the records of a particular type along with the all of the
forms and reports that show the information in those records. For example, an Orders
database might consist of all the order records, the order form and the Orders By
Month report. For a detailed explanation of a database, see the Advanced Concepts
appendix.
What is a layout?
A layout is a form or report. It defines how you will look at and use the parts of your
information. Since Sesame is form-based, you create your databases by building and
editing layouts.
23
1 GETTING STARTED
For example, an Orders record may have fields for OrderDate, CustomerName and
ShipToAddress. It is rare, in Sesame, that you will work with actual fields. Normally,
you will work with layout elements. A layout element that displays the value (content)
of a field is said to be bound to that field. The only time that you need to deal with a
field is if you change its data type or its name.
Summary
An application, which consists of two files application.db and application.dat is
comprised of one or more databases each with one or more forms and optional
subforms. Forms and subforms are both comprised of layout elements. Most of those
layout elements will be bound to fields.
If you are eager to jump right into creating databases, we urge you to take advantage
of the practical exercises you will find in the Sesame Quick-Start Tutorials booklet,
particularly the first three:
24
1 GETTING STARTED
In an hour or less, you will gain more know-how about this part of Sesame than by
any other means.
Q&A
If you are migrating to Sesame from Symantec's Q&A, you will
also want to read the Q&A Database Translation Guide, a separate
booklet that comes with Sesame.
Installing Sesame
For the most part, the Sesame installation is a simple file copy procedure. Directories
will be created and the required files copied into them. Depending on your operating
system, Sesame may also create desktop shortcuts for you. There are no registry
entries, DLLs, or changes to any system folders or settings. The only exceptions to this
are the desktop shortcuts, which are placed in the appropriate system folders on your
computer.
The Linux version of Sesame is also on the CD. The README file provides step-by-step
instructions for installing the Linux version.
For complete installation instructions for your operating system, and a list of installed
files, please refer to the separate Sesame Installation Guide provided with your
Sesame package.
To start Sesame Database Manager (as opposed to Designer), do one of the following:
25
1 GETTING STARTED
26
1 GETTING STARTED
To open one of the sample databases supplied with Sesame, click on the Samples
folder and it will expand, showing the files within it. Only Sesame applications (with a
.DB file extension) are shown.
Select an application file with the keyboard or click on it to open it. (See Figure 5.)
The application is opened and you are shown the opening screen. (See Figure 7 on
page 29.) You are not automatically looking at data.
Sesame will display your default directories and drives (as defined by your rootdirs.ini
file) followed by the list of applications you have recently opened. The list will be
displayed with the most recent file being the first on the list. Clicking on any filename
in the list will open that file.
If you are using Sesame runtime, you will see a list of all recent Sesame runtime
applications (*.DB).
In SDesigner, you will be presented with a list of all recently used runtime applications
(*.DB) and designer files (*.DSR).
27
1 GETTING STARTED
If you select File/Translate Q&A in runtime the list will show all recently translated
Q&A databases (*.DTF).
Sesame also keeps a text version of this list of files, sesame_recent_files.txt, in the
Sesame startup directory.
Once the application is open you will want to view data, add data, or perhaps run a
report. All of these require using a form. To do so, you:
28
1 GETTING STARTED
Opening a form in Add Data mode shows you the form ready to add a new record. See
the section Adding and Editing Data in this user guide for full details.
Opening a form in Search/Update mode shows you the form open at the Retrieve
Spec. Press F10 or select Search Commands / Retrieve New Results from the menu
tree to display all records and browse through all of them, of fill in search criteria to
view just some of the records. See the section Searching and Sorting in this user
guide for full details.
To learn all about Sesame's user interface, see the next section in this user guide
Sesame's Screens and Menu System.
To view the complete menu tree structure, see section at the front of this user guide
Sesame's Menu Trees.
To learn how to move around a form, see the section Navigating Forms in this user
guide.
29
1 GETTING STARTED
Use the Start Menu / Program menu to start Figure 8. Desktop shortcut for
Designer (see Starting Sesame, above). Starting Sesame Designer.
There are two ways of starting Sesame Designer from within Sesame Database
Manager. You can open Designer and redesign the application you are currently
working with by selecting Application Utilities / Redesign Current Application from the
menu tree.
Or you can open Designer and start creating a brand new application by clicking on
the first button on Sesame's toolbar. (See figures 9 and 10 below.)
30
1 GETTING STARTED
You use Designer to create new Sesame applications and make design changes to
existing ones. Designer is described in the section Designing a Sesame Application
in this user guide.
Sesame has three types of help facilities to assist users in all areas of the program:
context-sensitive help, custom help, and custom tool-tips.
Sesames built-in help displays information about the particular task you are
performing. The information displayed pertains to the general area of the
program in which you are working. Built-in help displays when you press the
F1 key.
Custom help allows the application designer to define a special user message
for any layout element on any form. When you press F1, Sesame first displays
the custom help message, if any, for the current element. (See Figure 11.) If
you close the custom message screen and press F1 again, Sesames built-in
help displays.
Figure 11. Custom help for Call Date. Displayed by pressing F1.
You can close a custom help screen by clicking the "X" (close window button) in the far
right corner of the help windows title bar, or by pressing F1 a second time to bring up
Sesames internal help screen.
You can resize the custom help screen by dragging its borders, or by using the title
bar buttons to minimize or maximize it.
31
1 GETTING STARTED
Note: The designer of the application may have programmed the form you are
using to automatically display a custom help message for any form element.
The designer can also create a custom tooltip for any element placed on a
form. These display custom help messages in small pop-ups whenever the
mouse is positioned over the element. (See Figure 12.)
Tooltips display automatically as you hover the mouse over the element to which they
are attached, and they self-close as you move the mouse off the element.
Uninstalling Sesame
32
Section 2
Sesame's Screens and Menu System
When you open a Sesame application, you are working in a multi-window environment
where different tasks are performed in different windows or panels. An example of this
is shown in Figure 1.
This section covers the various screens you will see in Sesame. The actual operations
you perform within each screen will be discussed in the detailed
sections of the Sesame User Guide covering the individual operations.
33
2 SCREENS & MENU SYSTEM
Translate Q&A Translates a single Q&A 4.0 or 5.0 database to a new Sesame
application. This is not the same as importing data into an existing Sesame
application. See the section "Import, Export & Copy Records" if you want to
import data exported from Q&A.
ASCII Database - Quickly creates a simple application when provided with only
the data from a previous application or database.
XML Database Like the ASCII Database command it can create an application
from an ASCII file formatted as legal XML.
Undo Undoes any new typing in the selected layout element. This is a one-
time operation that will undo and then redo only the new typing in an element.
It will leave previous, unchanged data untouched. Sesame has other types of
undo for records and designs on its menu trees.
Find on This Form Opens a query box that allows you to search for a text
string in the current record on an open form.
Repeated Playback Runs the current macro the specified number of times.
Set Series Counter Sets the initial value for an internal counter that is invoked
with the Ctrl-F2 keystroke combination.
Set Series Format Sets the format of the Series Counter entries.
Macro Visibility On Shows the results of a macro while it is being played back.
Macro Visibility Off Hides the results of a macro while it is being played back.
Autocomplete Off Turns off the Autocomplete feature. Useful in databases with
a very large amount of records.
Directional Navigation On allows the Up and Down arrow keys to move up and
down based on element geography rather than navigation order.
35
2 SCREENS & MENU SYSTEM
Open Command Area Displays the menu tree if it is has been closed by using
the Close Command Area command.
Show Quick Start Menu Opens a moveable, easy-click menu to access the
most used Sesame commands.
Show Function Key Menu Opens a pop-up Function Key Menu that provides
easy access to the keystroke combination commands used throughout Sesame
on a simple, moveable easy-click menu.
Performs the same function as the File selection Show Quick Start Menu and
open the Quick Start Menu.
36
2 SCREENS & MENU SYSTEM
Figure 5. The Sesame status area. The Tabbed Window selector (top) and Status line (bottom).
37
2 SCREENS & MENU SYSTEM
1. To the right is the Form area. This is the working area of Sesame for data entry,
searching, and updating your records.
2. To the left of the Form area, at the top, is the application Menu Tree. The Menu
Tree is used for most day-to-day tasks, many of which can also be activated by
keystrokes. (See Figure 7.)
3. To the left of the Form Area, at the bottom, is the Spec Window. The Spec Window
is where you manage standard operations such as sorting, importing, exporting,
copying, and mass updating records. (See Figure 7.)
38
2 SCREENS & MENU SYSTEM
Figure 7. Partial view of an application in Update mode, showing part of the Form area, the
application Menu Tree (upper left) and the Spec window (lower left).
View options
The size of the Form area, Menu Tree, or Spec Window can be adjusted by clicking and
dragging the separator between the sections. You can also change the size of the
overall Sesame window with standard click and drag actions. This gives you flexibility
in sizing the various components of the Sesame window. The Spec Window can also be
maximized (take up the entire left hand pane) or minimized (closed) by using the Up
and Down arrows on the right-hand side of the Spec Window title bar. Sesame retains
set window sizes for the current session only. The menu tree can also be closed
(hidden) see "Hiding the Menu Tree" below.
39
2 SCREENS & MENU SYSTEM
40
2 SCREENS & MENU SYSTEM
Sesame.Ini file
The Quick Start Menu can be made to open on application open by using the
Sesame.ini option:
This command tells Sesame to open with the quick start menu visible, invisible, or
disabled. If it is disabled, you cannot invoke the menu by any means. If the entry is
not placed in the .ini file, the default is off.
Startup Switches
To open Sesame with the Quick Start Menu active and open use the following startup
switch when running Sesame:
Sesame.exe -quick_start
If an entry is not placed in the .ini file, or the startup switch is not invoked, the default
is off.
Sesame menus are context sensitive. They will be different depending on the mode of
Sesame you are using.
The complete structure of the Sesame menus, in all modes, can be seen in the
Sesame Menu Structure appendix.
The key to working with Sesames menus is realizing that they are in a separate pane
and that the focus must be on that pane to work with the choices. Focus means being
the active object. When you click on a menu selection or in a layout element on a
form, it is said to have the focus. Focus in the Menu Tree window is attained by a
single mouse click in the pane. Once the menu pane has the focus, a single click on
any item will activate it. Likewise, once in the pane, the arrow keys and the enter key
on the keyboard may also be used to make selections. The selected item is highlighted
for easier navigation.
41
2 SCREENS & MENU SYSTEM
To better inform you where you are in the Sesame windows, whenever you click in the
menu tree area it will change color and show a highlight for the menu item selected.
Clicking away from the menu tree will make the highlight disappear and the menu
color dim back to the non-selected color. The color scheme will depend on your
Windows settings and/or your Sesame .ini file settings.
Single Level menu trees may make the initial transition for untrained users easier.
Single level menus can be set in two places
Sesame.ini file
To set single level menus use the following line to the Sesame.INI file:
Single Menu tree will only show one level of commands at time.
Full Traditional mode wherein multiple levels are displayed at the same time.
42
2 SCREENS & MENU SYSTEM
Startup switch
To set single level menus use the following startup switch when running Sesame:
Sesame.exe -singlelevel
The -singlelevel command line startup switch causes the command tree in Sesame to
default to single level mode.
If you do not make an entry in the Sesame.Ini file or as a command line startup
switch, Full is the default.
Application Menu
When you open an application in Sesame, you will be at the Sesame application menu
shown in Figure 13.
Figure 13. Main application menu that opens Figure 14. Main application menu with the
when starting a Sesame application. Application Utilities menu expanded.
From that point you will be able to make the choices to perform the following actions...
43
2 SCREENS & MENU SYSTEM
Search and Update your data in any form(s) in any of the databases in the
application.
44
2 SCREENS & MENU SYSTEM
45
2 SCREENS & MENU SYSTEM
The Specification or Spec window, which comprises the lower left hand quadrant of the
screen. The eight specs that can be displayed in the spec window are
sort export
import mass update
Copy Table View
Quick Report Duplicates
There will be a ninth spec Restrictions if there are any restrictions applied to one
or more layout elements.
Once you have a result set, you can then select a different spec by using the spec
selector buttons the arrows on either side of the spec action bar, or by right-clicking
46
2 SCREENS & MENU SYSTEM
on the action bar for a list of specs. When viewing a result set following a search, the
sort spec is the default in the spec window.
When you have multiple elements enabled, you can change the order of them in one
of two ways:
Using the mouse by clicking on the name of the element and dragging it up
or down the list.
Using the keyboard by clicking on the element name to select it, then
pressing Shift-Up Arrow or Shift-Down Arrow to change its position in the
stack.
You can only select one element name at a time.
When layout elements are enabled in the spec, they acquire a letter next to them to
show they are enabled. The letter varies depending on the spec.
Usually, you double-click on any enabled element to open up a window or dialog that
controls the operation. This includes the programming window for a mass update, or
the Export dialog for an export. An exception is the restrict spec. It has no selectors
and simply lists the layout elements that have restrictions along what the restrictions
are. This particular spec is for information only, it is not interactive.
47
2 SCREENS & MENU SYSTEM
Load opens the Spec Manager, for the current spec type (e.g. Sort, Export
etc) with the Load tab active, so you can easily retrieve a saved spec of
that type
Save opens the Spec Manager, for the current spec type (e.g. Sort, Export
etc) with the Save tab active, so you can easily save a spec of that
type.
Set All enables all the layout elements on the form useful for including all
fields in an export, for example
Clear All disables all the layout elements. So, for example, no mass update
programming will be enabled
48
2 SCREENS & MENU SYSTEM
If the focus (where the cursor is) is on a form, one mouse click is required to move the
focus to the Application menu. Thereafter, a single click is all that is required to
activate any of the menu choices.
The Application menu is context-sensitive. This means that it changes as you work,
giving you only the relevant options. With no
application open, there is no Application
menu.
At an empty Search/Update form, before any data is retrieved, you see various search
options.
Then, when you run a search, you see many more options. These choices are
presented as submenus or singular choices:
49
2 SCREENS & MENU SYSTEM
Search/Update Submenus
Navigation menu
Navigation Menu
What it Does
Menu Choice (Keystroke)
Advance Record (F10) Saves and moves to next record, if any, or
to a new blank record if there are no further
records.
Previous Record (F9) Saves and moves to previous record (if
any).
50
2 SCREENS & MENU SYSTEM
Navigation Menu
What it Does
Menu Choice (Keystroke)
Main Advance Record (Ctrl-F10) Saves parent and subrecords and goes to
next parent record. (Main/Subforms only
see Working with Subforms section).
Main Previous Record (Ctrl-F9) Saves parent and subrecords and goes to
previous parent record. (Main/Subforms
only see Working with Subforms section.)
Next Matching Record Allows special sub-set searching in a
retrieved record set.
Switch to Add Data Mode (Ctrl-F6) Opens another window in Add Data mode.
Save Record Saves this record, leaves it displayed.
Save Record and Close Form (Shift- Saves record and closes form.
F10)
Close Form Without Saving (Esc) Closes form without saving (warning if
unsaved edits).
51
2 SCREENS & MENU SYSTEM
52
2 SCREENS & MENU SYSTEM
Note: Further information on copying & pasting forms can be found in the Adding and
Editing Data section of this manual.
Q&A
* Alt-F5 enters a time including seconds. If your time LE is
formatted to display only hours and minutes it will complain that the
time cannot be saved with seconds and will strip them off. This is a
likely situation with translated Q&A databases as Q&A does not store
time with seconds. You will need to change the formatting to one that
accepts seconds if you plan to use the Alt-F5 keyboard shortcut.
53
2 SCREENS & MENU SYSTEM
54
2 SCREENS & MENU SYSTEM
The Function Key Menu appears in a separate window that you can move around and
still work in your form. It can be minimized to the Windows toolbar. You can use it as
a combination keystroke tutor or as an actual keystroke executor.
If you have the Function Key Menu active (you have clicked in it and it is the selected
window) your keyboard is not active. Only your mouse will make selections. You must
click back in your form before continuing.
55
2 SCREENS & MENU SYSTEM
To close the Function Key Menu you can either use the
"Hide Function Key Menu" choice on the "View" pulldown
or you can click on the Windows close "X" at the upper
right corner of the menu window.
Window Management
Shift-Enter Toggle
The Sesame screen can be toggled between a maximized window and its normal
(restored) window size by pressing the Shift-Enter key combination. If in Designer the
cursor must not be on a form otherwise the form is edited instead.
56
2 SCREENS & MENU SYSTEM
Attachment
Pressing Alt-F6 or selecting Other Commands | Toggle Attachment (Alt-F6) from the
command tree causes the form area of the Sesame runtime window to occupy the
entire window. If the form area is already occupying the entire window (detached),
these commands, or escape, will restore the form to its usual position in the right
hand panel. While the form is detached, command tree commands, menubar pulldown
menus, and specs are not available to the user, but they are still available to SBasic
functions and subroutines.
If you attempt to close the window while the form area is occupying the entire
window, the form is restored to its usual position (attached) instead of closing the
window.
Embedded Dialogs
Starting Sesame with the "-embed_dialogs" startup switch, or with the sesame.ini file
entry: "EMBED DIALOGS: ON", causes Sesame to embed most popup dialog boxes in
the main window's frame, rather than popping up in their own standalone window.
If the original size of the dialog and the size of the Sesame main window differ, some
dialogs will scale to "fill" the entire window area.
57
2 SCREENS & MENU SYSTEM
Warning: The window that the dialogs appear in is the main window. Closing the
main window will exit Sesame, even if dialogs are embedded.
The F6 window can remain open as you move through the elements on a form and
tries to stay on top of the Sesame form window. It is dynamic - as you move from
element to element the window reflects the data in the selected element. The window
is independent of the form and can be sized and moved like any window. As the
window is resized or the data is changed, horizontal and vertical scroll bars will appear
as necessary.
As the data in the F6 window is changed, the underlying data in the form element
simultaneously reflects the change. The F6 window reflects the data in the form
element when it is opened.
58
2 SCREENS & MENU SYSTEM
On the toolbar editor menu you can close the window (F6). Any changes are saved to
the underlying element on the form.
On the Edit Menu you can Undo, Cut, Copy, Paste, Select All, Delete, and Clear.
On the Format Menu you can select word wrap on or off. The default is On.
On the Search Menu you have the capability to perform find and replace operations.
The F6 window also supports the mouse right-click context menu with the choices to
Undo, Cut, Copy, Paste, Select All, and Clear.
Where applicable, these functions are also supported by standard shortcut keys such
as Ctrl-Z, Ctrl-X, Ctrl-C, Ctrl-V, and Ctrl-A.
59
Section 3
Designing a Sesame Application
Introduction
Sesame Designer is a self-contained application design module linked to the main
Sesame program. You use Designer to create and manage your databases,
design/redesign the forms for use with those databases, add programming, and create
reports in Designers Report Writer.
Designer has its own Preview mode where you can see the results of your design,
programming, and other changes before committing them to an actual Sesame
application.
Note: If you are entirely new to Sesame Designer, we urge you to read the
Sesame Quick-Start Tutorials booklet included in your Sesame documentation
package.
There are two ways of starting Sesame Designer from within Sesame Database
Manager. You can open Designer and redesign the application you are currently
working with by selecting Application Utilities / Redesign Current Application from the
menu tree.
Or you can open Designer and start creating a brand new application by clicking on
the first button on Sesame's toolbar. (See figures 2 and 3 below.) If you run Designer
as a separate standalone application, you can still create a new application or redesign
an existing one.
If you select Redesign Current Application, SDesigner will start and attempt to name
the designer file with the same name as your application except with a DSR extension.
If a current designer file of that name already exists, you will be prompted to
overwrite it or create a new filename.
61
3 DESIGNING A SESAME APPLICATION
In Designer, you work with a Designer file that has a .DSR filename extension. This
can either be a copy of your existing application or a completely new design. You
create your design or make changes to an existing design, then either reconcile the
changes to an active Sesame application or save the design as a new application. You
can modify an
applications design
while others are using
the live application.
Even major changes
to existing designs,
such as adding and
deleting fields, are
handled by reconcile.
62
3 DESIGNING A SESAME APPLICATION
Designer (.DSR) filename. This is the file you will work on during your design or
redesign. (See Figure 4.)
Once finished and tested, you will be able to convert the Designer file to an active
application file or reconcile it back to an existing application. This allows you to work
on a copy of your application or design while it is still in use. When redesigning an
existing Sesame application, the DSR file will start out with the complete structure and
data (to facilitate testing your design changes) of the current application. It is
essentially a working copy of your application.
Terminology
You don't have to cram all your fields into a single form and make it many
pages long. You can have several smaller forms that are task-related.
If you need to enhance your application with programming, you program the
form, not the database. Each form has its own Program Spec (and Restrict
Spec, and so forth). Figure 5 below shows the relationships between the
various components of a Sesame application.
63
3 DESIGNING A SESAME APPLICATION
Some definitions
64
3 DESIGNING A SESAME APPLICATION
Database
A Sesame application consists of one or more databases. Basically, a database is all
the records of a particular type and all the forms and reports that show these records.
For example, an Orders database might consist of all the order records, the Orders
form and the Orders By Month report. For a detailed explanation of a databases
structure, see the Advanced Concepts appendix.
Layout
A layout is a form or a report. It defines how you will look at and use the parts of your
information. Since Sesame is form-based, you will create your databases by building
and editing layouts, which are essentially forms.
Layout Element
A layout element is anything you put on a layout or form. A layout element can:
As youll see, Sesame offers a comprehensive selection of layout element types for you
to use when designing your forms and reports.
Field
A field is a component of a database and is where Sesame actually stores your data.
Record
A record is a logical collection of fields. A form displays data from the fields in one
record at a time.
For example, an Orders record may have fields for OrderDate, CustomerName and
ShipToAddress. It is rare in Sesame that you will work with an actual field. Normally,
you will work with layout elements. A layout element that displays the value from a
field is said to be bound to that field. The only time that you need to deal with an
actual field is if you change its data type or its name.
Q&A
When you add a field in Q&A for DOS, you are adding a field to the
database and simultaneously adding a "thing" on the form to display the
contents of that field. This "thing" is called a field in Q&A.
In Sesame Designer, anything you put on a form, be it a text box, a label or a graphic
line, is called a layout element. Layout elements can be text boxes bound to data
fields, placeholders for fixed text (labels, headings, and the like), frames to display
pictures, or devices such as combo boxes to display pick-lists. The layout element
65
3 DESIGNING A SESAME APPLICATION
ordinarily used to display data is called a text box its the type of layout element
you will be using most.
When you add a text box to a form in Sesame Designer, by default you are adding
both a field to the underlying database and a layout element to display the contents of
the field. The layout element is said to be bound to the underlying field. That means
that the two are linked. The element shows the data in that field.
A field can have many layout elements on many forms bound to it. But a layout
element can only be bound to single field.
It is possible to add a layout element and not have it bound to a field. These could be
used for calculated totals, for example. Conversely, you can have fields in your
database that do not currently have any layout elements bound to them.
Summary
Fields are displayed on forms via the use of layout elements, which can be thought of
as place holders on the form.
A layout element is unique to a specific form and a form is defined by its layout
elements.
A field is not unique to a specific form and the same field can be displayed on different
forms, or multiple times on the same form.
Layout elements are bound to the fields whose information they display.
Select New Application from the File menu on the menu bar.
Open Designer by clicking on the 'New' icon on the icon bar.
Select Design New Application or Redesign Current Application from an open
applications Application Utilities menu tree.
66
3 DESIGNING A SESAME APPLICATION
Once you have completed your design work using the DSR file, you can:
67
3 DESIGNING A SESAME APPLICATION
In Designer
from an ASCII file
from an XML file
by translating a Q&A database
The 'normal' way is to use Sesame Designer, described in detail shortly. Briefly, these
are the other three ways
ASCII Database
The ASCII Database command quickly creates a simple application when provided with
only the data from a previous application or database. This is especially useful when
converting a large set of tables of data from a relational database to Sesame.
The ASCII Database command is available from Sesame Runtime by selecting File /
ASCII Database from the menubar. After selecting the ASCII Database command, a
file dialog requests the filename of the ASCII file to be converted into an application.
After the application is created, a second file dialog appears requesting the filename of
the application to be saved. The application is saved using the .db and .dat extensions.
After being saved, the application is loaded into Sesame.
Here is a header line and some data lines from exporting the Customers.db sample
application to an ASCII file with the header option turned on, the Delimit All Fields
option turned on and an exclamation mark inserted as the first character on the
header line:
!"KEY","First","MI","Last","Company","Add1","Add2","City","State","ZIP","Phone","Ema
il","Position","Live_Prospect","Date_Entered","Hobbies","Numerical","TimeField","Chec
ked","Currency"
"937","Mary","","Wilman","","Route #16 Box 18","","PARIS","VA","77444",
"","","","P","1999/09/06","GOLF","40.73913000","10:39:00","1","244.4400"
"940","Sara","","Footer","","1611 Diane Circle","","PHOENIXVILLE","PA", "15124","215
766-6300","","","","2003/01/20","FISHING;TENNIS","156.66666700",
"02:58:00","","940.0200"
"943,"Margaret","","Kravitz","","P.O. Box 236","","MALVERN","PA", "19499","215 201-
3117","","","P","1999/03/10","","67.35714300", "11:58:00","1","471.5200"
68
3 DESIGNING A SESAME APPLICATION
Notes:
The ASCII Export command in Sesame does not place the exclamation mark ("!") on
the header line. This must be done by hand to remain compatible with other programs
that can use the header line but are not expecting an exclamation mark character.
ASCII Database has no way to determine the data type of the values, so all values
must be quote delimited, including numbers. If using the ASCII Export command in
Sesame, select the Delimit All Fields option.
69
3 DESIGNING A SESAME APPLICATION
ASCII Database creates a text box for each field in the ASCII file. It places each text
box directly below the previous text box. They are all the same size, style, and data
type: Text.
As with ASCII Import, problems may occur if there are characters such as double
quote marks or newlines embedded in the data itself.
XML Database
The XML Database command is closely related to the ASCII Database command in that
it also can create an application from an ASCII file. In this case the ASCII file is not a
comma/quote delimited file, but is instead formatted as legal XML. There are three
ways to create a Sesame XML file: The Export Application to XML command on the
Application Menu, the XML commands that appear in SBasic, and hand editing the XML
file in a text editor.
The XML Database command is available from Sesame Runtime by selecting File / XML
Database from the menubar. After selecting the XML Database command, a file dialog
requests the filename of the XML file to be translated into a Sesame application. Once
the XML file has been loaded and translated, a second file dialog requests the name of
the application files, which are saved as a .db file and a .dat file. The application is
then loaded into Sesame.
If the XML input file was created by the XML Export command, the XML Database
command will create a new application identical to the original. The XML format for a
Sesame application created by a XML export is complete and contains, in a readable
format, all of the information contained in a Sesame application.
XML is a "tagged" format, much like HTML. Being a naturally linked hierarchical
format, XML closely resembles the structure of Sesame's own application format, and
is therefore ideal as a portable standards based ASCII file format for Sesame
applications.
Q&A Translation
70
3 DESIGNING A SESAME APPLICATION
Exclude Design: Translates the data records, but does not create any forms,
reports or specs. After translation, new Forms can be created in SDesigner to
display the translated data. Since Security is contained in the Design, this
choice will result in a database containing all the data, but without Security.
Therefore, a password is required to translate a secured Q&A database with
this option.
Monochrome: Ignores Q&A color settings and creates a form with a gray
background and white fields with black labels and text.
Exclude Retrieve Specs in Reports: Translates reports with attached Sort Spec,
but no attached Retrieve Specs. This allows your Report to work with any
records you retrieve. If you normally answer Yes to "Do you want to make
temporary changes to this report?" then this option should be turned on.
Exclude Security: If this option is set, the Translator will request a password
before continuing. If that password is allowed to change security settings in
the Q&A database, the Translator does not translate security settings, Users or
Groups.
If you choose not to view the log at this point, you can still see the translation errors
at a later time by choosing File / Server Administration.
72
3 DESIGNING A SESAME APPLICATION
The first step in creating a new application is to start Designer. As detailed in the
previous section, you can do this either from Sesame or by starting a separate
instance of Designer. For now, start Sesame from your desktop icon and then select
File / New Application, or click on the NEW button.
The Designer module opens. Click on the NEW button again. The file Select window
opens. You can do one of two things here select an existing DSR file, or type in the
name of a new one, then click on Accept.
You don't need to add the file extension. Sesame will add the .DSR.
The capitalization you use will be maintained.
You can use spaces and long file names.
After you have named your design file, Designers application menu will appear. (See
Figure 9.) This is where you will begin your design work. From this menu you can
choose to work on Forms, Reports, or Manage your database or entire application
design.
73
3 DESIGNING A SESAME APPLICATION
In a new design, until the first form is designed and saved, the Add New Database
option is the only usable selection under Forms. (See Figure 10.)
74
3 DESIGNING A SESAME APPLICATION
When you are designing a new application or adding a new form to an existing
application, you will be prompted for the name of the form before you begin your
actual design. If the form name you select already exists, Sesame will append a
number ("0", then "1" etc) to the name you select. If you are adding a new database,
both the database and the form will be assigned the name you select. If you are
adding an additional form to an existing database, the database name will not be
affected by your form name.
You are working on a new form in your new database where you will add layout
elements and fields for your data. In Designer, you are creating both a database and a
form at the same time.
When you place layout elements on the form, you are creating both fields (storage
locations for data in the database) and layout elements (objects that can display data
from a database field).
75
3 DESIGNING A SESAME APPLICATION
With the cursor in a layout element the tab key moves to the next LE, shift-tab moves
you to the previous LE. You must start in an element to use this feature. The tabbing
feature will move you to a tab page but will not continue tabbing through that page
until you select an element on the tab with your mouse.
76
3 DESIGNING A SESAME APPLICATION
The right arrow key moves the cursor 7 pixels while Ctrl + right arrow key moves the
cursor 1 pixel.
Figure 13. Sizing a static text element to display all of the text you type.
Press the Enter key to complete the entry. Do not type a colon anywhere within the
static text (Designer takes that as a signal to create a Text Box layout element). The
77
3 DESIGNING A SESAME APPLICATION
static text appears on the form. If not all of the text appears, click on it again and a
box will appear with a sizing handle in the lower right corner. Drag the handle with
your mouse to make the static placeholder large enough to display your text. (See
Figure 13.)
You can also use the Layout Element Adder to create a static text element. This is
covered later in this manual.
Note: If you delete an element by mistake, click on Undo Last Change in the
Commands control panel.
Text Boxes
Text boxes are the primary layout elements: they display your data. You can add text
boxes in the same ways as static text. You can either type directly on the form, use
the Layout Element Adder tool, or use the element example palette. The first two
techniques are described below.
78
3 DESIGNING A SESAME APPLICATION
Static Text
You can also add these LE types using the Layout Element Adder. All other LE types
can ONLY be added using the Layout Element Adder. If you want to create a text box
to store dates or numbers you must do this using the Layout Element Adder.
This applies to the layout element NAME only. There is no reason why you should not
use a safe LE Name and set the label to whatever you like. The LE label is not referred
to elsewhere and can include any characters or even be blank. If you have differing LE
names and labels then you need to take care that you use the layout NAME in
programming, not the label on the form. When programming you can refer to the
drop-down list in the programming editor, which shows you the LE names.
Type the label followed by a colon (:) and a new layout element will be placed on the
form. The colon tells Designer to make this a text box type layout element, bound to a
new text type data field, with both a name and label as you typed it. (See Figure 14.)
79
3 DESIGNING A SESAME APPLICATION
Figure 14. Adding a text box layout element by typing a label followed by a colon (:). The actual
element begins, and the label ends, where you initially clicked.
multi-line text box layout element, bound to a new text type data field, with both a
name and label as you typed it.
LE Naming Rules
See "Rules for naming Layout Elements" and "Spaces in Layout Element names" on
page 79.
If you type a name that is a reserved word, Designer will retain that as the label for
the element (and show it on the form) but will change the name of the underlying field
to one in the LE sequence (LE0, LE1, LE2 etc) so that it is both legal and unique. To
see this, show the Property Viewer / Other tab as you work.
The Layout Element Adder allows you to add any of the available types of layout
elements to your form.
81
3 DESIGNING A SESAME APPLICATION
82
3 DESIGNING A SESAME APPLICATION
creates a text field, a check box creates a boolean (yes/no) field, and so on. This
underlying field will also be given the default label name unless a value has been
added to the Layout Element Adder before using the Element Example Palette.
The Element Example Palette is not modal. You can leave it up as you work on your
Form and return to it as you need additional elements. To close the Element Example
Palette window, click the X in the upper right corner.
Key Behavior
Shift+Enter Inserts a blank "line" on your Form. All elements below the cursor
are moved down to make room. If necessary, the Form itself will
increase in height to accommodate the moved elements.
Shift+Spacebar Inserts a blank "space" on your Form. All elements to the right of
the cursor on the same "line" are moved over to make room. If
necessary, the Form itself will increase in width to accommodate the
moved elements.
Shift+Delete Opposite of Shift+Enter. Deletes a "line" and moves all elements
below the cursor up.
Delete Opposite of Shift+Spacebar. Deletes a "space" and moves all
elements on the same "line" as the cursor to the left.
LE Naming Rules
See "Rules for naming Layout Elements" and "Spaces in Layout Element names" on
page 79.
If you use Layout Element Adder to add an element to a form with a name that is a
reserved word, Designer will retain that as the label for the element (and show it on
the form) but will change the name of the underlying field to one in the LE sequence
(LE0, LE1, LE2 etc) so that it is both legal and unique. To see this, show the Property
Viewer / Other tab as you work.
The default selection is Text Box, which adds a text box type element to the form.
From this list, you can select any of the other types by highlighting them and releasing
the mouse.
83
3 DESIGNING A SESAME APPLICATION
84
3 DESIGNING A SESAME APPLICATION
the components of the main form. It can display a single record at a time, or
display multiple records in a table-like format.
Scroll Region a Scroll Region allows you to create an area on your form that
can hold more elements than could normally be displayed in that amount of
screen real estate. It allows you to create an area on the form where you can
scroll to see elements that are not always visible.
Page Marker Static. Allows the print form command in Sesame to print one
form across multiple pages and allow form scrolling using Page Up / Page Down.
The page marker bisects the form horizontally.
Text Editor Element Dynamic. similar to a multi-line text element but has
the addition of scrollbars that allow you to easily see all of the data in the
element by scrolling with your mouse.
Menu Button Dynamic. Like a combo box but you are only allowed to select
values on the list, not type your own.
A Combo Box is a combination text and list box. It presents a pick-list box with
preset values for selection or data that you type during data entry. Once you add a
Combo Box to your form, you right-click on it to create the list of pre-set choices you
want available in the drop down. Each entry is followed by a carriage return. (See
Figure 19 and Figure 21.)
Figure 19. Adding a Combo Box and right clicking to add values.
85
3 DESIGNING A SESAME APPLICATION
A List Box also presents a list of preset values but all choices are displayed at all
times. The selected choice is highlighted. After adding a List Box to the form, you add
the list choices by right-clicking on the element and typing in a list of entries. Each
entry is followed by a carriage return. (See Figures 20 and 21.)
The same 'Edit Choices' box is used to save value lists for Combo Boxes and Menu
Buttons.
Figure 20. Adding a List Box and right clicking to add values.
Figure 21. Editing values for Combo box, List box, Menu button
86
3 DESIGNING A SESAME APPLICATION
87
3 DESIGNING A SESAME APPLICATION
In the Control Panel section, directly below the Layout Element Adder is the Property
Editor. You use this control to change properties of the layout elements you have
placed on the form. The Property Editor is also used to change the properties of many
other parts of your design. These features will be addressed later. For now, you will
use it to change the labels on your radio buttons. The Property Editor does not display
the current settings of an item. It is only used to change them.
Figure 25. Step 3 - Labeling the Radio Buttons using Property Editor.
The Text Editor element is similar to a multi-line text element but has the addition of
scrollbars that allow you to easily see all of the data in the element by scrolling with
your mouse. If the text can fit in the available element space, the scrollbars will
disappear. If the text exceeds what can be displayed, the scrollbars automatically
appear. Like a multi-line element you cannot use the Enter key to navigate out of the
element. It just creates another line of data in the text editor element.
The text editor element is directly added to a form design with the Layout Element
Adder.
88
3 DESIGNING A SESAME APPLICATION
The Menu Button layout element is similar to the combo box layout element in that it
provides a menu of choices for you to select from that appear when you press the
menu button with the mouse or the spacebar. Unlike the combo box, it does not
provide a the ability to type in any values not currently included in the dropdown list.
You are limited to the choices provided on the menu. Once a choice has been made,
that choice will appear on the menu button as its title. A separate static text could be
provided in the form design to give a menu button its own (unchanging) label.
Once a menu button is added to the form, you can create the dropdown list for it by
right-clicking on the element and selecting 'Edit Choices'.
Note: A menu button cannot be left blank and will always have a value. Because of
this, the first choice in the Menu Button list will only appear at the retrieve spec screen
and you will have to select one of the values i.e. the menu button has to be part of
the retrieve. To avoid this, add ".." (two dots) to the top of the list. This will not
appear as an entry but at the retrieve spec will allow the Menu Button to be excluded
from the retrieve (".." means any valid entry).
A Command Button is an
element that will allow you
to run programming or a
macro when it is clicked on
with the mouse or "pressed"
with the spacebar. As
created on the form it will
have no function. It is a
holder for an On-Element-
Entry Programming
statement. (See Figure 27
and the Sesame Figure 27. Adding a Command Button.
Programming Guide.)
89
3 DESIGNING A SESAME APPLICATION
Sesame accepts URLs (web addresses) as the path to image files. This facility is in
both image layout elements and layout elements using image labels. In Sesame
runtime, to specify a URL in an image layout element, double click on the image
element. When the image browser dialog appears, type the URL to the image as the
file name. Include the full address "http://www.lantica.com/images/lantica2.jpg". In
Sdesigner, type the full URL in the label of any static image. To use a URL in an image
being used as a label on a layout element, type the following as the layout's label
"[image]:http://www.website.com/ImageName.jpg."
substituting the name of the website and image in the applicable spots. The image will
appear in Sesame runtime after the application file has been saved.
Sesame supports GIF images as one of its accepted image formats. Sesame should be
able to accept and display most GIF formats, including transparency. But Sesame
cannot display animated GIFs with motion, and will only display the first frame of the
animation.
An Image Box is a dynamic element that displays an image specified by the path and
filename stored in the database field. When the record is displayed, Sesame displays
the image in the confines of the image box you create. The image will be scaled to fit
inside the box. (See Figure 28.)
A Static Picture is an image that always stays the same. It is added to the form
using the Layout Element Adder. From the Select Element Type pulldown menu, select
90
3 DESIGNING A SESAME APPLICATION
"Static Picture". For a Form, fill in the Label text box for the Static Picture with the full
path to that image file. Example:
Label: C:\MyPictures\MyCompanyLogos\logo_12.bmp
For a Report, the image file must exist in the Application Image Path. Fill in the Label
text box with the path to the image file, relative to the Image Path. Example:
Label: MyCompanyLogos\logo_12.bmp
Then press the Add Element to Form button. After the Static Picture has been added,
it can be moved or resized.
Tabbed Pages ("Tabs")
Tabs enable you to place many layout elements on a single form and have access to
them by clicking between tabbed sections rather than having to scroll down a long
page. Creating Tabbed Pages is described in Section 4.
Subforms
A Subform is a form within a form. Subforms are a way to display related records from
a second database on the form of a master database, so that you can see records
from both databases at the same time. A good example of this would be an Invoice
application where each record is the master invoice for a customer and the subform on
the record displays the individual line items for each item purchased on that particular
invoice. For details on subforms, see the Creating Subforms section in this guide, and
also Building an Application with Subforms in the Sesame Tutorials Guide.
91
3 DESIGNING A SESAME APPLICATION
As an example, consider you have an intake form where you need to ask the applicant
many questions and record his/her answers. You do not have to see all of the answers
at once, but you do need to be able to review them, include them in reports, calculate
results based on them, etc. what you really need is to see one question and answer at
a time and be able to easily scroll to any other area of the intake interview.
To start making a Scrollable area on your form, first choose Scroll Region from the
Layout Element Adder control panel.
A scroll region is added to your form. Temporarily, make its size large enough to
accommodate all of the elements you will want in the region in your final design (make
sure to enlarge your form with the Shift-Arrow keys to give you enough space for the
scroll region and you elements).
To add elements to your scroll region, they must already exist on the main form or
they need to be added to the main form. Drag some or all of the elements onto the
scroll region.
Using the scroll region's sizing handle in the lower right-hand corner, size the region to
appear as you will want it on you final form. As you change the size of the region to be
less than that of all the elements within the area, horizontal and vertical scroll bars will
appear as necessary. See Figure 30.
If you later need to add additional elements to the scroll region, you can make sure
that no elements are selected inside the region and then scroll down to the bottom or
out to the right.
92
3 DESIGNING A SESAME APPLICATION
Note: If you have an element, or elements inside the scroll region selected and you
use the horizontal or vertical scroll bars, the selected elements will also be scrolled in
relation to the rest of the scroll region. To avoid this, click outside the scroll region
before moving the contents with the scroll bars.
Then you can use the sizing handle to increase the size of the region to allow you to
add the additional elements. When you are finished, resize the region back to the final
size you want. Don't forget to resize you overall form back down using the Shift and
Arrow keys.
Be aware that in use the region will scroll from the top of the highest LEs text box to
the bottom of the lowest LEs text box not including the labels.
Page Marker
The page marker element allows the print form command in Sesame to print one form
across multiple pages. The page marker bisects the form horizontally.
It appears in SDesigner as a line that is the full width of your form with a diamond on
the left-hand side.
You cannot assign a label or a name to this element and it cannot be bound to a data
field. The diamond acts as a handle to allow you to easily select and move the page
marker on your form design. Clicking on the diamond will then allow you to move it
with the mouse or the Ctrl-Arrow keys. The page marker can only be moved vertically.
In Sesame runtime, the page marker appears as a thin, dotted line that is the full
width of your form.
In Sesame, when the form is printed the page marker layout element tells the print
form routine where one printed page stops and the next page begins.
The page marker is also used by form navigation to control the landing point for the
Page Up and Page Down keys when navigating on a form. If you press the Page Down
key Sesame will scroll your form and display it with the next page parker being at the
top of the display window. Pressing the Page Up key, will scroll back to the previous
page marker. You can essentially make your forms into 'multi-page' layouts in this
manner.
Page markers can be set in a blank area of the form or even to bisect other elements.
If a form is printed using page markers bisecting elements, those elements will be
divided between pages. If a form is scrolled using Page Up/Page Down with a page
marker bisecting an element, that element will also be split as you scroll.
93
3 DESIGNING A SESAME APPLICATION
Line Unbound
Box Unbound
Tabs Unbound
Subform Unbound
You can have multiple forms in a database and may want to display some of the same
data fields on more than one form. Binding is what allows this. Once a data field has
been created, it will appear in the list of binding elements so that you can attach it to
new elements on the same form or on other forms in the same database.
You can also use Bind Element To for determining the data type of the new data field.
That is, you can bind a Text Box to the following:
Your choice will determine how Sesame handles and formats the data placed in the
fields.
Note: Anything can be typed into a data field, but depending on the type of
field it is, Sesame will attempt to convert it to a proper format, as listed in
each description below, on leaving the field. If it cannot be converted (for
example, "Next Sunday" in a date field) the result will be a blank entry.
Text A place to store anything that can be typed from the keyboard. Numbers (0-
9), alphas (a-z), or symbols (!,@,#,$,%,&,_,-,+,*, etc.) are all acceptable in a text
field.
Number Only numeric characters (0-9) and the +, -, (,) can be typed in these
fields.
Money Only numeric characters (0-9) and the +, -, (,) and currency symbols can
be typed in these fields. Sesame will format the typed values as money based on your
system or custom settings.
Date Only date values will be accepted in these fields. Dates can be entered using
"/", ".", "-", ",", or even spaces as separators. For the current year, you need only
enter the day and the month. Sesame internally stores the dates in the format
yyyy/mm/dd.
Time Stores time of day in HH:MM:SS format. You do not need to type the
seconds. As well as being able to display time in both 12 and 24 hour formats (2:30
PM and 14:30), Sesame 2.0 will now accept entries in military format such as "1430"
and convert the entry to the selected display parameters.
Boolean These fields store Yes/No values. These values can also be entered as
Y/N, 1/0, T/F, Yes/No, True/False, On/Off.
Keyword These fields store more than one entry in a field. These entries are
separate values, separated by semicolons, each of which can be retrieved as if they
were the only value in the field. Keyword fields can also be used to find records with
more than one value in these fields. Keyword fields essentially give you the ability to
store lists of entries in a single data field. A good example of this is a list of hobbies. A
person could have movies, art, and reading as hobbies while another has movies,
skiing, and football. Searching this field for movies would return both peoples records.
See more in the section on Retrieving Records.
95
3 DESIGNING A SESAME APPLICATION
Image A field used to store links to image files and then display that image in a
layout element when the record is retrieved.
The image file must be a jpg, bmp, or png type image. Progressive jpg files are not
supported.
This feature moves from element to element in geographic order. It does not use the
Navigation Order settings that apply in Runtime or respect GOTO or ThrowFocus()
commands that may be in your SBasic programming.
Scoot Mode
When Scoot Mode is enabled, adding elements to your Form or moving elements
causes existing elements to move (scoot) themselves out of the way to make room for
the newly created or repositioned element.
The Scoot options are available from Design Mode by selecting Editing Controls from
the Commands Control Panel.
Scoot Vertically Elements scoot down to make room.
Scoot Horizontally Elements scoot right to make room.
Scoot Margin Minimum number of pixels that must exist between elements before
they scoot to make room.
Default settings for Scoot Mode are controlled by the sesame.ini file.
96
3 DESIGNING A SESAME APPLICATION
Snap To Grid
When Snap To Grid is enabled, a grid appears on your Form which is only visible in
Design Mode. If an element is added or moved, the element adjusts its position so
that its upper left corner "snaps" to the nearest grid intersection.
The Snap To Grid options are available from Design Mode by selecting Editing Controls
from the Commands Control Panel.
Default settings for Snap To Grid are controlled by the sesame.ini file.
Make Like Me
Designer provides a context
sensitive capability called "Make
Like Me." This is a way of copying
properties from one existing layout
element to one or more other
layout elements.
97
3 DESIGNING A SESAME APPLICATION
on the master layout element (your template) and you will see a Make Like Me menu
choice. Placing your mouse on the choice will open a submenu with the choices All,
Color, Text, Look. Clicking on one will apply the applicable changes to all selected
elements.
Example: To format Last Name, Address, City elements to be the same as First Name:
Selecting:
Color Changes Label, Text, and Fill colors to match the master element.
Text Changes Label and Text (data) font face, size, and style.
Look Changes Box style, fill, shape, and label alignment.
Size Changes Width and Height to match the master element.
All Changes all of the above settings.
To recap:
1. Select a layout element (Layout element A) and set its properties until it looks like
you want it to be.
2. Select another layout element or group of layout elements. These are the layout
elements that will be changed to match Layout element A.
3. Right-click on Layout element A. Select from the Make Like Me menu to change
the properties you want to copy. The selected layout elements will be changed to
match Layout element A.
Make Like Me will do its best to figure out what you want, but you will get the best
results with the same type of layout elements (text to text, list box to list box, and so
forth).
Relabel an element
This choice allows you to easily change the label of the element that is displayed on
your form. Right-Click on a Layout Element and selecting Relabel to display a query
box with the element's current Label. Change the label as you wish and click on OK.
98
3 DESIGNING A SESAME APPLICATION
Use as Example
This selection allows you to set a temporary default Layout Element design for use
with any/all additional elements you will add to the form.
The new layout element is identical to the one duplicated, except for field binding.
99
3 DESIGNING A SESAME APPLICATION
Rather than binding to the same field, the new element will bind to a new field of the
same type. The name of the new field will be the name of the original field, with a
numeric suffix added. The label will be the same as the original.
For example:
LE Name LE Label Bound to Field
Original City City City
First Duplicate City0 City City0
Second Duplicate of original City1 City City1
All the attributes of the original field apart from name, position and programming are
copied. This includes formatting, restrictions, custom help, initial values etc. However,
programming attached to the original element is not copied.
The new field is created in the database on saving the form. A new field is not created
if you delete the duplicated LE before saving the form. A new field is not created if you
bind the duplicated LE to a pre-existing field before saving the form.
If the original element is Unbound, the duplicate will also be created as Unbound.
Duplicating a list box or combo box also duplicates the choices. Duplicating a Radio
Button Group also duplicates the radio buttons in that group. Subforms, Tabs and Tab
Groups cannot be duplicated. Duplicates are not in any way linked to the original
element. You can only duplicate one LE at a time.
If you don't want to create a new layout element, but want to copy the attributes of
one layout element to others, then use MAKE LIKE ME which is described in this
section on page 97.
100
3 DESIGNING A SESAME APPLICATION
Undo
Method 1: Click on an element to select it, then hold down the Shift key and click on
another. The elements don't need to be adjacent to one another. Clicking the label will
not select the element. You must click on the element itself.
Method 2: "Rubber-banding." Use your mouse to draw a rectangle around the form
elements you wish to select. Its called "rubber-banding" because it's like taking a
rubber band, expanding it with both hands and placing it around several objects. You
don't have to completely enclose the layout elements. As long as any part of an
101
3 DESIGNING A SESAME APPLICATION
All the techniques below describe moving just one layout element. However, the same
techniques are equally applicable to working with several layout elements at the same
time.
102
3 DESIGNING A SESAME APPLICATION
Use the mouse to drag it to a new location on the form once it has been
selected. You have to drag the element a certain amount before it actually
moves. This is to prevent accidental moving of an element when you only
intended to select it.
There are times when you may need more control: here the keyboard
techniques are preferable.
You can use the keyboard. Click on the layout element (to select it) and use
the keyboard to move the field using the following key combinations:
As you move the element, either with the mouse or keyboard, the coordinates (X, Y)
of the new position are shown just above it. You are also told where the element is
being positioned - on the form or off the form (on the canvas):
Mouse method: When you select an element, it displays a sizing handle at the lower
right. (See Figure 40.) Click on this and the mouse pointer turns into a broad four-
headed arrow. Drag this to resize the element. In addition, the Ctrl and Shift keys will
also help control the movement. Ctrl and mouse changes only the height. Shift and
mouse changes only the width.
103
3 DESIGNING A SESAME APPLICATION
Figure 40. Resizing the State Element using the sizing handle.
Keyboard method: Select the element with the mouse. Use the key combinations to
resize the element as follows:
The left and top sides of the layout element stay in place. They are the anchor points
as you perform keyboard resizing.
By selecting multiple elements, you can perform resizing on all selected elements at
the same time.
You can use the Property Editor / Position tab to move and resize layout elements.
This gives you extremely fine control. This method is described in the section Using
Property Editor to Move, Resize and Space Layout Elements later in this guide. You can
also control the size and position of layout elements with programming statements.
(See the Sesame Programming Guide). With programming, fields can become visible
or invisible, grow or shrink or even move on the form depending on the data.
Resizing the form
To resize the form itself, click on a blank area of the form. Hold down the shift key and
use the arrow keys to change its size. You cannot make the form too small to contain
the layout elements on it. If you find it will not become smaller then it is often because
there is a wide layout element (typically a static text element) which has the same
background color as the form, or you have not removed Q&A drawing characters from
a translated form. (See note below.)
As an alternative to the technique described above, you can use the Property Editor to
set the height and width for the Form.
104
3 DESIGNING A SESAME APPLICATION
Q&A
To remove all the Q&A line draw characters from a translated Q&A
form, right-click on a blank area of the form and select "Delete Q&A
drawing characters".
Any layout elements on the canvas will not appear on the form. If you place a text box
on the canvas, then that element will not show in Sesame at all. Not in any list of
fields. But, it is retained in the application, and if put back onto the form in Designer,
it immediately becomes available and an active part of your design.
When you move a layout element off the form you will see the legend "Parenting to
Canvas (Ghosting)". (See Figure 43.)
You don't need to close the form design tab to use Preview mode, however you cannot
work in the Design Menu while Preview Mode is open. You can alternatively select
Application Utilities / Preview Application from the menu tree. It is a good idea to use
this feature as you move through your design efforts to check your progress and save
your design in stages.
Preview mode opens the Designer file (.DSR) in Sesame in a separate window. When
in Preview mode, you will see a different window with "Preview Mode" in the window
title bar and an Exit Preview button. (See Figure 45.) While this window is open, the
Designer window is disabled. The Preview mode is for testing only. In Preview you can
do almost of what you can do in Sesame. You can browse; you can add and delete
records; almost all programming will work; you can mass update, import, export, and
so forth.
Preview mode operations are exactly the same as they are in any Sesame application.
For information on specific functions / operations, see the applicable section in this
Users Guide.
Note: The data you are working with in Preview Mode is for testing
purposes only and will be lost if you reconcile the design to an existing
Sesame Application. It is retained if you save the Designer (DSR) file as a
new Application (DB).
When you are finished working in Preview mode, close the application, click on the Exit
Preview button (See Figure 45.) and you will be back in Designer. Any data you have
added to the database in the DSR file in Preview mode is saved with the DSR file.
106
3 DESIGNING A SESAME APPLICATION
To this point we have covered the basic Designer features needed to design a new
application. The following sections cover other features and capabilities of Designer
which you can use during initial design or during redesign of a previously saved
application.
107
3 DESIGNING A SESAME APPLICATION
Your new application is created and is ready to be used in Sesame. Any subsequent
changes to this application will not affect your Designer file which is maintained on the
system with its DSR extension.
108
3 DESIGNING A SESAME APPLICATION
Form redesign
If you will be working with a previously saved application, you will need to open it for
Redesign:
Control Panels
Control Panels, located on the left side of the Designer window (See Figure 48.) give
you the ability to perform many design and control functions.
In the Control Panels, when you see a dropdown with an arrow like this it
signifies that the action will be immediate on making the selection from the
list.
A set button like this requires that you click on it to apply any changes
made in its section.
Table 1 (below) lists the available commands and the Control Panels where they can
be found.
109
3 DESIGNING A SESAME APPLICATION
Commands Panel
Switch to Design Menu
Close Design Tab
Save Layout Design
Undo Last Change
Program Layout Program Editor
Change Program Execution Order Set Programming Order
Change Navigation Order Set Navigation ('tab') Order
Open Attributes Table
Relink Form
Export Form to XML
Element Example Palette
Editing Controls
110
3 DESIGNING A SESAME APPLICATION
111
3 DESIGNING A SESAME APPLICATION
Property Viewer
The Property Viewer displays the current
settings and values of the item of which you
are viewing the settings. Like other control
panels, the Property Viewer has multiple
sections. The first section is the View Settings
For dropdown. Once you have selected an item
in the main Designer screen, you need to tell
the control panel what you want to see the
selected element, the layout, the database, or
Figure 48. Control Panels. the application.
112
3 DESIGNING A SESAME APPLICATION
The next section is the Tab area at the bottom of the panel. This tells Property Viewer
what category of information you want to see about the item you selected in the View
Settings list.
The last section is the actual display window where the values you are interested in
are displayed. (See Figure 49.)
Note: Selecting a single element is done by clicking in the element (not the
label) or by moving the cursor with the arrow keys until it is in the element.
Selecting multiple elements was described earlier.
Layout Current settings for the form itself such as color, font, size, name and
position.
Database Current settings for the Database are limited to one its name.
The names of databases are seen under, for example, Add Data in Sesame, and under
Redesign/Customize a Form in Designer.
Application Current settings here are the name of the application which is seen at
the very top of the application menu in Sesame and in Designer, as well as its data
display formats and image path.
113
3 DESIGNING A SESAME APPLICATION
Property Editor
You use the Property Editor to set or change properties of selected items. It is used in
conjunction with the Property Viewer which displays the current settings of the
selected items.
114
3 DESIGNING A SESAME APPLICATION
The Property Editor has six tabs. Each one will be covered in turn.
Color palettes
Initially the color palette is set to Default with 32 popular colors. You are not limited to
these. Click the Colors dropdown and you see a list of alternative color palettes:
115
3 DESIGNING A SESAME APPLICATION
116
3 DESIGNING A SESAME APPLICATION
To set a value, you type the numerical value, and then click on the Set width or Set
Height arrow to the right of the value. You may also type differential values. If you
want to change the height or width of one or more layout elements, you can type for
example -1 to make it 1 pixel smaller, or +2 into the appropriate box and apply it.
See example in Figure 55.
117
3 DESIGNING A SESAME APPLICATION
Vertical Alignment works similarly for lining up fields arranged left to right across
the form.
Horizontal and Vertical Spacing means adjusting the space between layout
elements. Spacing them out, closing them up, or spreading them out evenly by
selecting Equal.
Horizontal Space / More will leave the left-most selected element where it is but
increase the horizontal space between each of the elements to its right, moving them
to the right.
Horizontal Space / Less will leave the left-most selected element where it is but
reduce the horizontal space between each of the elements to its right, moving them to
the left.
Vertical Space / More will leave the top-most selected element where it is but
increase the vertical space between each of the lower elements, moving them down.
Vertical Space / Less will leave the top-most selected element where it is but
decrease the vertical space between each of the lower elements, moving them up
towards the top one.
Size to Match is similar to alignment, but instead of lining up the multiple layout
elements, it makes all the selected layout elements the same size in height or width.
Selection Layer Assignment Allows you to select and set elements into different
selection layers (1 through 5) for ease of design and selection.
The Apply all Settings button is useful for lining up a group of layout elements, all with
the same X position (for a column of layout elements), or all with the same Y position
(for a row of elements on one line). Be aware that using Apply All Settings to both X &
Y positions, to multiple elements, will result in the elements being stacked on top of
one another.
118
3 DESIGNING A SESAME APPLICATION
If you simply want to change the formatting for a layout element, jump straight to
Setting formats for a layout element on page 120.
If the Layout settings are not specified, then Application Settings are applied.
If the Application settings are not specified, then your Operating system
defaults are applied.
All but your System Settings can be set within Designer. These, for example, are set in
the control panel Regional Settings in Windows.
For a selected Text element there is a single dropdown Text Format. Choices are:
The data will be changed to the selected mode after it is entered in the element and
the user exits the element. The data will be displayed, stored, and exported in the
format selected.
For a selected Date element there is a single dropdown Date Format. Choices are:
System Short Date (as defined up in your operating system, e.g. Windows)
System Long Date (as defined up in your operating system, e.g. Windows)
20 Custom formats, some of which are shown in Figure 57.
120
3 DESIGNING A SESAME APPLICATION
For a selected Time element there is a single dropdown Time Format. Choices are:
121
3 DESIGNING A SESAME APPLICATION
When you select a Currency element, the number of dropdowns increases to six.
122
3 DESIGNING A SESAME APPLICATION
Then set your formats as desired. This works essentially the same as setting layout
elements. Make the desired settings in Property Editor / Format / Layout Defaults, and
they will then become the settings for all elements bound to fields of the affected type
(unless a specific element has had individual settings applied. See precedence of
settings in the Format tab section). (See Figure 63.)
123
3 DESIGNING A SESAME APPLICATION
124
3 DESIGNING A SESAME APPLICATION
Selected Elements
Layout
Database
Selected elements
Allows you to change settings, listed above,
for the selected element or multiple selected
elements. In addition, there is a special setting
R for range. Table 3 shows what each setting
Figure 64. Property Editor Other tab
for Selected Elements.
does. They are then described individually.
Label See "Changing a layout element's label" under Customizing Forms on page
133.
Name See "Renaming a Layout Element" under Customizing Forms on page 134.
"R" See "Renaming a series of layout elements - the "R" setting under Customizing
Forms on page 136.
Initial value An initial value is a text or numeric value that you wish to appear in a
data element, on each new form, without requiring manual data entry. The value can
be anything you can type from the keyboard but cannot include Sesame functions
such as @Number, @Date, @Time, @UserID, or the like. To make Sesame functions
an initial value on a form, you must use the programming capability of Sesame and
assign these functions to a layout element On-Form-Entry. See the Sesame
Programming Guide for more information.
Q&A
Restrictions should not be used to create pick-lists. This was actually a
misuse in Q&A. Sesame provides both Userselect/@Userselect and
@PopupMenu or @PopUpChoiceList features to accomplish this. See the
Sesame Programming Guide.
126
3 DESIGNING A SESAME APPLICATION
On this tab, each setting is applied individually by clicking on the Set arrow on the
right side of each property.
Indexed Fields
Q&A
There is no need to create individually specified indexed fields
("Speedy Fields") in Sesame as there is in Q&A. In Sesame, fields are
indexed as needed without user intervention.
127
3 DESIGNING A SESAME APPLICATION
Selection Layers
Selection layers are used to separate the elements on your Form into distinct groups.
This gives you the ability to tell Sesame that you want to work with only the elements
in one of those groups, and it should temporarily ignore the elements in any other
group.
The Selection Layers menu and the Flatten button in the Advanced Element Selector
work in concert with the Selection Layer menu on the Position tab in the Property
Editor. If you have elements selected and choose a selection layer for them in the
Property Editor, SDesigner puts those elements in the specified selection layer. Up to
five selection layers can be populated with elements. Choosing a selection layer in the
Advanced Element Selector, tells Sesame that you only want to be able to select
elements in that particular layer. This is especially useful with tab pages or boxes,
where elements can be stacked on top of each other, but you want to be able to
rubber-band without selecting the "container" elements. You can put the box or tab
page on one layer and the elements contained by it onto a different selection layer.
Then, if you set the Selection Layer in the Advanced Element Selector to the layer
where you put the individual elements, it will be impossible to accidentally select the
underlying box or tab page.
For example, in the sample Customers database you select Company, Add1, Add2,
and City and place them in layer 2 using the Selection Layer menu on the Position tab
of the Property Editor. Then, if you select layer 1 from the Selection Layer menu on
the Advanced Element Selector, you will see that these elements you placed in layer 2
have been grayed-out to indicate that they are now not selectable. To cause them to
become selectable, you can choose layer 2 or Off from the Selection Layer menu. If
you no longer have any use for layers on any element, you can click the Flatten
button, which will delete all of the layer assignments.
Layer assignments are sustained between sessions and are saved with the application
files. They do not need to be removed to preview or run an application.
128
3 DESIGNING A SESAME APPLICATION
Selection layers are set in the Property Editor position tab by first selecting an
element, or group of elements, on your form and then selecting a layer number from
the drop down menu (see Figure 67) for those selected elements. See the section on
Advanced Element Selector for easy ways to make multiple element selections. Any
element not specifically set will have a default selection layer of 1.
129
3 DESIGNING A SESAME APPLICATION
Once you have set elements in a specific layer and turned that layer on, you can either
work with all elements in that layer by selecting them all (one method would be with
Sesame's right-click 'Select All Elements on Form') or with any one or several
elements in that selection by individually selecting the ones you want.
If you wish to change Selection Layer assignments, you can do them individually with
the Selection Layer setting in the Property Editor or you can set all elements on the
form back to level 1 by clicking on the 'Flatten' button in the Advanced Element
Selector panel.
Once selection layers are applied, they will stay with the application. Selection Layers
affect the drawing order of elements in Runtime. Elements on a lower selection layer
draw before elements in a higher selection layer.
130
3 DESIGNING A SESAME APPLICATION
The Advanced Element Selector control panel lets you select elements based on
characteristics of those elements. This can be very useful when trying to select many
elements that have features in common but may not be near one another, or appear
on tab pages, or have some other geographical impediment.
The Advanced Element Selector control panel appears near the bottom of the control
panel frame, between the Property Viewer and the Message Log.
Figure 69. Selecting all Date elements Figure 70. Deselecting elements over 95 wide.
The Action pulldown determines the action SDesigner should take with the selected
elements. The choices are:
New Selection: deselects any previously selected elements and creates a new
selection group
Add To Selection: adds the elements next selected to the existing selection
group
Remove From Selection: removes the elements next selected from the current
selection group
The Select By and the Criteria pulldowns work together to determine which elements
should be subject to the action determined by the Action pulldown menu. The choices
on the Select By pulldown are:
Element Type
Bound To Type
131
3 DESIGNING A SESAME APPLICATION
Element Name
Bound To Name
Property
Size and Position
The choices for Criteria change based what is selected from the Select By list.
Once you specify the selection Criteria, click the Perform Selected Action button to
cause Sesame to examine the elements against the criteria and find the elements that
meet the criteria. Sesame then performs the action selected in the Action menu on
those elements, either creating a new selection group (deselecting the old one),
adding the elements to the current selection group, or removing the elements from
the current selection group.
132
3 DESIGNING A SESAME APPLICATION
Customizing Forms
There are a variety of enhancements you can add to your form designs to make them
easier to use and to simplify data entry. Included in this group are data entry
restrictions that help you control the information added to databases through your
forms. These custom enhancements are all accomplished in Sesame Designer using a
combination of the Property Editor and Property Viewer. None of these changes made
in Designer will be reflected in the actual application until they are reconciled to the
application or saved to a new application and you can always use Designer's
Preview Mode to check your work before reconciling.
You can change an element's label using the Property Editor's Other tab.
Note: You can use the special keystrokes F5 and F6, or the right-click context
menu, to assist you in the Property Editor. In the above example, placing your
cursor in the Label box and pressing F5 will insert the selected element's current
label. Pressing F6 will open an expanded window where you can more easily edit
the text of a lengthy label. F5 and F6 can be used in any Property Editor box that
requires typing.
133
3 DESIGNING A SESAME APPLICATION
You can also use a picture as the label for an LE. This is particularly suitable for
command buttons. See "Image Labels".
2. Open the Other tab on the Property Editor if it isn't already open.
4. Click on the Set Element Name arrow to apply the change. (See Figure 72
below)
134
3 DESIGNING A SESAME APPLICATION
Note: You can use the special keystrokes F5 and F6, or the right-click context
menu, to assist you in the Property Editor. In the above example, placing your
cursor in the Name box and pressing F5 will insert the selected element's current
name. Pressing F6 will open an expanded window where you can more easily edit
the text of a lengthy LE name. F5 and F6 can be used in any Property Editor box
that requires typing.
Invalid LE names
Designer will not allow you to rename a layout element to one that is a Reserved
Word. There are over 200 such words, and they include the names of programming
functions, data types etc. Most of these are obscure but there are some among them
which you might wish to use such as "width", "height", "date" and "time". Additionally
LE names cannot start with a number. They can include spaces, but you would be wise
to avoid spaces if you intend to use the LE name in programming use an underscore
or run the words together, eg Home_Phone or HomePhone, or end them with a
number such as "Width1".
For a list of the reserved words, see the Appendix in the Sesame Programming Guide.
135
3 DESIGNING A SESAME APPLICATION
The elements are numbered in the order in which they appear on the form (top left to
bottom right), not the order in which they were selected.
To set calculated initial values such as @Date, @Time and @Number in a layout
element, use Designer's Program Editor. (Select Program Layout from the Commands
panel to open the Program Editor).
For example, you might have a DateAdded element on your form that is bound to a
date field in the database. For each new record, you want to auto-fill the element with
the current date. In the Program Editor, you'd select DateAdded from the Element
dropdown, select On Form Entry from the Event dropdown, then type in a program
such as this:
Follow these steps to set or change an initial value for a layout element:
136
3 DESIGNING A SESAME APPLICATION
Pressing F5 with the cursor in the Initial Value box will insert any current initial value.
Pressing F6 will open an editing window.
In addition to setting calculated initial values, programming can also auto-fill fields
based on conditions you specify.
Programming can not only read and change the contents of a read-only element, it
can also tell you its current read-only status
and even temporarily change that status.
The SBasic programming function likewise
has three states so you can control whether
the element is grayed out or not. See
@ReadOnly() and ReadOnly() in the
Sesame Programming Guide.
To make the element editable once again, change the setting back to No.
137
3 DESIGNING A SESAME APPLICATION
Only When Printed Element will only appear in printed output but not at any other
time. This could be used to print special messages on the printed output that you do
not want to see all the time.
When Not Printed Element is visible while working in the form but does not print.
Secret This option is only valid for single line text elements. The field will store the
data typed in the element but the element will only display asterisks (*) on the form.
The true data can be used in programming. The true data will be visible when the form
is exported, or when the F6 layout element editor is used, but not when printed.
Secret Input
You can make elements display only asterisks (*) instead of the true data. This
capability is set in the Property Editor Other tab Visible options list (see Figure 75
below). The true data can be used in programming. Records can be retrieved based on
the true data in secret elements but the retrieve
spec will only display asterisks.
Programming can not only read and change the contents of an invisible element, it can
tell also tell you its current visibility status and temporarily change that status. See
@Visibility() and Visibility() in the Sesame Programming Guide.
138
3 DESIGNING A SESAME APPLICATION
Sesame's strict data typing is your first line of defense against offbeat data being
added to your databases. If you try to fill a date field with something like "Next
Sunday," Sesame blanks the field. If you try to type "No Charge" or "N/A" into a
money field, you'll get nowhere.
Q&A
Although Q&A has data typing, it does not strictly enforce it. This is why,
in Q&A, you can find text values such as "TBD" or "March 15" (with no year) in
a Shipped Date field. You may never discover that such orders, which were
actually shipped, are not appearing in your Orders Shipped by Date report and
why Q&A doesn't retrieve these records when you run searches on the Shipped
Date field.
Your second line of defense against non-conforming data consists of data restrictions.
These help you standardize your data entry, keep it "honest," make it conform to your
company's business rules.
139
3 DESIGNING A SESAME APPLICATION
Sesames restrictions are rigorously enforced. If you have specified one or more
mandatory restrictions for an element, it means that you can count on seeing one of
your permitted values in any saved record. In a restricted element, leaving the
element empty is not acceptable unless that is one of the allowed restrictions.
When entering data, you can see (but not change) the restrictions that are listed in
the Restrictions window.
Figure 76. The Restrictions window showing the data entry restrictions for various layout
elements. The Auth By restriction is mandatory, indicated by the large red dot next to it.
Q&A
In Q&A, a list of permitted values for a field can be displayed by pressing
Alt-F7. Sesame does not support this. However, you can program a Sesame
form to display a list of values that matches your restrictions in a way that you
can simply click on a selection to place it in the restricted element. See
Programmed Restrictions below.
While in the Restriction box, you can optionally press F5 to insert the current
restriction(s) for the selected element. You can also press F6 to open an expanded
window for typing.
When you save a record in Sesame, the data in the form is checked against your
restrictions. If it does not meet them, Sesame will display either a warning box or an
error box, both of which provide details on the affected elements and their
restrictions:
140
3 DESIGNING A SESAME APPLICATION
In the case of optional restrictions not met, a warning message will prompt you to
confirm: "Do you want to save this record and continue?"
In the case of mandatory restrictions not met, an error message will inform you
that the data "must be corrected before this record may be saved."
>X Greater than X If X is a numeric value such as 20, then value must
be more than 20. If a text value like D, then value
must start with D with at least one more letter, or
start with a letter higher than D.
<X Less than X If X is a numeric value such as 20, then value must
be less than 20. If a text value like D, then value
must start with A, B, or C.
>=X Greater than or If X is a numeric value such as 20, then the value
equal to X must be 20 or more. If a text value like D, then the
element must contain data that starts with D or any
other letter in the alphabet higher than D.
<=X Less than or If X is a numeric value such as 20, then the value
equal to X must be 20 or less. If a text value like D, then the
value must be D or start with A, B, or C.
>X..<Y From greater If X is 20 and Y is 30, then the value must be more
than X to less than 20 and less than 30. If X is C and Y is F, then
than Y the value can be any word beginning with C, D, or
E, but not the letter C or Y alone.
>X..<=Y From greater If X is 20 and Y is 30, then the value must be more
than X to less than 20 and equal to 30 or less. If X is C and Y is F,
than or equal to then the value can be any word beginning with C,
Y D, or E, or the letter Y alone.
141
3 DESIGNING A SESAME APPLICATION
<X; >=Y Less than X or If X is 20 and Y is 30 then the value must be less
Greater than or than 20 or equal to 30 or more. If X is C and Y is F
equal to Y then the value can be any word starting with A or B
or a word starting with F or a higher letter or the
letter F itself.
?? Any two Any two characters, but the entry must be two
characters characters.
???R Four characters Must be a four character entry where the last
ending with r character is an R.
S.. Begins with S Any length entry that begins with the letter S.
..R Ends with R Any length entry that ends with the letter R.
S..E Begins with S Any length entry that begins with the letter S and
and ends with E ends with the letter E.
For restrictions that cannot be specified using the available restriction options in Table
4 above, you can use programming.
142
3 DESIGNING A SESAME APPLICATION
For example, you might want to require that any follow-up date entered be within 30
days from the current date, or need a restriction placed on element "B" depending on
the contents of element "A". For these kinds of situations where calculations are
required, you can use the NotifyForm() programming command in conjunction with
restriction-oriented programming statements to prevent the record from being saved if
your programmed restrictions for one or more elements aren't met.
In conjunction with restrictions and a read-only element, you can use programming to
display convenient pick-lists populated with acceptable values. For example, if a field
required an entry of S, M, or L (for small, medium, large), you could display a pick-list
containing S, M, and L when the user arrives at the element. The selected item would
be copied into the element. The UserSelect, @UserSelect, @PopUpChoiceList and
@PopupMenu commands are ideal for this.
Sesame will allow you to make text, number, date, and time fields so that they will
only accept unique values. If unique values is set, Sesame will compare any new value
entered in a record, whether in add or update mode, with the values in that field in all
other records in the database. If the new value has been previously entered in another
record, Sesame will display an appropriate warning and a message similar to:
When you acknowledge the warning by clicking on the OK in the message box, the
non-unique value will be deleted and the element will be empty. You cannot override
this warning and enter a non-unique value. Note that it is the field value in the
database that is checked and made unique, not just the specific layout element on a
specific form. Once made unique, any element on any form, in that database, that is
bound to the field will inherit the unique value status.
To set an element on a form to only store unique values, you will use Sdesigner's
Property Editor. Select the element, or elements, you want to set as unique. On the
Other tab, for a selected element, drop down the Read Only menu choices and select
Unique.
143
3 DESIGNING A SESAME APPLICATION
The elements and their bound fields will be set and the Property Viewer will display
"Unique" under the Read Only settings.
If you want to unset the Unique Value setting, set the Read only characteristics of the
element to be Yes or No. An element cannot be set to be Read Only and Unique at the
same time.
Any other characters, other than the above four, entered in a template are to be
displayed as entered but not are not editable, when adding or updating a record.
144
3 DESIGNING A SESAME APPLICATION
Data entered in templated fields will be displayed as templated in both form and table
view. It will also appear in its templated form in reports, printing and exported data
files.
If the Stop Templating symbol (>) is not added at the end of a template, you will
restrict a user to entering only as many characters as you have entered into the
template. If you want to be able to enter other data after the template, end it with the
> as shown in this template:
Phone: (###) ###-#### is for: >
Will create a final data entry that could look like:
Phone: (202) 555-1234 is for: George C
A partially completed field with an entry template will contain the remaining special
template characters. A restriction or SBasic programming can be used to prevent
partial completion.
To create a data entry template for an element, you will use Sdesigner's Property
Editor. Select the element you want to template. On the Other tab, for the selected
element, type in the desired template and click on the Set Entry Template arrow.
145
3 DESIGNING A SESAME APPLICATION
Sesame has three types of help facilities to assist in all areas of the program: context-
sensitive help, custom help, and custom tool-tips.
Custom help allows you to define a special user message for any layout
element on any form. When you press F1, Sesame will first display your
custom help message, if any, for the current element. (See Figure 79.) If you
close the custom message screen and press F1 again, Sesames built-in
context-sensitive help will display.
Figure 79. Custom help for Call Date. Displayed by pressing F1.
Close a custom help screen by clicking the "X" (close window button) in the far right
corner of the help windows title bar, or by pressing F1 a second time to bring up
Sesames context-sensitive help screen.
You can resize the custom help screen by dragging its borders, or by using the title
bar buttons to minimize or maximize it.
146
3 DESIGNING A SESAME APPLICATION
You can also create a custom tooltip for any element you place on a form.
These display your custom messages in small pop-ups whenever the mouse is
positioned over the element. (See Figure 80.) Tooltips are ideal for brief
messages or instructions.
Sesame sizes tooltips to show their entire content. They display automatically as you
hover the mouse over the element to which they are attached, and self-close as you
move the mouse off the element. You have no control over the display of tooltips,
other than mouse movement.
To create a custom help screen in Designer, open the appropriate form, then use the
Other tab in the Property Editor. Follow these steps to create custom help for a layout
element:
1. Select the layout element for which you want to display a custom help message
when F1 is pressed from that element.
2. In the Property Editor, select the Other tab. Type your help text in the Custom
Help field, then click on the Set Custom Help button. (See Figure 81.)
147
3 DESIGNING A SESAME APPLICATION
Figure 81. Adding a custom help screen for the Call Date element using the Custom Help editor.
Note: When editing an existing help message, press F5 to display the message
text. If you need a larger editing window, press F6. These options are also
available by right-clicking in the Custom Help entry field. When you are finished,
select Editor / Save and Close from the editors toolbar menu. (See Figure 82.)
4. When finished, save your layout. You can now either Reconcile, or save your
Designer file as a new application. See Saving your Design in the Sesame Designer
section of this Guide.
148
3 DESIGNING A SESAME APPLICATION
You add tooltips using the Other tab in the Property Editor. With the appropriate form
opened in Designer, follow these steps to add a tooltip:
1. Select the layout element for which you want display a tooltip when the mouse is
hovered over that element.
2. In the Tooltip field on the Other tab of the Property Editor, type the text of the tip
as you want it to appear, then click on the Set Tooltip button.
Note: When you are editing a previously created tooltip press F5 to display the
previous text. If you need a larger editing window, press F6. These options are
also available by right-clicking in the Tooltip entry field. When you are finished,
select Editor / Save and Close from the editors toolbar menu.
4. When you have finished, save your layout. You can now either Reconcile, or save
your Designer file as an application.
149
3 DESIGNING A SESAME APPLICATION
Other menu items found on the Commands menu (See Figure 83) when you are in the
form design window are:
Program Layout
Change Program Execution Order
Change Navigation Order
Program Editor
In Sesame you program a form or a report, not a database. A database can have
many forms and reports, and each has its own Program Spec. So you could have
forms with programming optimized for data entry, and others programmed for
browsing and editing.
For all the details concerning programming a form as well as Sesames programming
language and syntax, see the Sesame Programming Guide.
150
3 DESIGNING A SESAME APPLICATION
151
3 DESIGNING A SESAME APPLICATION
152
3 DESIGNING A SESAME APPLICATION
Directional Navigation
At times you may want to avoid navigating through your forms in the order you set to
move through the elements. Sesame allows you to do this with a feature you establish
in the Sesame.Ini file. The entry in the ini file is "DIRECTIONAL NAVIGATION: [ON |
OFF]". If it is set to on, the Up and Down arrow keys will to move up and down
through your form based on element geography rather than order. The default ini
setting is OFF.
153
3 DESIGNING A SESAME APPLICATION
window which allows you to review and undo almost every action you took since the
last time you saved your Layout. Undo cannot undo the creation of a new element.
You must use the delete function for this.
As actions occur in Designer, they are recorded and grouped in the Change
Log/Advanced Undo window. Every action, from creating fields to changing labels to
changing colors, is recorded and listed as numbered transactions. Actions which
require more than one change, like moving a field (horizontal and vertical components
are changed) are grouped together in the list as a numbered transaction. Designer
allows you to address the changes as individual items (horizontal or vertical change,
for example) or as complete transaction sets.
1. You review the description of the change(s) and highlight the one to undo by
clicking on it with the mouse. In a grouped transaction, you can click on any one
of the group.
2. Next, you select the type of action you want to perform from the Action drop down
list. Your choices are:
Undo From Selected Line to End. This action undoes the selected item and
all line items with a transaction number higher than the selected item (all
items above the selected item in the list).
Consolidate Change Log. Cleans up all items which were previously undone
and regroups / renumbers the remaining items if necessary.
3. The undo action is completed when you click on the Perform Selected Action bar.
Once a change is Undone by clicking on Perform Selected Action, the descriptive lines
in the list will appear with lines drawn through them and the change will be reflected
on the form.
154
3 DESIGNING A SESAME APPLICATION
When an alternate form is opened, the original form is automatically closed and the
alternate form is automatically opened showing the same record. If there are any
uncommitted changes on the original form, you are warned that the form has been
changed and that proceeding will discard these changes. If you opt to proceed, any
changes that have been made to the original form are discarded when the original
form is closed. Because the original form is closed, no SBasic exit programming is run.
If you are automating the switch to an alternate form, it is important that you commit
any changes to the original form and explicitly run any exit programming before the
switch.
Relink Form
Relinking a form or report causes that layout to get its data from a different database
or from different fields in its current database.
The Relink Form dialog box is invoked by selecting Relink Form from SDesigner's
Commands control panel. The Relink Report command is on the Report Commands
control panel. If the form or report has not been saved, an alert will prompt you to
save your work before continuing.
The Relink dialog box lets you change the data source database for an existing form or
report, or change the data sources for individual elements to other fields within the
same database.
You relink to a different database by selecting that database from the Database menu
at the top of the dialog. Doing so will repopulate the list of fields that appears in the
left hand panel. To relink individual elements, drag the element from the right hand
panel to the left hand panel and line it up with the field name you want that element
to be linked to.
If you change your mind about an individual element, drag that element back to the
right hand panel. If you change your mind about all of the elements you have already
linked, click the Clear button or the Cancel button at the bottom of the dialog box.
155
3 DESIGNING A SESAME APPLICATION
If the element names match the field names, you can click the Match Names button,
and the elements with names matching fields on the left will automatically be moved
to the left hand panel.
Figure 89. Relink dialog - before. Figure 90. Relink dialog - after.
Once you have selected the correct fields for those elements you want to relink,
clicking the Relink button will cause those elements to be bound to the field named
directly to the left of that element. Any elements that remain in the right hand panel,
that are not already linked to the same database, will become unbound elements.
Startup Form
A startup form is presented immediately after Sesame finishes loading the application.
It appears in the same position as the splash screen. Because it is loaded without a
mode, it cannot act as a search form or an add data form, but it will run On Element
Entry SBasic event programming for command buttons on the form. This allows the
startup form to act as an application menu.
A startup form can be specified from the command line using the "-start_form" startup
switch followed by the name of the form. If the form name contains spaces, it must be
delimited with double quotes:
156
3 DESIGNING A SESAME APPLICATION
A startup form can be specified in the sesame.ini file using the "START FORM:"
command followed by the name of the form. In the sesame.ini file, the form name
should not be delimited with double quotes. Note, if a start form is specified in the
sesame.ini file, that particular .ini file should be limited in use to applications that
contain that form.
A start form can also be set for a specific application in the Application Property
Manager in SDesigner, by selecting the appropriate form from the Startup Form
dropdown.
157
3 DESIGNING A SESAME APPLICATION
The properties for an application are set from the Designer menu tree.
Figure 92. Designer Menu tree Application Property Manager for setting default Application
properties.
If you have any tabs open in design mode, you must first save and close the design
tabs in order to use this feature. These two
actions are both performed from the
Commands menu. Designer will give you
warning messages if you try to proceed to
the Application Property Manager without
first saving and closing your form.
When you save your layout, you will see a
message in the Message Log control panel,
that the save has been completed. You can
also save the layout design by pressing or
press Alt-S.
Figure 93. Designer Commands menu.
Once you select Application Property Manager from the Application menu tree (Figure
92), you will be presented with a dialog box as shown in Figure 94.
158
3 DESIGNING A SESAME APPLICATION
This dialog box is "modal" (must be the active window) and must be closed before
returning to Designer proper.
There are six settings that can be changed for your application:
The Application Title. (The name that appears at the top of the menu trees,
not the filename.)
The path to your Image files. "." means in the current directory from which
you run Sesame. Sesame does not store images themselves in image fields.
Instead it stores filenames for images. Image Path allows you to use just the
filename, rather than the whole pathname by telling Sesame where to look for
your image files.
The starting @Number value for automatic numbering using programming.
See the Sesame Programming Guide.
The default display format for each data type stored in the application.
The Startup Form
Program Application.
159
3 DESIGNING A SESAME APPLICATION
Setting values
Using the Application Property Manager involves:
The data types for which you can set display formats are as follows:
Text
Number
Money
Date
Time
Boolean (Yes/No)
For each data type, you will be given a set of options you can change and individually
apply with the Apply New Format button. You will also see a sample of your data
display format as it was before the change and as it will be after you apply the
change. Setting a default data display format for the application has essentially the
same settings and process as setting data display formats for individual layout
elements.
A default data display format set here takes precedence over your operating system
settings but does not override your layout, or individual layout element settings.
These changes have been made to the DSR file. To apply them to the live database,
either reconcile, or Save the DSR with its data as a new Sesame Application.
160
3 DESIGNING A SESAME APPLICATION
Managing a Database
Designer provides a tool for high level management of your data fields and layouts at
the database level. At this level, you can manage all of your fields or your layouts
attached to a specific database. From the Designer Application menu select Manage a
Database. Select the database you want to work with, then select Manage Fields or
Manage Layouts.
Managing fields
Field Manager is a module within Designer that allows you to make structural changes
to the design. This includes adding,
deleting and renaming databases and
fields, and changing data types (text,
number, etc.). Field Manager works on a
"Transaction" basis. A set of tasks are
prepared and then run as a batch. The
changes are implemented at that time.
Adding a new field (to which layout elements can later be bound).
Deleting a field.
Changing a field name.
Changing a field type (for example, from Text to Date.
Renaming the database (The name that appears in the menu trees and is used
by programming).
Deleting the entire database from the application.
1. You use the Fields / Bound Elements section on the left to see which forms will be
affected by your changes. You cannot change anything here but you can expand
each field to see what layouts (forms) they are attached to. Remember, a field can
be bound to more than one layout element on more then one form. By clicking on
161
3 DESIGNING A SESAME APPLICATION
the plus(+) to the left of each field, you will be able to see the links for each
field/form/layout element (in this format).
Select the action you wish to perform from the Action dropdown.
Select the field you want to perform the action on from the Field Name
dropdown.
Set the New Name (type it) or change the Field Type (dropdown).
Click Add Transaction to Batch.
3. Repeat Step 2 until you have completed all of your required actions. They will
appear in the Transaction Batch Summary window and may often provide you with
information as to what a particular transactions effect will be.
Your changes will all be incorporated into your design. (See Figure 97.)
These changes have been made to the DSR file. To apply them to the live database,
either reconcile, or Save the DSR with its data as a new Sesame Application.
162
3 DESIGNING A SESAME APPLICATION
Figure 97. Database Field Manager Changing Live_Prospect field from Text to Boolean (Y/N)
data type.
Note: You cannot rename the Application (DB) file within Sesame or Designer. This
you would have to do outside of Sesame, in Windows Explorer for example. Take care
to rename the DB and the DAT file pair (Sesame runtime files) or the DSR and the
DDT file pair (Sesame Designer files) identically.
Managing Layouts
Select Manage Layouts. A new dialog box opens with the list of all layouts and reports
in the database and a set of dropdowns for managing them. The screen is broken into
three parts Layouts, Transaction Builder, and Transaction Batch Summary.
163
3 DESIGNING A SESAME APPLICATION
The process is to build a list of what you want Designer to do and then process that
list. You can do such actions as:
Renaming a layout...
Copying a layout. (Make a similar form or report in your database with the
same programming and layout elements.)..
Deleting a layout..
1. You use the Layouts section on the left to view the current layouts and reports.
You cannot change anything here.
Select the action you wish to perform from the Action dropdown.
Select the layout you want to perform the action on from the Layout Name
dropdown.
Set the New Name, if appropriate (type it).
Click Add Transaction to Batch.
3. Repeat Step 2 until you have completed all of your required actions. (They will
appear in the Transaction Batch Summary window.)
4. Click on Run Batch, and then Close. Designer will apply all changes. The changes
are not necessarily made in the order in which they appear. Some transactions
may be skipped if overridden by a prior change. For example, it does the deletions
first. (If you had said you wanted to rename a field, and also delete that field, it
will delete it first and ignore the rename action.) If you deleted the whole
database, this would be the only valid action.
If you want to manually prevent any transaction from running, uncheck the checkbox
alongside it in the Transaction Batch Summary.
To cancel all the transactions, click on the Close button at the bottom of the Field
Manager window before running the batch.
Your changes will all be incorporated into your design. (See Figure 99.)
These changes have been made to the DSR file. To apply them to the live database,
either reconcile, or Save the DSR with its data as a new Sesame Application.
164
3 DESIGNING A SESAME APPLICATION
Figure 99. Database Layout Manager Copying form Appointments to New Appointments.
Attribute Table
The Attribute Table presents a "spreadsheet" view of the properties of the Layout
Elements on any one Form. The Attribute Table is accessed by opening the Form in
Design Mode and selecting Open Attributes table in the Commands Control Panel.
The Attribute Table appears in a popup window. The columns can be sorted by clicking
on the column header. The visible rows and columns can be printed by selecting Print
form the File Menu. Note that many of the values shown in this table are for internal
use. Values may also appear in a rawer format than they way they are shown in the
Property Viewer.
Application Documenter
The Application Documenter produces an HTML file (web page) summarizing all the
elements of your design and their properties. This feature is used to quickly produce
an overall view of your application design which can be used for internal
documentation or for reference while doing other tasks that relate or refer to elements
of your application, such as writing an X-Command. The Application Documenter is
available in the Sdesigner module of Sesame.
To run the Application Documenter, select Document Application from the Application
branch of the Designer Menu. A dialog box appears asking you where Sesame should
165
3 DESIGNING A SESAME APPLICATION
save the summary. Enter or select a filename and click Accept to create the
application summary and display it in your browser.
The resulting summary is organized into sections. Each section contains information
about a different portion of your application.
Application Values Shows application settings such as Name, Unique Number,
Image Path and Application Filename.
Start Up Programming and Form Shows startup form and indicates whether this
application has any programming in the On Application Open event.
Global Values Lists Global Values and their current values.
Groups Lists Security Groups, the User IDs in the groups and an indication that
they have passwords.
Databases Lists the databases in your application. Each database shows a list of
the fields in that database including its properties, such as name and data type.
Forms summary Lists the Forms in your application. Each Form shows its name
and the database to which it is bound. To jump directly to the detail section for any
Form, click its name.
Reports summary Lists the Reports in your application. Each Report shows its
name and the database to which it is bound. To jump directly to the detail section
for any Report, click its name.
Forms Detail Detailed documentation for each form including elements, element
properties, programmed events, saved specs, and security settings.
Reports Detail Detailed documentation for each report including sections, section
properties, elements, element properties, programmed events, attached specs, and
security settings.
The summary page defaults to a particular look-and-feel, however all these settings
use CSS (cascading style sheets). If you want to change colors and fonts, you can do
so easily by creating a CSS file and placing it in your current working directory.
You can now edit the styles in application_doc.css to suit your color and font
preferences. If the Application Documenter finds a file called application_doc.css in the
current working directory, it will use the styles defined in that file.
166
3 DESIGNING A SESAME APPLICATION
If you want to turn your current Designer files into a new Sesame Application, you will
want to remove all of the records you have used as a test base during Preview of your
design. You must have already saved your layout design and closed the design tab.
Selecting this choice will warn you that you are about to permanently remove all of the
records from all of the databases in the application, and ask if you want to proceed.
The records that will be removed are only those in the DSR or Designer file. No
records in a live Sesame application will be deleted.
Security Manager
See separate section on Securing Your Applications.
Security is disabled only for the current Designer session. The next time you open
your Application, security will behave normally. This setting does not affect
Runtime, even if you Reconcile with security temporarily disabled. There is no
need to re-enable security before closing the Application.
Merge Application
Allows you to merge other Sesame applications into the current application. The
resulting application will contain all of the databases, forms, programming, and reports
from both applications. This is the way you can combine multiple database translations
into a single Sesame application.
When performing the merge, the application to be merged cannot contain databases,
forms or reports of the same name as those in the current application. If they do,
Sesame will present a warning message that the merge cannot be accomplished.
Change the duplicate names in one of the applications and retry the merge.
167
3 DESIGNING A SESAME APPLICATION
Start Designer and open the Designer file you used to create, or last modify,
the application (.DSR the Designer file). When finished re-designing, you
apply the changes back to the application (.DB) by reconciling.
or
From the Sesame menu tree, after opening the application, select Application
Utilities/Redesign Current Application and Sesame will start Designer.
Figure 100. Creating a new DSR file. Note the source filename of the application is stated.
168
3 DESIGNING A SESAME APPLICATION
You can select the same DSR filename, or create a new one in order to maintain
historic versions. If you use the same name, you are asked to confirm that you want
to replace the DSR file, which you can do by clicking on the Yes button.
Designer opens the specified DSR file in design/edit mode. After making changes, save
the layout design and close the layout design tab.
169
3 DESIGNING A SESAME APPLICATION
save it as any new filename. You do not need to type the .DB file extension. Designer
will add it.
Your new application is created and is ready to be used in Sesame. Any subsequent
changes to this application will not affect your Designer file which is maintained on the
system with its DSR extension.
What is Reconciling?
Reconciliation is the process of applying the design of a DSR (Designer) file to a DB
(application) file. When you reconcile a DSR, you specify to which DB you want it to
apply. It does not need to have the same name. Reconcile abandons the data in the
DSR, and applies all design changes made in the DSR to the DB.
Important Note All users must be out of the application and it must be
closed. Designer requires unrestricted access to the target application in order
to perform a reconcile.
If a field's data type is changed in the DSR, it is changed in the DB. (This can
affect current data).
If a field is deleted from a database in the DSR, it is deleted from the DB. (This
can affect current data.)
If a layout element is deleted from a form in the DSR, it is deleted from the
DB. (This can affect current data.)
If a form is deleted from a database in the DSR, it is deleted from the DB.
(This can affect current data.)
170
3 DESIGNING A SESAME APPLICATION
type, will cause data in existing records to be permanently altered. Certain types of
changes, such as deleting a database will cause existing records to be permanently
deleted. Backup copies of applications should always be made before
reconciling.
Note: Reconciling to the wrong application will overwrite that application with
the design and data characteristics of the DSR.
Steps to reconcile
First make a backup of the target application!
1. Save your work and close any design tabs that are open.
2. From the Designer Application menu, select Application / Reconcile Existing
Application
3. A select file dialog opens, listing the .DB files. Select the proper application to
reconcile to and click Accept. All users must be out of the application and it must
be closed. Designer requires unrestricted access to the target application in order
to perform a reconcile.
4. The Reconcile Application Options dialog opens. (See Figure 102.)
5. Answer the four questions concerning the options available. These are discussed
below.
6. Click on Reconcile Now. Designer performs the reconcile and leaves you at the
Designer menu.
Reconcile Options
The options when reconciling are described on the dialog alongside each. Read the
descriptions carefully, but most of the time the defaults will be what you want.
171
3 DESIGNING A SESAME APPLICATION
If you have redesigned this form and removed the element bound to the Location2
data and then reconcile it to your live application with the answer to delete field...
set to Yes, all Location2 data will disappear from the application DB file. It is no longer
needed and cannot be displayed without an associated layout element.
If you answer No, the data is retained and you can rebind it to a new layout element
in a later design.
Answer Yes delete the field only if you are certain that you want to permanently
get rid of the field as well as any data in it. This is not the recommended choice.
Note that if you answer Yes to this question, then there will be a difference between
the structure of the DSR and that of the DB file. The DSR Designer file will still have
the field (and its data), the DB file will not.
Replace @Number?
The default is No don't replace it. Note that in Sesame there is only one @Number
for the entire application. This appears restrictive, but in fact @Number is only
supported for backward compatibility with Q&A. With Sesame you can have as many
@Numbers as you want by using Global Values. (There is an example of this in the
Sesame Programming Guide.)
172
3 DESIGNING A SESAME APPLICATION
Replace Security
If you have used the Server
Administration to change
passwords in the runtime
application with the User
Management tab and wish to
maintain these settings, Figure 102. Reconcile Options dialog.
select the default "No"
setting in the area that asks if Sesame "Should reconcile replace the Security in the
target application". If you are making security changes in the designer file and you
wish these to be reflected in the runtime application select "Yes".
173
Section 4
Tabbed Pages
TABBED PAGES enable you to place many layout elements on a single form and have
access to them by clicking between tabbed sections rather than having to scroll down
a long page. They also make it easier for you to segregate your information.
This section will demonstrate how to add tabbed pages to a form. The steps shown are
in the form of a tutorial.
Tabbed pages consist of a TAB GROUP element which contains one or more TAB
PAGES.
Note:
TABBED PAGES as described here, "USER TABS", should not to be confused with
"Sesame Tabs" which appear at the bottom of the Sesame window indicating forms
open, and/or a Search/Update tab and an Add Data tab open for the same form.
There are no limits to the elements that can be put on a Tab Page. In the examples
below new layout elements are created and added to tab pages. You can also drag
existing elements from you current form onto tab page(s).
Tab pages are defined, for the user, by their label that appears on a tab extension at
the top or bottom of the group. See Figure. Tab labels may also be hidden (do not
appear). In this case the tabs are controlled via programming.
175
4 TABBED PAGES
Once your tab pages are designed, you navigate between the different tabs in your
runtime application by clicking on the tab name with your mouse or by using the
keystroke combination Alt + (plus sign) or Alt (minus sign) to switch tabs to the
right or left, respectively.
Once you have tab pages created in designer, you can place elements on them by
dragging them individually, or in groups, from the basic form onto the tab. You cannot
add a new layout element directly onto a tab page you must create it first then
reposition it on a tab page.
For illustration purposes let's assume you have a basic form design with the elements:
Salutation, First, Last, Address, City, State, Zip, Phone
1. Click on the form where you want the tab group to be.
2. Select Element Type and choose Tabs.
3. Leave the Bind Element To selection as Unbound, which is the setting for tabs.
4. Type a Label to be used for the new layout element in this case, Spouse. The
label is also used as the Name of the tab group element
5. Click on the Add Element to Form button. A new tab group layout element appears
on the form with the tab title Spouse. (See Figure 1 above.)
New layout elements cannot be directly added to a tab page. They must be created
elsewhere on the form and then dragged into position on the tab page. To do this:
Figure 2. Moving a layout element onto a tab page by clicking and dragging with the mouse.
4. Repeat the above steps to create the following two additional elements:
177
4 TABBED PAGES
You now need to add another text box. But this one needs to have its data type
changed as you add it. You cannot do this by using the type-on-form-add-colon
technique.
1. Using the Layout Element Adder select the Element Type Text Box.
2. Select what you want the text box Bound To. Choose New Date Field.
3. Type a Label to be used for the new Layout Element: S_DOB.
4. Click on the Add Element to Form button.
5. Click, hold and drag the element onto the tab page.
You need to add one more element a multi-line notes field:
6. Click on the form again below the Zip element.
7. Type S_Notes followed by the less-than sign (<) and press Enter. This creates a
multi-line field for notes.
8. Click, hold and drag it onto the tab page. (See Figure 3.)
Note: All layout elements, including tab pages, can be sized or moved. This will be
covered later. Layout elements on the tab page or the tab page itself must be
sized so that each elements text box is fully contained within the tab boundaries.
Note: At this point stop and save your work. Click on Save Layout Design in the
Commands portion of the left-hand Control Panel or click on the Save button on
the main toolbar.
178
4 TABBED PAGES
5. Right-click on the tab page (anywhere on the gray area of the page or on the
actual tab title). Do not right-click in one of the elements on the page.
6. From the menu that appears, select Add New Tab Page. A new page, entitled
TabPage0 appears (See Figure 4.)
Figure 4. Making multi-tab pages using the Add New Tab Page menu.
R1F_Name
R1L_Name
R1_Phone
R1_DOB (Use the layout element adder for this date field.)
R1_Notes (Make this one a multi-line element.)
179
4 TABBED PAGES
Repeat the exact steps you just performed above and on the Spouse tab page to place
five elements on this tab page, except that you must name them differently to indicate
they are for Relative #2:
R2F_Name
R2L_Name
R2_Phone
R2_DOB (Use the layout element adder for this date field.)
R2_Notes (Make this a multi-line element.)
Note: Nows a good time to do another interim save. Click on Save Layout Design
in the Commands portion of the left-hand Control Panel.
180
4 TABBED PAGES
7. Save your design. Click on Save Layout Design in the Commands portion of the
left-hand Control Panel or click on the Save button on the main toolbar.
1. While holding down the Shift key, click once in each element on a tab page. This
will select all of them. Alternatively, right-click on the tab and click on "Select All
Elements on this tab". See Figure 4.
2. In the Property Editor Control Panel, click on the Position tab.
3. In the Align Horizontally box, drop down the list and choose Left. All the
elements on the tab page should now be left-aligned side. (See Figure 6.)
Save your design. Click on Save Layout Design in the Commands portion of the left-
hand Control Panels.
181
4 TABBED PAGES
Select <<Move Tab Left. The Relative #2 tab and the Relative #1 tab change
positions. (See Figure 7.)
You can rearrange any of your tabs in this manner. You can move them right or left,
one tab position at a time.
182
4 TABBED PAGES
Figure 9. Sizing the Tab Group. Notice the sizing mouse pointer,
and dimensions shown above the element
183
4 TABBED PAGES
184
Section 5
Creating Subforms
Subforms are a way to view the records from a second database from the form of a
master database, so that you can see records from both databases at the same time.
The main form displays a record on the one side of the relationship, and the subform
displays records on the many side of the relationship.
A good example of this would be an Invoice form where each record is the invoice for
a customer, and the subform displays the individual line-items purchased on that
particular invoice.
You need at least two databases in an application before you can create a subform.
In Sesame, you do not need to create relationships between databases before using
subforms. The relationships are created for you when you add a subform to a main
form. There is no "Relationships" dialog where you view or modify the "links" between
databases in Sesame.
Subforms are dynamic you are not limited to just viewing your data. You can edit
data in a subform. You can delete records in a subform. You can add records in a
subform.
This section describes how to create subforms, and the concepts involved. The steps
outlined assume a reasonable level of knowledge of Sesame Designer. If you are not
familiar with Designer, we recommend you read the Designing a Sesame Application
section in this Guide first. For an introduction to adding a subform to a form, see the
Quick-Start Tutorials booklet in the Sesame documentation package, particularly
Exercise 5. Building an Application with Subforms.
To learn about using subforms, refer to the Working with Subforms section later in this
Guide.
185
5 - CREATING SUBFORMS
Sesame also supports additional advanced options for subforms. These alternative
options are for more experienced users. You can set up and use subforms without
them.
Terminology
First, let's define some important terms:
Form view subform A subform like the parent form, which shows data in
layout elements arranged on a form. You see only one record at a time.
Data Source For a form, the full name of the database whose records it
displays. For a layout element, the name of the field whose data it displays.
186
5 - CREATING SUBFORMS
Creating a subform
To create a subform, you must already have two forms, each based on a different
database in the same application.
In this example, you will see how to create a main form with a subform as in the
Countries.db sample application on the Sesame CD. The starting point will be the
application with one database Countries and a simple Countries form. (See Figure
1.)
The first step is to create a new database for the subform. There is currently only one
database and one form in the application. (See Figure 2.)
187
5 - CREATING SUBFORMS
You want a database of Cities for storing the name and the population of the city. This
has to be created in the Countries.db application. The process of creating a new
database and a new form to go with it is covered in detail in the Designing a Sesame
Application section of this Guide. The steps will be covered briefly, below.
To add the Cities form, select Forms / Add New Database. You are asked for a name
for this new database & form. Type CITIES (capitalization is not important).
This opens a new, blank form. Use the Layout Element Adder to add two layout
elements, one bound to a new text field named City and the other bound to a new
number field named Population. (See Figure 3.)
188
5 - CREATING SUBFORMS
These are the only layout elements needed. Save the form by clicking on Save Layout
Design or the Save button on the menu bar. You now have both a new database and a
new form both named CITIES. Close the design tab.
The next step is to add the Cities form to the Countries form as a subform.
In the Layout Element Adder, select element type Subform. The Bind Element to
must remain Unbound. (See Figure 5.)
For the Label, type Cities in this Country, or the text of your choice. This appears as
text next to the subform. By default it appears above the subform, but you can move
it. Or, you can choose not to have a label at all.
189
5 - CREATING SUBFORMS
Sesame displays the Subform Settings dialog. (See Figure 6.) This dialog consists of
five sections representing steps 1 through 5 which control the way the subform
and the underlying linking mechanisms are established.
In the case where you just want an invoice with line-items on it, you can accept the
default choices. The choices get more complex if you select some of the options
designed to accommodate more sophisticated applications.
Figure 6. The Subform Settings dialog. Cities form selected to be the subform.
In our example, the only form available is Cities. (See Figure 6 above.)
190
5 - CREATING SUBFORMS
You see a drop-down list of all eligible forms in the database. The rule for whether a
Form is eligible to be a subform is that it can't cause recursion. That is, the subform
cannot be the parent form or contain the parent form at any level. That would cause
an endless loop when Sesame tried to retrieve your records or display your forms.
Automatic (Natural Links): This is the default. For simple applications you will
want to use this. There is no matching of key values, no bookkeeping, no
programming. By simply adding a record using the subform, Sesame
automatically makes it a child of the currently displayed parent record. Each
parent record knows exactly which records in the database are its children
without having to look at any other records.
Matching Field Values (Relational Links): With this choice, Sesame goes
through all the records in the database and displays the ones where a
particular field value matches a particular field value in the parent record
which you define in Step 4. This gives slower performance than natural links,
and you are responsible for bookkeeping during data entry that is, for
making sure that the values that are supposed to match, do match.
You will see an example of using relational links later. For now, choose the default
option Automatic (Natural Links). The cities added in the subform will automatically
become attached to the parent country.
Make Natural Child Records: This is likely to be the option of choice for most
users. Records in the subform are automatically linked to the corresponding
record in the main form. The correct child records will appear in the subform
based on the settings you use.
If Relational Links is selected, this first option changes to Show Related Child
Records. In this case, the same logic applies.
The child records can also be accessed by opening the subform form by itself.
In this case all the records Cities, for example are shown mixed together.
Show Existing Natural Child Records: If the parent database already has
subrecord database(s) with appropriate linking, they will be listed in a
dropdown selection list. If one of these is selected, the same records from the
database will be shown as in the subform that initially created the existing
191
5 - CREATING SUBFORMS
Create a new Database with Shared Template: This choice is different from the
others. If selected, it clones the selected form and database, but without any
data. This can be useful when you need to add a form as a subform, which
does not already exist.
The records added using this subform will not mix with records added using
other subforms, even though the subforms look identical.
The shared template part means that all databases/forms that share a
template will be kept in synch. So, if you add a layout element to one form, all
forms will have that element.
192
5 - CREATING SUBFORMS
When you click OK, the subform is added to the form. It may not be in the correct
position. For example, if you did not first click on the form where you wanted it to
appear, it will appear at the top left of the form. If the subform will not completely fit
on the form, it may appear underneath the form. In both cases resize the form if
necessary and drag the subform where you want it. (See Figure 8.) Save the layout
design.
193
5 - CREATING SUBFORMS
In the menu tree the Cities database is now indented under the Countries database
rather than being directly underneath it. (See Figure 9.)
To complete this redesign, reconcile or save the Designer file as a new application.
Then open it in Sesame.
194
5 - CREATING SUBFORMS
Any records now added to the subform are automatically parented to the correct
record the main form record. You can also import records into the database by
using a hierarchical import as covered in the Advanced Concepts appendix of this
Guide.
Relational linking, while not being the preferred method to use for permanent
relationships, can be employed if you want to look at certain data in alternative ways,
perhaps even temporarily.
195
5 - CREATING SUBFORMS
For example, if you were to build an application to keep track of your music collection,
you might use natural linking to build a subform showing the songs on each album.
That subform might have elements for the songs title, the authors of the song, and
the length of the song in minutes and seconds. In almost every case, that song would
be unique to that album. The record for the album would point directly at the records
for the songs on that album.
While it may make sense to use natural linking to attach a song to a particular album,
you may want to look at your songs by genre instead. Since you may change your
mind about how to categorize a song, you probably want to use the more flexible
relational linking. Relational linking is slower that natural linking, because it has to
match key values. However, you can easily change the parent record to which any
particular child record belongs simply by changing the key value in the child.
For example, if you create a parent form and record definition called Genres (with a
field named GenreName), you can then add a field to Songs called Genre. When you
create your subform, tell Sesame that the relational link exists between
Genres!GenreName and Songs!Genre. When you view the Genres records, the songs
tagged "Jazz" will show up under the Jazz record, the songs tagged Classical will show
up under the Classical record, and so on.
Also, because the same record appears as a child under each parent, if you correct the
spelling of the song title in the record, it will automatically appear correctly under each
parent record.
196
5 - CREATING SUBFORMS
Figure 11. Relational linking allows the same record to appear under more than one parent
record.
There is a more detailed discussion of natural vs. relational linking in the Advanced
Concepts appendix of this Guide.
In the relational linking example details below, you will see how the same main form
and subform can be set up using an imported database of cities. For this to work,
there must be matching fields in each database. That is, a field in the Cities database
whose values are compared against a field in the Countries database. The field names
don't matter it is the values in the fields in each record that are compared, not the
field names nor the layout element names.
The starting point is the same: an application with just one database: Countries. It has
fields named Country, Capital, Population, and so forth.
In the following example, the subform data will be provided by importing a database
named Cities.
197
5 - CREATING SUBFORMS
For this example, the Cities database has these three fields:
City
Population
Country
"Adelaide",1115900,"Australia",
"Brisbane",1535300,"Australia",
"Cairns",0,"Australia",
"Canberra",0,"Australia",
Create a new database and a new form with these three fields. Name the form Cities.
See the Designing a Sesame Application section of this Guide or the Quick-Start
Tutorials booklet if you do not know how to create a database.
Import the data into this database. (See the Import Data section of this Guide for
more information.)
At Step 2, the Matching Field Values setting is used. (See Figure 12 below.)
At Step 4, the subform is named assign a suitable name and the two matching
fields are defined.
198
5 - CREATING SUBFORMS
Figure 12. The Subform Settings for Cities using Relational Linking.
The Fields lists show the data types as well as the field names. This is because you
should select fields with the same data types. You can select mismatched field types,
but the results may be unpredictable, depending on the combination.
In this case, it is the field named Country in both databases. But this need not be the
case. The field names can be different it's the data that matters.
When the subform is added, and the layout saved and reconciled, the form in Sesame
looks like it does in Figure 13.
The results appear to be identical. The Cities database is indented under Countries in
the menu tree. The subform looks the same. However, the data is being matched in
the Country field. So, if you display the record for Brussels and change the value in
the country field from "Belgium" to "Australia", then Brussels will appear on the list of
Australian cities as shown in Figure 13.
199
5 - CREATING SUBFORMS
Figure 13. Countries form with relational Cities subform. Note the record for Brussels.
Note: Although it is necessary for the Country field to be in the Cities database for
this relational linking, it is not needed on the subform in this case. The best solution is
to create another form just for the purposes of the subform, with only those layout
elements on it that you will want to show as columns in the subform. You will still have
the opportunity to pick the Country field as a matching field. It has to exist in the
database but it does not need to be on the form.
To learn about using subforms, see Working with Subforms later in this Guide.
200
Section 6
Adding and Editing Data
Once you have created an application, it is time to start adding data to it. You can do
this by typing in the data, by importing it, or by copying records into it from another
database. The alternative methods are covered in the Import, Export, and Copying
Records section of this User Guide. Below, you will learn how to add new data to your
application using Add Data mode, and work with that data in Search/Update mode.
Introduction
First, here's a reminder about the hierarchy of a Sesame application:
When you work in Add Data mode, you are storing the data you enter in fields in a
database. However, Sesame is form-based, so you do not have to deal with the
underlying database directly. Instead, you enter and view data through layout
elements on forms. In most cases, layout elements are bound (linked) to fields in the
database, so in the context of data entry, the two terms (fields and layout elements)
are generally interchangeable and will be treated as such in the discussions that
follow.
Data types
Sesame uses strong data typing. This means, for example, that only valid dates can
be entered into a date field. You can type anything into a layout element on a form
and, depending on the type of database field it is bound to, Sesame will attempt to
convert it to the proper data type when you move out of that element. If it cannot be
201
6 - ADDING AND EDITING DATA
converted (for example, entering "Next Sunday" in a date field), Sesame will blank the
field or place a zero (0) in it, depending on the field or element type.
Q&A
Q&A employs weak data typing. You can type more or less anything into a
date field or a Yes/No field. You get a red warning message but this is only
a warning. Q&A allows you to proceed and leave something like "TBD" in a
date field or "Yes indeedy" in a Yes/No field. This has negative consequences.
An invoice with a date a user insisted on leaving as "February 30, 2003" would
not appear in a result set for a defined date range. This is the reason Sesame
insists on strong data typing.
Following are the types of layout elements you can add to a Sesame form:
Text Anything that can be typed from the keyboard. Numbers 0-9, alphabetical
characters A-Z, and symbols (!,@,#,$,%,&,_,-,+,*, etc.) are all acceptable in a text
element.
Number Only numeric characters, 0-9, a decimal point, parentheses for negative
numbers, and the + and - symbols can be typed in number elements. You can type
commas or a decimal point (depending on settings) to separate thousands, but it is
not necessary. Any other character, including the currency symbol, will make the entry
invalid and it will be zeroed.
Money As numbers, but you can also type the currency symbol. If you omit the
currency symbol, Sesame will add it. Only one currency symbol is permitted for each
individual element, but you can have multiple elements on a form and a different
currency symbol for each one. Any other character, including the wrong currency
symbol, will make the entry invalid and it will be zeroed. Sesame will format the typed
values as money based on your system or custom settings.
Date Only valid dates will be accepted in these fields. Dates can be entered
specifying the month as a number or as text June or Jun, for example. Dates can
be entered using any of these separators: / . - , (Forward slash, period, hyphen or
comma), or a space. Invalid entries are blanked.
The way dates are displayed in a layout element can be affected by your operating
system's regional settings, the defaults for the layout, and the formatting applied to
the layout element.
Each date element on your form can have different formatting should the designer of
the form wish it, or rely on defaults which may be set outside of Sesame.
You must take care that ambiguous dates are interpreted correctly when you enter
them into date elements. Ambiguous dates are those that are entered numerically,
202
6 - ADDING AND EDITING DATA
For the current year, you need only enter the day and the month. You can omit the
century if the date you are entering is between certain years. This is determined by
your operating system. Settings for determining at least the upper threshold can be
adjusted in Windows Control Panel / Regional Options / Date. The default for Windows
2000/XP is for two-digit years to be interpreted as a year between 1930 and 2029.
Sesame internally stores the dates in the yyyy/mm/dd format. You can see this if you
press F6 to open the expanded field editor when working in Table view. (See Table
View later in this section).
Time Data can be entered in the form of Hours(H), Minutes(M), Seconds(S), and
AM or PM. Times can be entered using any of these separators: / . - , : (Forward
slash, period, hyphen, comma or colon), or a space.
You can also enter 12N or 12M for noon or midnight. Sesame stores time of day in an
HH:MM:SS format.
Boolean These fields store Yes/No values as a numeric 1 or 0. Such values can be
entered as Yes/No, Y/N, 1/0, T/F, True/False, On/Off.
Keyword These fields store more than a single entry. Each entry is a separate
value; entries are separated by semicolons. Each entry can be used in retrieve specs
as if it were the only value in the field.
Keyword fields can also be used to find records with more than one value in these
fields. Keyword fields essentially give you the ability to store lists of entries in a single
data field. A good example of this is a list of hobbies. A person could have movies, art,
and reading as hobbies while another might have skiing, movies and football.
Searching this field for movies would return records for both persons. (See the section
in on Searching and Sorting elsewhere in this Guide.)
Back up regularly
It is important to back up your work regularly. You have a substantial investment in
your data, and it is wise to back it up routinely to safeguard it. You can backup by
selecting Backup Application from Sesame's Application Utilities menu, or by making
use of the Backup Application settings in the SESAME.INI file to back up automatically.
You can also backup using other methods outside Sesame. Consult your system
administrator.
203
6 - ADDING AND EDITING DATA
Using forms
Data can be entered by typing text or numbers into fields on the form. It can also be
entered using any of the special layout elements that Sesame provides, such as combo
boxes, list boxes, check boxes and radio buttons.
Sesame is a customizable and programmable database manager. For this reason, you
might see different behavior as you use the form. You might move between fields in
an unexpected order. Information might be automatically entered into fields for you,
or changed, as you enter data into other fields. This is likely to be because the form
has been programmed or otherwise customized by the person who designed it.
A Sesame application can also have security. You may see fields on a form that your
colleague does not see or vice versa. You might not use the same forms or reports
as another user. This can be because of the security that has been applied to the
application.
* Note: If you open a database that is read-only, Sesame tells you that it will not
be able to save your edits. This warning is displayed only once, when the
application is first opened. For example, this would apply to files on a CD, or
perhaps copied from a CD and left read-only. Any changes made to data will not
be written back to the application.
Note: A record represents the data in the fields on a single form. When you fill out
a form and save it, you are adding a new record to the database.
204
6 - ADDING AND EDITING DATA
When you open a form in Add Data mode, a new form is displayed ready for you to
enter data into it. The legend, Entering Add data mode, is shown on the status line at
the bottom of the screen, and the Mode indicator on the toolbar is colored maroon and
says Add Data. Usually, the fields on the form will be blank, but you may see zero
values in number fields, and initial values may appear in fields, such as today's date, if
the form has been programmed to display these.
When you retrieve your records in search mode, a filled in form with the values from
your first record is displayed ready for you to edit the data. The legend Entering
Update mode with n records is shown on the status line at the bottom of the screen,
and the Mode indicator on the toolbar is green and says Update.
205
6 - ADDING AND EDITING DATA
Text elements
The final look of the data you enter will depend on the design characteristics of your
form and the layout element itself. Several design features can affect the look of your
data. These include:
Font
Size
Style (Bold, Italic, etc.)
Justification (left or right)
Case (UPPER, lower)
Color
You simply navigate to the element you wish to fill, and start typing. (See Figure 2.)
Moving out of the element completes your data entry. In a single line text field,
moving out of the field requires pressing Enter, Tab, Shift-Tab, the Arrow keys, or
clicking in another element.
Figure 2. Typing in a text box. Note the double border around the active element.
If you reach the end of the field and still have more to type, you have two options:
Keep typing Sesame will scroll your typing and allow you to enter as much
text as you need.
206
6 - ADDING AND EDITING DATA
Autocomplete
If you have set the Autocomplete feature to ON (default mode), as you type values in
a text box element, Sesame will search all other values in that field in all other records
currently in the database and present you with a suggested value that matched a
previous record. To select that value just press Enter or otherwise move from the
element. To ignore the suggestion, just continue typing until your entry no longer
matches a former record value. In databases with very many records, Autocomplete
may slow down data entry as Sesame searches for previous values. You can turn off
this feature using the toolbar view menu or changing the settings in the Sesame.ini
file.
Figure 3. A multi-line text field illustrating word wrap and carriage returns.
LE Auto-selection
The Insert key switches Sesame between auto-selection mode and off again. When
auto-selection is ON, then the complete contents of a layout element are selected
(highlighted) on navigating into it. A replacement value can be entered then just by
typing it. 'Typing-replaces-selection' always applies.
207
6 - ADDING AND EDITING DATA
When you are finished, Press F6 to Save and Close, or open the Editor menu and
select Save to Element or Save and Close. Save to Element saves your input, leaves
the editor open, and allows you to work in your records with the editor open. The
editor will reflect the contents of any field you move to, in any record. As you type
changes in the editor, they are reflected in the form element. If you navigate without
saving to the current element, your changes to the current element will still be saved.
Save and Close saves your input to that layout element and closes the editor.
Note: If you need to type a lot of text into a text element such as in a
comments field you should really be using a multi-line text element.
(See above.) By opening the field editor for a single-line text box and
pressing enter to start a new line, you place carriage returns into the
element. These are displayed as ^J when you close the field editor. They
are displayed as new lines if you open the field editor again.
208
6 - ADDING AND EDITING DATA
209
6 - ADDING AND EDITING DATA
Sesame check boxes are tri-state, meaning that they have a third setting Unknown.
It is the equivalent of the underlying Yes/No field being null or blank. The distinction is
very important.
Take the case of a field that indicates Blood Test OK? Yes and No are obvious, but a
blank field would indicate Results not in yet or Test not yet taken very different to
Blood Test Failed. Null is also used in searching to indicate "doesnt matter; retrieve all
values" like leaving a text box empty.
Figure 10. Check boxes. Entries shown are No, Yes, and null.
210
6 - ADDING AND EDITING DATA
To make an entry in a check box using the keyboard, press the spacebar. The check
box toggles between the three states. (See Figure 10.)
To make an entry in a check box using the mouse, click the check box. It toggles
between the three states each time you click on it.
You can click on the buttons with the mouse, or you can tab into the radio button
group and then use arrow keys to highlight an option and press the spacebar to select
it. You can click the selected button to turn it off, leaving a null or empty value.
211
6 - ADDING AND EDITING DATA
Figure 12. Using the image editor to select and insert a picture
As you click on the image files shown in the list, they are previewed in the editor's
screen. Clicking on Accept adds the filename to the image field in the database.
However, you see the actual image when you view the record. This process is the
same whether you are adding a new image or changing an existing one.
212
6 - ADDING AND EDITING DATA
The first press takes you to the start of the field (or start of the current line in
a multi-line field).
The second press takes you to the first field on the form.
The first press takes you to the end of the field (or end of the current line in a
multi-line field).
The second press takes you to the last field on the form.
The third press takes you to the end of the last field. Continuing to press End
will scroll to the bottom of the form.
Page Up and Page Down allow you to see other parts of the form without moving
the cursor.
Key(s) Action
F5 Dittos (copies) into the current field the value of the same field
from the record last entered.
213
6 - ADDING AND EDITING DATA
Key(s) Action
Shift-F7 Undo current record. Restores the record to the state it was in
when you opened it.
Ctrl-F7 Undo current field. Restores the field to the state it was in
when you opened the record.
214
6 - ADDING AND EDITING DATA
Key(s) Action
Ctrl-U Clears contents of field. You don't need to select text first.
The left button operates menus, establishes cursor position, selects text by
holding down and dragging.
The right button displays a shortcut menu with useful commands. (See
below.)
The center button inserts text that was last selected (highlighted). Does not
use the Windows clipboard. If you drag across text using the center button,
the selected text is replaced by the text that was last selected.
Having displayed the shortcut menu with the right mouse button, you can click on the
items with either the left or the right mouse button.
Saving a record
Sesame saves changes to a record whenever you move to a different record. This can
be with any of the advance/go back keystrokes F10, F9, Ctrl-F10, Ctrl-F9, and Shift-
F10. You can also move to another record, saving the current one, by using the record
navigation toolbar (see Record-to-record navigation, below).
Note: The Save button on Sesame's toolbar does not save changes to
your current record. It forces Sesame to write the in-memory copy of
your application to disk. This process occurs naturally as you navigate
records and perform other tasks, so there is normally no reason to use
the Save button.
Record-to-record navigation
You can move from record to record in the following ways:
Pressing the F10 and F9 keys (in combination with the Shift and Ctrl keys if
necessary. See Table 1 above). Any changes to a record will be saved.
Using the Record Navigation Toolbar (See Figure 13.) Allows one-click
navigation between records. The buttons, from left to right as shown in Figure
13, perform the following actions:
Note: The result set contains the records that have been added during the
current Add Data session, or retrieved in Search/Update mode. Result sets
are covered in detail in the section on Searching and Sorting in this Guide.
216
6 - ADDING AND EDITING DATA
You can type a record number into the current record number box to move directly to
that record number.
Once you have clicked on one of the record navigation buttons, you can repeatedly
press Enter or spacebar to continue activating that button.
Bookmark a Record
Sesame allows you to 'bookmark' a record by pressing the Shift-Home key
combination while the record is on the screen. If you navigate to another record,
pressing the Alt-Home key combination will Toggle between the bookmarked record
and the record from which you pressed the Alt-Home keys. To reset the bookmarked
record, display a new record and press the Shift-Home key again. There will be no
visual indication that a bookmark has been set.
Deleting a record
To delete the current record, either press F3 or select Delete Record from the Record
Commands menu. A confirmation dialog will be displayed. Click on Yes to permanently
delete the record from the database. There is no undo when you delete a record.
You can also delete all records in the result set by selecting Mass Delete from the
Results Commands menu. A dialog displays asking you to confirm that you want to
delete nnn records. (See Figure 14.) Click on Yes to permanently delete all these
records from the database. There is no undo when you delete records.
217
6 - ADDING AND EDITING DATA
Duplicate Records
In Sesame 1.x there was a remove duplicates facility. This is unchanged in Sesame
2.0. It consists of two commands found on the Results Commands menu:
These commands are run on the result set. Remove Duplicates just removes duplicate
records from the result set, but leaves the record(s) in the database. Delete Duplicates
permanently deletes duplicate records from the database. There is no undo.
Sesame 2.0 adds two further means to deal with duplicate records. These two new
methods are more flexible in that you can find partial duplicate records by specifying
just some fields to compare. You can remove or delete records from a result set, or
you can search for duplicate records.
Figure 15. Duplicates Spec. City, Last and First will be used to determine duplicates.
218
6 - ADDING AND EDITING DATA
3. Click in the row selector for each layout element you want to be checked for
duplicates. For example, if you want identical values in the CITY field to be
considered duplicates, mark the CITY element. A "D" appears in the row selector
for marked elements, and they appear at the head of the list of layout elements.
See Figure 15 above.
4. Run the Duplicates spec using either the menu tree, or the spec window action
bar.
Click on the spec window action bar and from the shortcut menu select Run.
A dialog is shown:
NOTES
If the duplicates spec is blank no elements checked it acts as if ALL elements were
checked, i.e. all fields must match for a duplicate record to be flagged. This maintains
consistency with Sesame 1.x.
Blank values are considered when comparing values. So if there are two or more blank
values in a particular field, they will be considered to be duplicates of that field if
included in the duplicates spec. For this reason you may want to omit blank values in
the retrieve spec when removing or searching for duplicates. See examples.
If you select the delete option then records are permanently deleted from the
database. There is no undo.
220
6 - ADDING AND EDITING DATA
If two or more records are considered duplicates one of them is retained and all the
others are removed or deleted. You have no control over which record is retained and
which removed or deleted. If you want to view all the duplicate records, including the
'first', then it is better to use the Search for Duplicate Records facility described below.
It makes no difference in which order you select fields to be considered for matching.
However, after running the duplicate spec the result set is sorted in the order of
elements in the duplicate spec, i.e. it acts like a sort spec.
The result set can be obtained using any retrieve parameters or search methods you
like. Retrieve parameters have no influence on the remove duplicates procedure itself,
only in selecting the records which will be involved in the de-duplication.
The form you are using to delete duplicate records may not show all of the fields in the
database. The whole record though is deleted.
Searching for duplicate records is available only at the Retrieve Spec. There are two
ways to run duplicate searches: from the menu tree or via the spec window action bar.
Figure 20. Duplicates Spec. City, Last and First will be used to find duplicates.
2. Click in the row selector for each layout element you want to be checked for
duplicates. For example, if you want identical values in the CITY field to be
221
6 - ADDING AND EDITING DATA
considered duplicates, mark the CITY element. A "D" appears in the row selector
for marked elements, and they appear at the head of the list of layout elements.
See Figure 20 above.
3. Run the Duplicates search using either the menu tree, or the spec window action
bar.
Using the Menu Tree
To show just duplicate ('extra') records :
Select: Search Commands | Duplicates Search
or
To show all duplicate records, including the first record found :
Select: Search Commands | All Duplicates Search
A dialog is shown:
222
6 - ADDING AND EDITING DATA
Whichever method you use, the duplicate records are retrieved, or if there are no
duplicates then the message No Records Returned by Query is shown.
NOTES
If the duplicates spec is blank no elements checked it acts as if ALL elements were
checked, i.e. all fields must match for a duplicate record to be flagged. This maintains
consistency with Sesame 1.x.
Blank values are considered when comparing values. So if there are two or more blank
values in a particular field, they will be considered to be duplicates of that field if
included in the duplicates spec. For this reason you may want to omit blank values in
the retrieve spec when removing or searching for duplicates. See examples.
If the "Search Duplicates" / "All But One" option is selected and two or more records
are considered duplicates, one of them is not shown and the others are retrieved. You
have no control over which record is considered the first and is not shown.
It makes no difference in which order you select fields to considered for matching.
However, after running the duplicate search the result set is sorted in the order of
elements in the duplicate spec, i.e. it acts like a sort spec.
By searching for duplicate records and including ALL the duplicates you can see,
together, all the duplicate records not just the 'extras'. You can mass update them
marking them for easy retrieval later; you can browse through them and, significantly,
you can cut and paste useful information between the records before deleting the
unwanted ones.
223
6 - ADDING AND EDITING DATA
Sesame offers a variety of ways to enter data into fields without typing it. They can be
summarized as "programmed" or "non-programmed".
Programmed elements are combo boxes, radio button groups, list boxes and menu
buttons, and can also include programming attached to normal text boxes which
display a picklist of values from this database or from another external database. All of
these use layout elements that offer a list of values that a developer has entered in
Sesame Designer. To read about using combo boxes and the like see Using Special
Layout Elements on page 208.
Autocomplete
Using the Windows Clipboard
Ditto a single field or a whole record
The Memory Menu
Copy a whole record elsewhere
Copy multiple records elsewhere
Autocomplete
When Autocomplete is turned on, as it is by default, when you type into a text layout
element Sesame will show you matching values for that field, based on the values
already in the database.
For example, if you type "B" into the Surname field in the Customers.db sample
application you might be shown the name "Bernard". Then typing an a so you have
typed "ba" might produce the name "Baker", and so on. See the table below.
ba
Bar
Bart
In each case the letters that Sesame has added are highlighted and will be deleted if
you continue to type. If the value becomes the one you want, just press enter or tab.
If the value selected is not correct just keep typing.
224
6 - ADDING AND EDITING DATA
Autocomplete works in all modes: in Add mode, in Search/Update, and even at the
retrieve spec, so it can be used to easily search for data.
Autocomplete can be switched off and on by toggling the Autocomplete options found
on the View menu on the Sesame Main Menu. Autocomplete can also be turned off or
on by default by settings in the SESAME.INI file. Autocomplete can also be adjusted
programmatically: it can be disabled for an element and the list of Autocomplete
values can be set for an individual element.
Autocomplete works by looking through the existing entries for that field in the current
database. It has to look through all of them. This can make Autocomplete slow on
large databases. What constitutes "large databases" and "slow" depends upon a
number of factors including your hardware. But the performance on a modern
computer is fine on the sample ZipCode database which has 43,000 records.
After data is selected or the target chosen, the cut, copy, and paste operations can be
performed in three ways:
From the Sesame menu bar Edit menu which has all three choices.
Ctrl-X Cut
Ctrl-C Copy
Ctrl-V Paste
By clicking with the right mouse button to bring up the editing shortcut menu
which has these and other choices.
Q&A
In Q&A 5.0, the F11 and F12 keys copy and paste to/from Q&A's internal
clipboard. Q&A does not use the Windows clipboard.
225
6 - ADDING AND EDITING DATA
Ditto Field/Record
This facility is useful for immediate, local copying.
Edit Commands|Ditto Current Field, or keystroke F5 dittos (copies) the data from
the same field in the previous record to the current field in the current record,
replacing its contents. The previous record is the record that was displayed just before
the current one. There is no undo. This facility works in Add mode, Search/Update
mode, and in Table View.
Q&A
In Q&A, ditto works only in Add Data mode. In Sesame, it works in
Search/Update mode as well. However, unlike in Q&A, in Sesame you cannot
switch from Search/Update to Add Data and ditto the last record. Instead use
the F11 copy record command described in this section.
Memory Menu
Pressing Alt-Enter in a text element presents a memory menu showing the last ten
values entered into that element while this form has been open. The menu is attached
directly below the element. Selecting one of the values on the menu will put that value
in the text element. If all the values are wrong, press Escape or click in the layout
element to dismiss the list.
Pressing Alt-Up or Alt-Down will cycle through the values in the memory menu without
displaying the menu.
The memory menu works in Add mode and in Search/Update mode. It does not work
at the retrieve spec.
The memory menu is cleared when you exit from Add mode or from Search/Update
mode, e.g. to run a new search.
226
6 - ADDING AND EDITING DATA
The Sesame buffer is independent of the Windows Clipboard, and is also not connected
with the F5/Shift-F5 ditto feature.
The Sesame buffer is retained as long as Sesame is open, and works across multiple
databases and multiple applications.
There are 4 commands for copying and pasting a single record or multiple records.
Each can be used from commands on the menu tree or via keystrokes.
Figure 24. The four menu tree commands for Copy/Paste records
COPY PASTE
One record F11 Shift-F11
Multiple records Ctrl-F11 Alt-F11
Figure 25. The four keystrokes for Copy/Paste records
From any record, you can press F11 to copy all the values on your Form. You can then
go to a new record, or a different record, and press Shift-F11 to paste all the copied
values into the matching elements. These commands work in Add mode and
Search/Update mode.
227
6 - ADDING AND EDITING DATA
One use for this feature is copying the values from an existing record into a new
record. Find the existing record you want and press F11. Go to a new record either by
opening your Form in Add Mode, or by adding a new record to the end of your result
set (extend mode). On your new record, press Shift-F11. Since the copied values are
retained, you can paste multiple times, for example, if you are adding more than one
new record.
As well as pasting into a new blank record, you can also paste a record into an existing
record. You will see a warning message asking to confirm that you wish to overwrite
the existing record.
As well as being able to copy and paste a single record using the Copy form / paste
form, you can copy and paste multiple records using the (plural) Copy Forms to Buffer
/ Copy Buffer to Forms commands. The combination of Copy Forms to Buffer and Copy
Buffer to Forms provides a quick and easy way to move data from many records in
one form to different elements in an entirely different form. Using the copy spec, you
can pick and choose which elements get which pieces of data. Because the buffer is
retained even if the application is closed, this command makes it especially easy to
move data from one application to another.
228
6 - ADDING AND EDITING DATA
Advanced Use
In its simplest form, this feature allows you to quickly copy a record where the source
form and the destination form are identical. However, sometimes you need to copy
and paste between forms that are different. You may also only want to copy some of
your values, or you may want to paste your values in a different order. If this is the
case, you can control both the copy and paste behavior of the F11 family of commands
by using the Copy Spec.
Since you can have a Copy Spec set for both the source form and the destination
form, advanced record copy has four possible combinations. The behavior for each
combination is detailed below. All examples use forms with the following list of
elements and values:
Source: No Spec
Destination: No Spec
F11 copies the values from the source form in the order the appear on the Form. Shift-
F11 pastes the values into the destination form elements in the order the elements
229
6 - ADDING AND EDITING DATA
appear on the destination form. If there are more source values than destination
elements, the remaining destination element values are not changed.
Note that only the Name element was changed, since it is the only one that matched.
Source: No Spec
Destination: Copy Spec set
F11 copies the values from the source form in the order the appear on the Form. Shift-
F11 pastes the values into only the destination form elements specified in the
destination Copy Spec, in the order they appear in the Spec. Destination element
values not specified in the destination Copy Spec are not changed.
230
6 - ADDING AND EDITING DATA
Note that only those destination elements appearing in the destination Copy Spec
were changed.
Undo
Sesame has two UNDO facilities. The first can be considered 'immediate undo' and
only works while you are still in the layout element you have just edited. The second
works after you have left that element but before you have saved the record. Once
231
6 - ADDING AND EDITING DATA
you have saved a record (for example by advancing to another record) there is no
undo.
'Immediate' Undo
You can activate this in any of three ways:
Selecting Undo from the Editing Shortcut menu shown by clicking on the
element with the right mouse button.
Pressing Ctrl-Z.
Any of these will delete any new data typed in a field and restore the original value.
Selecting Undo again will act as a toggle and reinstate the new data in the field. Undo
works only while you are in the field just edited.
Making Corrections
Changes can be made to any field data by selecting the field and typing in new data.
Select all of the text in a field with the mouse or Shift and Arrow keys, press
the Delete key, then type in your new data.
Place your cursor in the text where you want the delete to begin, then press
the Delete key to delete text to the right of the cursor or the Backspace key to
delete text to the left of the cursor.
232
6 - ADDING AND EDITING DATA
Select all of the text in a field with the mouse or Shift and Arrow keys, then
start typing your new text. It will replace the selected text.
Right-click in the field to display the editing shortcut menu. You can then
select Clear to clear the contents of the field without selecting it.
Click in the field and press Ctrl-U. This clears the contents of the field without
having to select it.
Printing Records
Sesame allows you to print individual records, or your complete result set of records.
To print the record you are currently viewing, select your print option from the Record
Commands / Printing Commands menu. To print all the records in the current result
set, select your print option from the Results Commands / Printing Commands menu.
For more information on printing forms, see the Printing Forms section in this Guide.
Sesame offers two views of your data for each form: Form View and Table View. When
you open the form you always see Form View. Table view is a spreadsheet-like view of
your data in rows and columns. Each row (horizontal) is a record, and each column
(vertical) a field. Data is editable in table view: you can modify existing data and also
add new records.
The view of the form can now be controlled programmatically, using the
"FormViewType" sbasic command. See the Programming Guide for details.
Keyboard: Shift-F6
Menu Tree: Other Commands / Toggle Table View (Shift-F6)
The view instantly changes. The form is replaced by the Table view which is embedded
within the Sesame window (unlike Sesame 1.0 where table view was in a separate
window).
In table view you see your data formatted exactly as it is in form view. So you see the
same fonts, font sizes, foreground and background colors, formatting and alignment
as you see in form view. These are set in Sesame Designer.
The column headings are Layout Element names (not field names as in Sesame 1).
233
6 - ADDING AND EDITING DATA
When you switch to table view the current record is the first record in the form view
result set. When you switch back to form view you see the record you were on in table
view.
Changing Columns
You change which LEs (fields) are shown,
and the order of columns, in the Table
View spec. This is shown in the Spec
window in the lower-left quadrant of the
screen. Use the left / right arrow buttons
at the spec window header bar to cycle
through the specs until the table view
spec is showing (shown as "Table" + the
name of the form).
You can also click on "Select All" or "Clear All" from the table spec header bar. LE
names, once selected, can be re-ordered by dragging them up or down the list (you
can also use shift + up/down arrow keys).
234
6 - ADDING AND EDITING DATA
Click on "Run" from the spec header bar to apply the spec. You can only re-order the
columns in the spec window, not in table view itself.
235
6 - ADDING AND EDITING DATA
The charts are for visual information purposes only and the types available are:
Bar Chart
Filled Chart
Horizontal Bar Chart
Line Chart
Pie Chart
Sliced pie chart
Spike Chart
These facilities are only valid for numerical fields, or fields which have values which
can be evaluated as numbers, for example Zip codes. You can go through the process
of obtaining a summary or a chart for other fields, but the results will not be
meaningful.
To display a summary
236
6 - ADDING AND EDITING DATA
To display a chart
1. In table view, select the desired
column by clicking on the column
heading. The column is highlighted as in
the figure below.
237
6 - ADDING AND EDITING DATA
5. The chart window is not 'modal' - you can leave it open and continue working with
Sesame. You can display more than one chart at a time. When done, dismiss the chart
window(s) by clicking on the red 'X'.
Effect on subforms
Table-view subforms behave exactly like table-view of a main form.
Programming Conditions
Most form programming in table-view subforms should work as normal.
238
Section 7
Navigating Forms
There are many ways to move within and between the various elements on your
Sesame forms. The recommended way to navigate between form elements other
than using the mouse is to use the Tab key to move forward and Shift-Tab to
move backward. Other keys or key combinations can be used, depending on the type
of element you are moving to or from. You will invariably find your own favorite
combinations.
Sesame has a default or normal behavior when navigating forms. In actual use, you
might see different behavior. Sesame is a customizable and programmable database
manager. Navigation behavior can be controlled by programming and affected by
read-only fields, element-level security, or other customization added by the form's
designer.
This section covers form navigation and the keystrokes associated with it. Be sure to
read the section in this Guide on Adding and Editing Data to understand how to enter,
change, and save data in your forms.
Navigation keys
In addition to selecting an element by clicking on it, Table 1 shows the standard
navigation keys used in Sesame forms.
Keystroke Action
Home First press moves to the start of the text. Second press moves to the
first element on the form. Third press scrolls the form to the top.
End First press moves to the end of the text. Second press moves to the
last element on the form. Third press scrolls the form to the bottom.
239
7 NAVIGATING FORMS
Keystroke Action
Up Arrow Normally moves to the previous element on the form in the same order
as pressing Shift-Tab, except through element types where arrow keys
select or change selection, or the element is multi-line. If you are in the
first element on your form, Up Arrow will scroll upward until you reach
the top of the form.
Down Normally moves to the next element on the form in the same order as
Arrow Tab key movement, except through element types where arrow keys
select or change selection, or the element is multi-line. If you are in the
last element on your form, Down Arrow will scroll downward until you
reach the bottom of the form.
Left Normally moves through the data in an element, then to the previous
Arrow element on the form in the same order as Shift-Tab movement, except
through element types where arrow keys select or change selection.
Right Normally moves through the data in an element, then to the next
Arrow element on the form in the same order as Tab movement, except
through element types where arrow keys select or change selection.
This way, you can make sure navigation always goes from FirstName to LastName
when you are adding data. Take care that such go-to statements are suitably
conditional (If...Then...), because On-Element-Exit programming in Sesame will be
activated no matter how you exit the element even by clicking on another part of
the form. See the Sesame Programming Guide for more information on adding
automation to your forms and elements.
Text Editor Enter Remains in element and moves down one line.
All Arrow keys Moves through data until reaching end, then acts like
an arrow key in a single-line text element.
Image All Arrow keys Moves through data until reaching end, then acts like
an arrow key in a single-line text element.
All Arrow keys Acts the same as arrow keys in single-line element.
241
7 NAVIGATING FORMS
Radio Arrow Keys Moves through the different buttons. Right arrow also
Button moves selection down and left arrow moves up.
Group
Spacebar Selects highlighted button.
Up/Down Moves through list box choices. Leaving the list box
Arrow Keys leaves the highlighted choice selected.
242
7 NAVIGATING FORMS
Once in the subform, you can fully navigate between elements with the keyboard, and
can navigate out of the subform with the Ctrl-Up-arrow key only. You can also return
to the main form by clicking in an element on the main form. The Shift-Tab key will
not move you from a subform to the main form.
243
7 NAVIGATING FORMS
Keystroke Action
Tab Moves through the columns (fields) in a record from left to right.
Enter Edit mode selects the contents of the cell. Typing replaces
highlighted cell contents. A second Enter then moves to the cell to
the right.
Home Moves to the first (leftmost) column of the current record (row).
244
7 NAVIGATING FORMS
Keystroke Action
End Moves to the last (rightmost) column of the current record (row).
Ctrl-Home Moves to the top left of the table (first field of first record).
Ctrl-End Moves to the bottom left of the table (first field of last record).
Down Arrow Moves to the next row (record) of the table. From the last row
creates a new row for a new record.
F10 Moves to the next row (record) of the table. From the last row
creates a new row for a new record.
Any alpha- Starts editing selected field of the current record, adding text to
numeric key the end of the current contents.
Mouse click Moves to the selected cell (field in the selected record)
Double mouse Opens that cell (field) for editing, with contents selected. A
click subsequent mouse click deselects the contents and positions the
cursor in the cell.
Table 3. Keystrokes for table view navigation.
See the section in this Guide on Using Table View in the Adding and Editing Data
section of this guide for information on adding records, updating, and saving changes
to your records in table view.
245
Section 8
Searching and Sorting
Sesame has powerful searching capabilities. Searching is both easy and versatile. In
this section you will learn how to perform simple as well as complex searches, how to
save and re-use your search criteria, and how to work with the result set of records
that Sesame finds when you perform a search.
Basic searches.
Complex searches.
Very complex searches involving programming.
Searching special layout elements
Fine-tuning your searches to obtain the results you want.
Saving searches for re-use.
Sorting your result sets.
The Retrieve Spec is a view of your form containing no data. You type in examples of
what you are searching for these are called your search criteria. When you run the
search, Sesame will return the group of records that meet your search criteria. This is
called the result set. A result set comprises one or more retrieved records. (If no
records meet your search criteria, Sesame does not return a result set.)
You can now review the records in the result set and update them if you like.
Basic Searches
247
8 SEARCHING & SORTING
Sesame will display a blank form. Notice that a new tab has opened up, with the title
Search/Update Main Form. (See Figure 2.) This is the Retrieve Spec.
248
8 SEARCHING & SORTING
Sesame will display the first matching record of the result set. You can now continue
to press F10 to view the remaining matching records.
There are a couple of features which can prevent searching working exactly as
described above: Autocomplete and Templates. These are described below.
249
8 SEARCHING & SORTING
Telephone: \(330\)..
A note on sorting
The records in the result set are likely to be in random order. This is because Sesame
does not store the records in sorted order. For a small database, the records in the
result set are likely to be returned in the order in which they were added to the
database. For a larger database, they might appear in different orders as you work
with the database.
The rule is that if you want your result set sorted, you sort as part of the retrieval
process. You can use the Sort Spec either before running the search, or afterward.
Sorting is covered at the end of this section.
250
8 SEARCHING & SORTING
Q&A
Q&A is different. You first tell Q&A what you want to do perform a
mass update, for example then Q&A supplies a retrieve spec just for
that task. If you want to mass update a particular group of records and
then include them in a report, you have to fill in two retrieve specs one
for the mass update, and another one for the report's own retrieve spec.
There is only one thing you can do with a Q&A "result set," and that is,
print it, by pressing Ctrl-F2. In this context, the Q&A documentation uses
the term "stack" of records, which is the equivalent of Sesame's result set.
Press F10.
From the menu tree select Search Menu / Search Commands / Retrieve New
Results.
Select Run from the sort window. (Sorting is covered later.)
Press Alt-R, the shortcut key for Run Sort.
There is yet another method. You can select Find First Match from the Search
Commands menu. This is useful if you are searching a very large database for one or
two specific records. Rather than search the whole database, Find First Match does
just what the name implies retrieves the first matching record quickly. If this is not
the right record, you can select Find Next Match from the Results Commands menu
and Sesame will show you another record the next one that matches your criteria.
There is also a Find Previous Match command.
Any sorting you may have specified is ignored when you use Find First Match.
The Find Next Match / Find Previous Match commands are unavailable unless
you run the search initially with Find First Match.
Q&A
Q&A's default search method is the equivalent of "Find First Match"
unless you sort the records or are searching on a speedy field.
251
8 SEARCHING & SORTING
Entering criteria
Sesame's searching works on the principle of query by example. You have a retrieve
spec, which is a blank form. Using the field or fields you want to search on, you type
an example of what you are looking for, then run the search. In other words, if you
want to retrieve the records where the last name is Smith, you simply type smith into
the Last Name field and run the search.
Although the word "field" is used here, strictly speaking you are entering your search
criteria into one or more layout elements on the form, not fields per se. But the term
field is commonly used in this context, and it will be here as well.
The values or sample data you type in at the retrieve spec constitute your search
criteria.
Q&A
Q&A users will be happy to find that search criteria in Sesame are, for
the most part, identical to Q&A's.
The examples below are from the Customers.db sample application. You will find that
most of the examples in this chapter will work if you search the Main Form in this
application.
Examples:
Last: jones
Finds all records where the Last field consists of the text Jones (any capitalization).
252
8 SEARCHING & SORTING
City: chicago
Finds all records where the City field consists of the text Chicago (any capitalization).
Note that the field contents must consist entirely of Jones or Chicago to meet the
criteria. Sesame does not automatically perform "wildcard" searches. Wildcard
searches can easily be performed if you need them, and these will be covered later.
Last: wilson
City: los angeles
These two criteria find the records where the Last field contains just Wilson
and the City field contains just Los Angeles. Wilsons elsewhere are not returned; nor
are other last names in Los Angeles. Both must match.
You can enter criteria in as many fields as you like. The more fields you search on, the
more restrictive the search, and the fewer the records Sesame will return in the result
set.
See later in this section for advanced criteria using mixed "and" and "or" searches
across fields.
When you are finished with a particular result set, you can either abandon further
searches, or return to the retrieve spec to modify or further refine your search criteria.
To abandon the search, press the Escape key or select Exit Search from the Search
Update menu. If the current record has been changed but not yet saved, Sesame will
ask you to confirm that you want to exit without saving changes.
To modify or refine a search, do not press Escape to abandon the search. Instead,
press the F7 shortcut key or select Search from the Search Update menu. Sesame will
return you to the retrieve spec with your previous criteria retained. You can then make
any changes you like and run the modified search. This can be a handy method of
performing several slightly different searches, but be aware that all criteria are
253
8 SEARCHING & SORTING
retained. For example, there may still be a "Y" in a field on a part of the form that is
not visible.
Similar rules apply for a currency field. You can enter criteria of 6500 and Sesame will
find the records where the amount is actually displayed as $6,500.00. You don't need
to enter the currency symbol, the comma, or the decimal places (though you can if
you like). However, if you had one or more records in the database where a text field
contained "$6,500.00", then you would have to type $6,500.00 exactly at the retrieve
spec in order to find them.
If the date(s) you are searching for are in the current year, you can omit the year
altogether. Accordingly:
Jul 4
july 4
7/4 (U.S.)
7-4 (U.S.)
7 4 (U.S.)
will all retrieve the records where the date is July 4, 2007 if the search is run in 2007.
Therefore:
Important Note: The "/" symbol for NOT makes all that follows negative.
Accordingly:
Q&A
Q&A users will be happy to find that the search criteria in Sesame
including these special symbols are, for the most part, identical to Q&A's.
Tables 1a and 1b show some examples of basic searches. Table 1b shows how to use
arithmetic operators.
255
8 SEARCHING & SORTING
In number, money, date or time fields, ".." indicates a range. When typed before the
criteria, it means up to. When used after the criteria, it means upwards. Between two
sets of criteria, it means between. Note that the ".." operator is the equivalent of >=
or <= in that it includes the limits. Accordingly, in the simple example of a number field
containing integers:
3..6 will retrieve 3, 4, 5 and 6. (In a number field, NOT in a text field)
The range operator can be used with numbers, dates, times, and text. You will only
obtain correct results if the field data type is correct for the way you are searching.
Dates or numbers entered into text fields cannot be searched on or sorted as dates
and numbers, only as text. So, 3..6 in a text field would be interpreted as a wildcard
search (see below) and retrieve the values 396 and 36-24-36, for example.
256
8 SEARCHING & SORTING
257
8 SEARCHING & SORTING
Following are the rules for using Max and Min in searches:
Q&A
In Q&A, Max or Min by itself implies the number 1. In Sesame, you must
specify the number. So use "Max 1" rather than just "Max".
Wildcard characters
A wildcard character in a search is rather like a joker in a pack of playing cards it
can represent anything. Sesame supports two wildcards:
Q&A
When searching, the "?" and ".." wildcard characters work the same way in
Sesame as they do in Q&A.
258
8 SEARCHING & SORTING
.. beach (Note the Daytona Beach, Huntington Beach, Long Text, keyword
space) Beach, etc.
but not Beachview, Longbeach, etc.
Note that the ".." symbol has two distinct uses: as a wildcard character for text
searches, and to imply a range for non-text searches. Sesame works out what you
mean from the context.
Advanced searches
Already in this section all the techniques and methods needed to perform everyday
searches have been covered. What follows are additional menu commands and
additional search syntax devices to enable you to perform advanced searches. Some
of these you might use regularly. Others are infrequently used or even arcane. You do
not need to learn them all.
This specifies OR for the field. To specify OR across fields, you need to change
Sesame's search logic. By default, Sesame's search logic is AND across fields:
"Find the records where the state is MA and the first name is Mary."
This search mode is referred to as Meet ALL restrictions. To change the search mode,
select Search Options / Meet Any Restriction from the menu tree at the retrieve spec.
The text on the status line at the bottom of the screen will change as shown below.
Figure 4. Changing Search mode. Notice the status line at the bottom of the screen.
Q&A
This is the equivalent in Q&A of pressing Ctrl-F7 at the retrieve spec and
changing the setting from the default "Meet ALL of the Restrictions" to "Meet
ANY of the Restrictions".
260
8 SEARCHING & SORTING
Here's an example:
If you perform the above search using the standard search mode in the Customers.db
sample application, you will get just one record for a Mary in Massachusetts.
After changing the search mode to Meet ANY restriction, the same search will turn up
13 records seven people in Massachusetts and six Marys, one of whom lives in
Massachusetts.
With search mode set to Meet ALL restrictions, the more fields you type
criteria in, the fewer the records you will retrieve.
With search mode set to Meet ANY restriction, the more fields you type criteria
in, the more records you will retrieve.
The search mode is stored with a saved retrieve. See the heading Saving
Searches below.
Sesame's default search mode is Meet All Restrictions. This is seen on the
status line as Setting search mode to match ALL search restrictions when you
first open the retrieve spec.
If you clear the retrieve spec by pressing F3, for example, the search mode is
retained until you change it.
Exiting Search/Update resets the search mode to the default.
261
8 SEARCHING & SORTING
Search Commands . .
Add to Current Results Add records retrieved in this search to the previous
result set
Next Matching Record in Apply this search to the current result set, not the
Current Results whole database, and find the first record that
matches. Leave the result set intact
Search in Current Results Apply this search to the current result set, not the
whole database, to produce a new result set
Remove From Current Remove records retrieved in this search from the
Results previous result set
Inverted Search Search for records that DO NOT meet these criteria
Find First Match Find the first matching record rather than all of them
Universal Search Perform a normal search, but across all fields on the
form
All Duplicates Search Search for duplicates, matching fields as per the
current duplicates spec. Retrieves the duplicate
records, and also the 'original' record in each case.
Table 5. The Search Commands menu commands.
Sesame offers two easy ways to search the database across all text, keyword and
image fields. These are:
Universal Search Search across all fields for the search string. Wildcard
characters can be used but have to be added.
262
8 SEARCHING & SORTING
Universal Search and Simple Search are quite different to the other searches in that
the retrieve spec is not used, even though they are accessed from the retrieve spec.
Sesame offers two "web-type" search facilities. Simple Search is an easy way to
search for words or names without knowing which field they might be in. Simple
Search is described below.
There is a third type of search that searches across multiple fields, but this time
searching just one record at a time the current record. Having retrieved records,
Find on This Form searches the current form/record for text, just like you can search
a web page. This is described on page 283.
Simple Searches
Simple search behaves like a web search engine search. You type one or more words
or names into the dialog and Sesame searches the whole database for records that
include those. The records are ranked by how well they match, with the best matching
records first. So a record that has the search string occurring several times even in
different fields will be shown ahead of one that has it only once. Likewise a record
that has an exact match for the search string will be ranked ahead of one that has the
search string included in longer words or names.
There are no special search characters, and multiple words are separated by spaces.
To perform a Simple Search, first go to the retrieve spec then, from the Search
Commands menu, select Simple Search.
263
8 SEARCHING & SORTING
Criteria: house produces 4 records. The first of these is Marjorie Baker. She lives
in School House Lane, and her email address is m_baker@schoolhouse.cs.com. This
record comes first because "house" appears as a separate word, and there are two
occurrences of "house" within the record.
The next record is for someone whose position is Warehouse Manager
The next lives at West Rittenhouse Square
The last record is Barbara Mendenhouse
Simple search is exactly that. You don't have to learn any syntax rules. There is only
one refinement you can make. If you want to concentrate the search on a term that
consists of multiple words, put the words you want to keep together inside quotes
264
8 SEARCHING & SORTING
Safety and Officer entered as two words find many records that contain one word or
the other. Putting the criteria in quotes as in the figure retrieves just one record for
someone whose position is "Company Safety Officer".
Like all Sesame searches, Simple Search is case blind. It makes no difference whether
you enter criteria in lower case or UPPER CASE.
Inverted Search
Selecting Inverted Search from the Search Commands menu retrieves the
complementary set of records to an ordinary search. Suppose your criteria were as
follows:
State: AZ; CO
An ordinary search using Customers.db would return just the 11 records in Arizona
and Colorado. An inverted search would return 371 records all of the records except
those 11.
Q&A
This is the equivalent in Q&A of pressing Ctrl-F7 at the retrieve spec
and changing the setting from the default "Select those records that DO..."
to "Select those records that do NOT...."
265
8 SEARCHING & SORTING
Universal search
The Universal Search dialog is displayed. Enter the criteria you want to use to search
across all fields, then click on Accept.
The result set Sesame returns will be all those records that match your search criteria
in any text, keyword or image field. In the example above shown in Figure 5, this
would retrieve all records containing West, such as 110 West Michigan St in the Add1
field and Westerville in the City field, as well as a Last Name containing the characters
west.
Wildcards can be used, but you must add them. Without wildcards Universal
Search matches what you type to the complete contents of a field.
266
8 SEARCHING & SORTING
Universal search is a text search. It ignores number, date and money fields
and the like.
Q&A
Q&A (DOS) does not support any type of universal search.
Keyword searches
A keyword search is a special kind of search adapted to a keyword type field. A
keyword field is one that permits multiple entries, each separated by a semicolon
(";"). Each such entry can then be treated by Sesame as though it were the only entry
in the field. The example used in Customers.db is the Hobbies field. A person can have
many hobbies, and they are listed in the keyword field this way:
If this were an ordinary text field and you wanted to find all the people who were into
football, you would need to use wildcards, like this:
Hobbies: ..football..
You would need the ".." because the word Football could be anywhere in the field. It
could be the only entry, or at the start, the end, or anywhere in the middle.
; Means OR.
& Means AND when used as the first parameter. Using & with ; changes the
meaning of ; to AND as the example in Table 6 shows.
Q&A
Keyword searches in Sesame work the same way as in Q&A.
267
8 SEARCHING & SORTING
Football Football
/tennis; golf All except tennis and golf. (Same as performing inverted search
for tennis;golf)
Table 6. Keyword searches with multiple criteria.
The power of these searches is that the order of the entries in the keyword field does
not matter. In the third example in Table 5, golf can come before football in the
Hobbies field and the record will be included in the answer set.
The following section contains further examples of advanced keyword field searches.
\ Suppresses the special meaning of characters such as &, =, .. and so forth, and is
used immediately before such a character. It affects only the single character following
the \. You can use \ anywhere in the criteria and you can use it more than once.
Examples of use include finding records that have been inadvertently added by
entering retrieve criteria in Add mode, and searching for characters such as the
ampersand ("&") and equals ("=") sign.
] Performs a text search in a non-text field. The ] must be the first character of the
criteria. There are limited opportunities to use this special search character because
Sesame's strict data typing prohibits the entry of invalid information in number and
date fields, for example. The primary use of ] is to perform wildcard searches in date
fields. This is possible because the underlying value stored in the date field
regardless of format is stored in YYYY/MM/DD (2007/12/15, for example) format.
268
8 SEARCHING & SORTING
By beginning the search criteria with ] you can use Sesame's regular wildcard
characters. This will be shown in the examples below.
& means AND. It is used to indicate that more than one expression in a field must be
true for a record to be retrieved.
An example of how & might be used is to search the Add1 field in the Customers.db
sample application for records containing both "in" and "to" in either order:
This finds eight addresses such as: "..Pinto Drive.." and "..Washington..", and also
"..Torrey Pines.."
` The backtick defines a case-sensitive search. The Backtick (`) character is found on
the key to the left of the number 1 at the top of your keyboard. It should not be
confused with the single quote mark (') found towards the bottom right of your
keyboard.
You can format a text layout element on a form to display its data in UPPER CASE or
lower case, regardless of how it is typed in. For normal searches, this does not matter,
as Sesame is case-blind. In contrast, for case-sensitive searches using the ~ symbol,
the search criteria are matched against the actual value stored in the field, not the
formatted value as it appears in the layout element.
~ (Sounds-like Search)
Sesame incorporates a Soundex Search construct for text fields where you can search
for records that "sound like" instead of match the exact spelling of a retrieve spec.
Precede the sounds-like string with the tilde character (~). E.g. ~smith would return
records like Smith, Smyth, Smeth, etc. Use care to review the result set when using
this feature.
269
8 SEARCHING & SORTING
Q&A
In Q&A the tilde character (~) is used to specify a soundex or
phonetic search, called a "sounds like" search, as it is in Sesame.
Table 7 shows some usage examples of the special search characters covered in the
preceding paragraphs.
Compare this to
Keyword fields
270
8 SEARCHING & SORTING
Q&A
Q&A for DOS has no means to refine the result set. Each search needs to
be started from scratch.
To return to the retrieve spec after viewing your records, you can press F7 or select
Search from the Search/Update menu.
To clear the retrieve spec, you can press F3 or select Clear Form from the
Search/Update menu.
For example, suppose you search Customers.db for Columbus in the City field. Sesame
hands you the three matching records. You now return to the retrieve spec (F7), clear
it (F3), type Los Angeles in the City field, and click on Add to Current Results. You will
271
8 SEARCHING & SORTING
now have five records the three for Columbus and the additional two for Los
Angeles.
Suppose you want to retrieve all those customers who are in the City of New York, or
the States of Connecticut or New Jersey. However, you only want to include those
where the Currency field contains an amount greater than $500.00. You can't do this
in one retrieve without using programming or a drill-down search.
Run your first search with Search Options set to Meet Any Restriction.
Figure 12. Search stage 1note Meet Any Restriction on status line at bottom.
In the retrieve spec, type in the following and run the search:
This retrieves all the records that meet your geographical criteria. Now you need to
follow-up with the money restriction. Return to the retrieve spec (F7), clear it (F3) and
type in the following:
272
8 SEARCHING & SORTING
Currency: >500
This time, click on Search In Current Results and you will have the records you need.
(See Figure 13.)
Note that Search in Current Results produces a NEW result set compare with Next
Matching Record in Current Results(below) which leaves the result set unchanged but
shows you a certain record.
Example:
This search: State: PA
when run produces a set of records where the state is PA. There are 64 of them in the
Customers.db sample application.
Return to the retrieve spec (using the F7 keystroke or selecting Search (F7) from the
Search/Update menu), clear the "PA" from the state field and enter:
273
8 SEARCHING & SORTING
Clicking Next Matching Record in Current Results will show you a record in this
result set of customers in Pennsylvania for a customer whose hobbies include
tennis. This might be record 10 of 64. Now you are in Search/Update mode. There is
an equivalent menu item here named Next Matching Record. Selecting this will show
you another tennis customer in PA (record 12 of 64), repeat and you see record 25 of
64, then record 39 of 64. Repeating this beyond the last matching record will take you
to the first matching record in the result set and so on.
Figure 14. Viewing records in this result set where hobbies includes tennis
Suppose you search Customers.db for NJ in the State field. Sesame finds 32 records.
Out of these, 18 show P in the Live_Prospect field, indicating a prospect rather than a
customer.
If you then return to the retrieve spec (F7), clear it, type P in the Live_Prospect field,
and click on Remove from Current Results, you will now have only 14 records the
32 for New Jersey minus the 18 for prospects.
The above search methods are all activated with the retrieve spec showing. They act
on the set of records returned by your search criteria. There is another method that
allows you to further refine your result set Remove from Results.
274
8 SEARCHING & SORTING
Remove from Results removes only the current record the one you are viewing. It
can be useful, for example, to remove individual records from a group of records you
are about to export. The record is not deleted from the database, it is only removed
from the current result set.
Check boxes
A check box represents a Yes/No field, also called a Boolean field. A check in the box
indicates Yes, True, On or 1. If the box is unchecked, it indicates No, False, Off or 0.
Sesame check boxes are tri-state, meaning that they have a third setting unknown.
It is the equivalent of the underlying Yes/No field being null or blank.
Figure 16. Searching Check Boxes for: No, Yes, and "omit from search"
The unknown setting the third (solid, raised) check box in Figure 11 is not a
search criterion, but disregards that layout element. It is the equivalent of leaving a
text box empty, which tells Sesame: "I don't care what is in this field," meaning that
Sesame will retrieve records where that check box is in any of the three states.
275
8 SEARCHING & SORTING
Combo boxes
To search a combo box, navigate to the
combo box or click in it, press the down
arrow, and the combo box will expand to
show the available entries.
Select one and press Enter. Then run the
search.
Combo boxes also allow you to enter
other text not on the pick-list (subject to
any restrictions the form designer may
have imposed on this layout element). To
search for other text, simply type it into
the combo box at the retrieve spec as if it
Figure 17. Searching a Combo Box. were a normal text box.
List boxes
276
8 SEARCHING & SORTING
Menu Buttons
A menu button is like a combo box but without the facility to be able to type your own
entry. You must select one of the available entries. The list of values is entered in
Designer. If your menu button is like the example shown on the left in Figure 20, then
you might have problems when you come to search the form. You will have to select
one of the available values and include that in the search. It is easy to get around this
situation. In Designer you simply add . . (two periods) as the first entry in the list of
values. This way, at the retrieve spec, this entry is the default value (it means "any
valid entry"), and so the menu button is excluded from the search criteria. If you want
to search for one of the entries you simply select it, as in the left-hand example.
Image searches
Sesame supports image fields. These are fields that store graphical images or pictures.
To be precise, the image files themselves are not stored in the database, only their
paths and filenames. An image field is represented on a form by an image box which
displays the image. You can search these image boxes.
277
8 SEARCHING & SORTING
The image browser serves a number of purposes. In Search/Update mode it tells you
the stored filename and path of the image file for that layout element. When
searching, it allows you to search for records by performing a text search for the
filename. It also allows you to view image files both for storing and retrieving them.
You can alternatively use the arrow keys to highlight a filename and then press Enter
to display the image.
When you find the picture you want to search for, click on Accept. The path and
filename for that image are entered into the retrieve spec ready to run the search.
(You cannot see the pathname.) You then run your search in the usual way. Any
278
8 SEARCHING & SORTING
records that meet the criteria the specified filename in that image box will be
returned.
In this way you can view a library of images photos of people, houses, and the like.
Without knowing the filename, you can retrieve the record or records containing a link
to that image.
279
8 SEARCHING & SORTING
For example, to find all records with images where the image filename starts with A,
you would enter the following in the Select an image as search criteria box and click
Accept:
a..
This search in Gems.db will retrieve the records for Alexandrite, Amethyst and
Aquamarine.
To find records where the image box contains pictures with House anywhere in the
filename, you would type:
..house..
Image searches can also be saved and re-used in the usual way. (More on this below.)
Universal Searches also work along with text fields, image boxes are included in a
universal search.
The location where Sesame will look for images is defined in Designer in the
Application Property Manager found on the Application menu. The image path as
defined there is relative to the current working directory. So if, for example, the image
path is defined as simply Pics, and the current working directory is C:\Sesame, then
Sesame will look for image files in the C:\Sesame\Pics directory.
This will be the starting point for the directory tree seen in the image browser. You can
browse for images in the image path folder and any folders under that folder.
Programmed retrieves
Though Sesame offers a wealth of record retrieval tools and search options, a search
you need to perform may be more complex than those already described. Perhaps you
need to retrieve records based on a calculation or by comparing the values in two or
more fields; or save a retrieve that finds records dated the previous month, no matter
what the current date might be. You can perform these kinds of calculated retrievals
using programmed retrieves.
Programmed retrieves are especially useful when attached to a report. This way, the
report can always include records from the current month, previous month, year to
280
8 SEARCHING & SORTING
date etc, without modification. This is done by referencing the current date using
@Date or @ServerDate(). Without a programmed retrieve the person running the
report would have to manually input the required dates each time the report was run.
Q&A
In Q&A, you can type logical field numbers (#1, #2, etc.) in fields
and refer to them as such in a retrieval expression. In a Sesame
retrieval expression, you must refer to fields by Field Name.
To search using a programmed retrieve, you type the expression in a text box (field)
on the form, where you would normally enter your search criteria. Programming
expressions, however, must be typed inside French braces, like this:
SomeField: { expression }
Most programming functions from the Sesame Programming Guide can be used in
programmed retrieves, but not all. The requirement is that the expression within the
French braces must (1) evaluate to a value that can be compared to the content of a
layout element in the current form, or (2) evaluate to true or false for the record.
For the former case, you type an equals sign ("=") in front of the opening French
brace in the layout element (field) you wish to compare against the search expression.
When you run your search, any record where the expression equates to true becomes
part of the result set.
In the latter case, it makes no difference in which layout element (field) you type your
retrieval expression.
Note: if comparing a date, it must be in the format YYYY/MM/DD, and in quotes, e.g.
Date_Entered: = { "2007/03/20" }
Expressions that evaluate to true or false for the record can be typed in any layout
element. Use the FIELD NAME if it differs from the layout element name.
281
8 SEARCHING & SORTING
The following expression will find records where the city is Columbia or the state is
MD:
This expression will find all records where Date_Entered is in May of this year:
The following expression will find entries in Comments that exceed 255 characters:
You can even use @XLookups in programmed retrieves. The following example finds
customers in Europe. In this case, Europe as a continent is stored, not in the
current application, but in a different application named Continents.db:
As you can see, retrieval expressions are powerful, and you can save them for re-use
just as you might save any retrieve spec. Saved programmed retrieves can be
attached to reports.
See the Sesame Programming Guide for details on all the available programming
functions.
you will search for any date between 30 days ago and today. The client compiles and
runs any code found between a starting pipe symbol "" and an ending pipe symbol
and substitutes the result of that expression in the search string it sends over to the
engine. So, on 30 September 2007 the example above would produce the search
string:
282
8 SEARCHING & SORTING
Unlike using the "{ }" search spec programming, this programming runs only once on
the client, as opposed to running for each and every record to be searched, on the
server. This makes it many times faster, but it also means that record values (the
content of other elements) cannot be used.
283
8 SEARCHING & SORTING
You can save your search criteria for later re-use. It is the retrieve spec criteria that
Sesame saves, so only regular searches can be saved, not inverted searches or drill-
down searches, simple searches, or universal searches. You are most likely to want to
save a search when it is used regularly, because it took some effort to set up, or
because it retrieves the records you need under variable conditions, such as "last
month."
Retrieve specs are saved and recalled using Sesame's Spec Manager.
Saving a search
Follow these steps to save a retrieve spec:
Note: The name you assign to your saved spec can be as long as you like,
with spaces and mixed capitalization. Likewise with the description.
The criteria, if any, of the current retrieve spec are replaced by those of the loaded
retrieve. If you return to the Spec Manager, this is shown as the "Currently Loaded"
spec, even if you have since modified the search. If you modify the search and save it
with the same name in Spec Manager, you are asked to confirm that you wish to
overwrite the saved retrieve of that name.
286
8 SEARCHING & SORTING
After loading a saved retrieve, you can run it as-is, modify it, or use any of the other
search options, such as Add to Results, Search in Results, and so forth.
287
8 SEARCHING & SORTING
Warning: If you set a default retrieve spec for a form, you might not see all
of your records unless you clear the default search criteria (F3) before running
your search. There is no indication that the records have been filtered through
a default retrieve spec other than the criteria that are visible in the spec when
you open it.
You can likewise clear a default retrieve spec by clicking the Clear Default button in
the Spec Manager.
Q&A
Q&A for DOS does not support default retrieve or sort specs.
Regular Expressions
All the foregoing assumes use of the search language used by Sesame 1 and by
Symantec Q&A. Sesame 2 offers an additional, optional search language: 'Regular
Expressions' or 'Regex'.
A search language is a set of characters that have special meaning in a query. For
example, in Q&A and Sesame, entering ".." in a text element, means match any
characters. Entering "m.." in a search spec, means match text that starts with "m".
The ".." will match any characters that follow the "m". Entering "..m", will match text
that ends with "m". The ".." will match the text that precedes the "m". The portion of a
search that is not comprised of special character combinations is matched literally. In
other words, the "m" in the examples above is will match an "m" in the text to be
searched.
288
8 SEARCHING & SORTING
Just as the Q&A search language is a set of combinations of characters that have
special meaning to a search, regular expressions are also a set of combinations of
characters that have meaning to a search.
In Sesame 2.0, a regular expression can be used in place of the Q&A search language.
The two languages can be combined on the same search spec. The default search
language is the Q&A search language. To cause Sesame to use regular expressions as
the default search language, start sesame with the "-regex" startup switch, or use the
"DEFAULT SEARCH SYNTAX: regex" command in the sesame.ini file. At any time, you
can switch the search syntax for any one particular search by using the command tree
command "Search Menu!Search Options!Use Q&A Search Syntax" or "Search
Menu!Search Options!Use Regular Expression Search Syntax". To
mix the two syntaxes in a single search spec, use the "regex(...)" search construct or
the "qanda(...)" search construct in an element in the search spec. The regex(...)
construct allows the use of regular expressions when the Q&A syntax is the default.
The qanda(...) construct allows use of the Q&A syntax when regular expressions are
the default. These constructs must be used by themselves within any one element and
cannot be mixed with the other syntax within that one element.
Regular expressions have many equivalents to Q&A search language constructs for
searching on text. Regular expressions do not have constructs that allow numeric,
date, or time range comparisons as found in Q&A. For that reason, all elements are
treated as text when working with regular expressions. For example, in a Q&A search,
"> 10" will find records where a number element has a value greater than 10. This
search in a regular expression is not possible. The element's value is treated
as a text "1" followed by a text "0", not as a number with a value of 10.
Regular expressions have many text comparison features that are either very difficult
or impossible in Q&A syntax. For example, regular expressions can match a range of
characters, specify a minimum and maximum number of matches required, or match
characters based on the type of the characters to be matched. It is possible to create
a pattern to match any text string using regular expressions. Unlike Q&A, regular
expressions are not anchored to either the beginning or the ending of lines by default.
A search for the letter "m" will match text with the letter "m" anywhere in the text.
Also, unlike Q&A search language, regular expressions are case sensitive by default,
so "m" does not match "M".
The Basics
Match the beginning of
^ ^Hello Matches a line that starts with "Hello"
the line
Match the end of the line $ Hello$ Matches a line that ends with "Hello"
Matches "but", "bit", "bet", "bat", and any
Match any character . b.t text starting with "b", ending in "t" with
one character between,
Match a character listed
[] b[uei]t Matches only "but", "bet", and "bit".
in the square braces
Matches "Maid" and "Mad" and any text
Match zero or more * M.*d
that starts with "M" and ends in "d"
Match zero or one ? start.?ing Matches both "startling" and "starting"
Matches "Moore" and "More", but not
At least one + Mo+re
"Mre"
Not matching [^ ] [^a].?ount Matches "mount" but not "amount"
Match either | More|moore Matches either "more" or "moore"
Quantifiers
The "*", "?", and "+" listed above are quantifiers. Regular expressions allow the user
to specify the number of matches required by placing a quantifier after the pattern to
be matched. The pattern "mo*re" will match "mre", "more", and "moore", because the
star "*" is after the "o" it indicates that there must be zero or more "o"s after the "m"
and before the "r". The user can specify a precise quantifier by using the
"{ }" construct. These allow the user to specify an exact number of matches or a
range of matches:
290
8 SEARCHING & SORTING
To match the dash "-" or the square braces inside of a group, use them first in the
group. To match a dash, "a", "b", or "c", use "[-abc]". To match the square braces and
"a", "b", or "c", use "[][abc]".
Character Classes
Characters can be seen as having "class". These classes specify what kind of character
it is. For example the space " " character and the tab character are both seen as
whitespace characters. The characters between "A" and "Z" are considered to be in
both the alphabetic class and the alphanumeric class. The numerals are in both the
numeric class and the alphanumeric class.
291
8 SEARCHING & SORTING
Example:
The example above will use regex syntax in the First Name element to check if the
first name starts with a capital "M". It uses the Q&A compatible syntax to check if the
Last Name ends with a "n". Any text typed into an element before or after the
regex(...) construct, while not specifically illegal, will be ignored.
If the default has been set to regular expression syntax, you can still use the Q&A
compatible syntax in individual elements by specifying the qanda(....) search
construct. As with the opposite regex(...) search construct, the qanda(...) construct
must appear alone within an element and can be used in multiple elements.
The "content" between the parenthesis can be any Q&A compatible search phrase.
This is especially useful for searching in numeric elements, where the regex syntax will
treat the numeric value as text.
292
8 SEARCHING & SORTING
Sorting records
How to Sort
Sesame does not store your records in sorted order. You specify your sorting criteria
when you retrieve them. Sorting is an option, not a requirement.
You can sort in two ways. You can specify a sort order before you run a search. You
can then optionally perform a dynamic sort when you have your result set.
Just like with searches, you can save and recall sort specs and you can also set a
default sort spec so you automatically see your data sorted the way you prefer. To
specify sorting criteria, you use the spec window.
The spec window is context-sensitive. For example, when the retrieve spec is open but
before a search has been run, the spec window will show only the Sort, Duplicates and
Table Specs as the others are not applicable. After a search has been run and you
have a result set, other types of specs, such as those mentioned above can be
selected. The sort spec is not available in Add data mode.
293
8 SEARCHING & SORTING
Click on the A button to toggle between ascending and descending sort for that field.
You can sort by as many fields as you like. The order in which they are sorted is
determined by the order of the layout element names in the sort spec. The top one is
sorted first, then the second one, and so on.
To change the sort order, drag the layout element names up and down in the sort
spec. You can only drag elements that are enabled for sorting that is, they have an
S in the selector.
1. You can sort as you retrieve. Fill out the retrieve spec with your search criteria,
define your sort parameters in the sort spec, then run the search in one of the
following ways:
Press F10.
Select Retrieve New Results from the Search Commands menu.
Select Run from the sort spec Action Bar.
Press Alt-R, the key combination for Run.
2. You can perform a dynamic sort. This is the same as above in that you prepare the
sort spec then run it. The difference is that you apply it (using one of the latter
two methods above) while viewing the result set, not at the retrieve spec.
You can also apply the new sort order by selecting SORT from the Results
Commands menu.
This way your result set is dynamically re-sorted you don't have to run the
retrieve again.
294
8 SEARCHING & SORTING
Q&A
Q&A for DOS has no dynamic sorting. You have to return to the sort
spec via the retrieve spec in order to re-sort the records.
Sorting by timestamp
The result set is immediately re-ordered with the most recently-modified records first.
You cannot sort by timestamp from the retrieve spec. It is a dynamic sort that
can only be applied to the result set.
Sorting by timestamp ignores any sort spec and is an alternative to it.
A timestamp sort has just one sort order most recently modified records
first.
You cannot save sort by timestamp.
The records in the database contain the timestamps, not the layout elements
on a form. Because of this, it might not be apparent on a particular form why
a record is recently modified. The modified field might not be represented on
that form.
295
8 SEARCHING & SORTING
296
Section 9
Mass Updating
Mass update is one of the most powerful features in Sesame. While the most common
use of mass update is to update information in a batch of records, you can also run
very useful mass updates that change no values at all.
For example, mass update can be used to write data from each record to an external
file, send an email for each record in your result set, or display quick report-like
summaries in the pop-up WriteLn window. See the Sesame Programming Guide for
details.
In addition, mass update can be made to pause during operations requiring user
interaction, so you can use functions like @UserSelect to dynamically offer a choice of
actions for each record in your result set. With the RemoveFromResultSet command,
you can also use mass update to remove records from your current batch based on a
programmed set of conditions, leaving you with a trimmed result set for use with
reports or follow-up mass updates.
Changes based on other field values. For example, If Years of Service exceed
15, then make the Bonus Amount equal to Salary times 0.07.
A mass update is performed on all the records in the current result set. (See Searching
and Sorting in this Guide for details on retrieving a result set of records.)
A mass update can be run in interactive (review each record before updating) or
continuous (automatic, no review) mode.
Mass update specs can be saved and recalled for later use.
Mass update can change data displayed in multiple elements (fields) in one operation.
297
9 MASS UPDATING
Backup first
A mass update can change the data in your database records. It is strongly
recommended that you backup your application before running a mass update on any
databases. Any changes made to your data during a mass update are irreversible.
There is no "undo" button for mass updates. See also footnote at end of this section.
1. Retrieve, and sort, as necessary, the records you want to update. See the section
on Searching and Sorting in this Guide.
2. Use the Spec Action bar or the Spec Selection arrows to display the Mass Update
Spec in the spec window. (For details on using the Spec Window see page 46.)
Figure 1. Mass Update selection shown on Search Update Results Commands menu. Mass
Update spec showing in Spec window.
3. Double-click on the element name on which you want to perform the mass update.
Sesame will mark that element with a P for programming attached and will open it
298
9 MASS UPDATING
in the Program Editor. (See Figure 2.) For further details on working in the Mass
Update spec, see Using the Mass Update Spec below.
4. Write the programming statement to accomplish the task you want the mass
update to perform. (See Figure 2.)
All the functions and commands that can be used in mass update programming
can be found in the Sesame Programming Guide.
Tax = 0.075
State = "CA"
Figure 2. Using the Program Editor to write programming for mass update. Note in the
background window that the Key element has a "P" in its element selector.
5. Test that your programming is valid by clicking on Test / Test program from the
program Editor menu, or pressing the shortcut key Ctrl-T. If there is an error it is
shown in the lower part of the window, under "Error String". If the programming is
good you see nothing there. Close the Program Editor.
299
9 MASS UPDATING
If you select Interactive, you will see the first record in the result set along with the
dialog box in Figure 5. You can then choose among the following actions:
Update All the rest of the records, including the current record, with no further
interaction on your part.
Cancel the rest of the mass update. (Records already updated will stay that
way).
300
9 MASS UPDATING
When the mass update has been completed, you will be returned to your result set to
the same record you started with.
You will be presented with the message (figure 6 below) and the mass update will
pause. Clicking on Yes will stop the mass update. Any records that have already been
updated at the time of the break will retain any changes already made. Clicking on No
will allow the mass update to continue. A message will appear on the status bar
informing the user of this option.
Interrupting a mass update might leave you with a set of records some of which have
been modified and some not, and with no means of determining which are which.
Click on the element selector (the gray box to the left of the element name).
This does two things:
301
9 MASS UPDATING
To open the mass update program editor, double-click on any layout element name.
You can write programming statements in any layout element. You can also place all
your statements in the one element. This keeps it simple.
You can disable the programming in an individual element by clicking on the P in the
element selector box. This does not delete the programming. It only disables it and
only temporarily, as will be described below.
You can have an element with a P alongside its name which does not have
programming attached.
When you close the mass update program editor, Sesame marks all elements that
have programming in them with a P, and removes the P from any elements containing
no programming. Disabled elements are re-enabled whenever you close the program
editor after having added programming to them.
All elements can be deselected by selecting Clear All from the Action bar dropdown.
Even though the P is not visible (indicating that the programming attached to that
element will not be run), the mass update programming stays attached to the element
as long as the form is open, unless deleted or changed in the program editor.
arrow to move it up or down the list. You can only move layout elements marked with
a P. (See Figure 7.)
Global code
In the mass update spec
window, you will see listed all
the bound layout elements
(elements linked to a field in
the underlying database), plus
an extra item at the top:
Global Code. (See Figure 7.)
Global code is a storage Figure 7. Mass update spec moving the Last field.
location for programming that
is available to mass update programming in all the other layout elements in this
specific mass update. Global code can be used to declare and initialize variables and
arrays, and store custom procedures such as user-defined functions and subroutines.
Details on Global code and other capabilities of Sesame's programming language can
be found in the Sesame Programming Guide.
The programming in the Global code area runs once at the beginning of the mass
update.
Do not use Global Code for regular mass update programming that is intended to be
processed on every record it will not do that.
There are two advantages to using just one layout element for all your mass update
programming:
You can control the sequence of changes without moving the elements in the
list. In other words, the second change can be dependent on the results of the
first change. For example, you can tell Sesame to "Lookup the employee's
date of birth and, if before 1950, insert bonus value of XX. If bonus value is
greater than XX, then, else"
303
9 MASS UPDATING
You can view all your update programming in one location. You can even add
comments to your programming to assist you in determining what the mass
update is doing. This can be particularly advantageous if you save your mass
update spec for future re-use. See the Programming Guide for details on how
to add comments to your programming.
You can make some portions of your code optional by turning off the "P" for
that element.
You can use the Spec window to quickly change the order in which the
statements are executed.
For most mass updates, you will likely see more benefit from putting the entire mass
update program into a single layout element.
Open the program editor by double-clicking on any element name in the mass update
spec window. This will mark that element as a programming "slot." Type your mass
update program in the program editor. (See Figure 8.)
You can employ almost all the functions and other features (loops, arrays,
subroutines) in Sesame's programming language, and the same rules apply:
Your programming must reference layout element names, not field names in
the database.
Q&A
You can also use XLookup to retrieve values from a Q&A database.
Q&A
In Q&A mass updates, you can refer to fields by their field names or
Logical Field Numbers (LFN's), such as "#20". Sesame does not have LFN's.
You must refer to layout elements by name.
304
9 MASS UPDATING
In the program editor, the first dropdown lists the layout element names, with Global
Code at the top of the list. The layout elements are initially listed in the order of
execution that is, the order they appear on the list in the mass update spec window,
but you can re-order the list of element names when the list is displayed either by
pressing the / (forward slash key) or clicking the right mouse button. You can use
this dropdown to open a different "programming slot" for a different element. Once a
list is open, typing a letter will move you to the section of entries that begin with that
letter.
You can see only the programming attached to one element at a time. That is to say,
you cannot view the mass update programming in multiple elements as a whole
program. You can, however, create a text file containing all the mass update
programming by selecting Export All to Text File from the File menu in the program
editor, or by pressing the Ctrl-S shortcut key.
The second dropdown, Event, displays only one event Mass Update.
To the right of the event dropdown is the Programmed Element Navigator. It has three
components. The dropdown displays only those elements that have programming in
them. On either side of the dropdown are buttons with arrows that allow you to view
the previous or next element containing programming. (See Figure 9.)
This provides a convenient way of navigating the relevant elements. Note that the
element navigator displays newly-programmed elements only after the program editor
305
9 MASS UPDATING
is closed and re-opened. This list can also be sorted in alphabetical order by pressing
the / key or clicking the right mouse button when the list is displayed.
Figure 10. Error string detailing invalid programming. There is no layout element "Last Name".
Note the caret symbol (^) indicating where the error is.
Whenever you close the program editor, all changes to the current spec are saved
until you exit the form. If you want to apply your changes to a saved mass update
spec, you must resave the spec to make the changes permanent.
Invalid programming
Whether you test your programming or not, Sesame allows you to save it even if it
is invalid. (Sesame does not automatically test your programming.) However, If you
attempt to run a mass update with invalid programming, Sesame will not allow it. You
will receive an error message. (See Figure 11.)
306
9 MASS UPDATING
Saved specs, whatever their type, belong to the form you were using when you
created and saved them. Each form has its own specs.
307
9 MASS UPDATING
The spec is added to the list of saved mass update specs in the left hand panel,
followed by a dash and the description.
Note: The names and descriptions you assign to your saved specs can be as
long as you like, with spaces and mixed capitalization.
308
9 MASS UPDATING
Figure 14. Loading a mass update spec. The currently loaded spec is Las Vegas 03. Clicking
Load will load the mass update spec named Check figures agree.
309
9 MASS UPDATING
The mass update spec is loaded. It is not automatically run. If you return to the Spec
Manager, the spec you loaded is shown as the "Currently Loaded" spec, even if you
have since modified it.
If you modify the mass update and want to save it with the same name in Spec
Manager, you are asked to confirm that you wish to overwrite that named mass
update spec.
** Alternatively, you can use the 'Load' and 'Save' commands found on the spec
window header bar. Load opens spec manager with the load tab active, and with the
spec type set to the spec type currently active in the spec window. Likewise the Save
button, which opens with the save tab active. See figure 14 above.
310
9 MASS UPDATING
If you want to run a mass update other than the default, you must first clear the
default mass update. You can do this in one of two ways:
By going to the mass update program editor and clearing each of the
programmed layout elements, then adding new programming statements.
Warning: When you have a default mass update spec and want to use a different
mass update spec, you must clear the old one. It is not sufficient to disable the
layout element(s) in use by the default mass update spec, then program others.
When you leave the program editor, all the programmed elements will again be
enabled.
You can likewise clear the default mass update spec by going to the same place and
clicking the Clear Default button. This does not clear the mass update programming in
this spec from the current session. It only stops this spec from being loaded the next
time the form is opened.
311
9 MASS UPDATING
If a default mass update has been defined, then data entry users can select Mass
Update from the Results Commands menu to run it. That is the only mass update a
data entry user can run. If there is no default mass update, the Mass Update choice
still appears on the menu tree but will only run a null mass update a mass update
that does nothing.
Whether or not there is a default mass update, the mass update option is disabled in
the Spec window for a Data Entry user.
Other programming
The mass update will not cause any form or element programming to run other than
what is contained in the mass update including On Form Entry and On Form Exit
programs. If you want your On Form Change programming to be run in a mass update
you have to copy and paste it from the form programming into a mass update.
Q&A
Q&A and mass updates
Recalc options
When you run a mass update in Q&A, you have the option of pressing F8 for the
Auto Program Recalc screen where you can set three options for form
programming to run with the mass update:
312
9 MASS UPDATING
This allows the Q&A user to have any or all of these three kinds of programming
executed on each record after the mass update programming has executed on
each record. The default is No for each option that is, run no form
programming.
Sesame does not have such options. No form programming is run when you
perform a Sesame mass update. The only changes made to the result set records
are those dictated by the specific mass update programming.
When you translate a Q&A database, the auto program recalc options are lost. If
your mass update depended on form programming running, you will have to
transfer that programming to the mass update itself.
If/Then programming
If your mass update programming employs a simple conditional such as If State =
"MD" Then [statements] to determine which records to update, consider retrieving
your records in a way that the result set contains just the Maryland records to begin
with. In this way you simplify the programming required to perform the update. You
won't need the If/Then conditional, and the mass update won't have to scan as many
records.
On the other hand, an If State = "MD" Then... conditional in your program can serve
to prevent non-Maryland records from being incorrectly updated should the result set
contain such records when the mass update is run.
313
9 MASS UPDATING
More on Backing up
Note on necessity to back up before mass updating:
314
Section 10
Printing Forms
There are many ways to print data from Sesame. These include
Each of these methods is best suited to a particular kind of printing task. For example,
printing a 'snapshot' of the visible form/record (Print Form) is convenient, but will not
show all your data if you have long values or tab pages. If you want to use Print Form,
you may want to create a form that is optimized for printing. Fortunately, Sesame
allows you to have multiple forms and the new Switch To Alternate Form feature
makes switching between them seamless.
Sesame allows you to print individual records in your database, the complete result set
of retrieved records, or all the records you've added to a database during a session.
When you want to print just a single record, Sesame gives you the option to print it
directly to an HTML file for use with other programs or to view in any web browser.
Whenever you print a record, the output will contain the entire record including any
displayed subforms and images. The key to printing in Sesame is that you will always
be working with the current set of records rather than all of the records in the
application.
The Print commands in this section print your form as it appears on the screen, with
each layout element displaying the values from the record being printed. To print just
your data without including the form elements, you can create a report, (See the
Designing Reports section in this Guide) or use PrintString or MergeFilePrint (See
Programming Guide). You can also print your data using the Merge File Print
commands on the menu tree these require no programming.
The commands for printing just the current record are found on the Record Commands
/ Printing Commands menu.
315
10 - PRINTING FORMS
The commands for printing the whole result set are found on the Results Commands /
Printing Commands menu.
Next, you decide whether to print all the records you have retrieved, or just the one
you are currently viewing on-screen. Whichever choice you make, you can then use
the printing options on the Search Update Menu as shown in Figure 1.
316
10 - PRINTING FORMS
This message box will be displayed, showing the number of records that will be
printed:
Click Yes to proceed or No to cancel the print operation. Whichever menu command
you use (Print Form or Print Forms), you will be shown the Print Forms dialog (See
Figure 3). The options at this dialog are detailed below.
Selected
This always shows Forms and is not editable.
317
10 - PRINTING FORMS
Figure 3. The Print Forms dialog, shown also when printing one form.
Format
Here you can select Portrait or Landscape to print the form(s) with the orientation of
your choice.
Options
318
10 - PRINTING FORMS
Paper allows you to select from a wide range of paper sizes. The default is "Printer
Default" which uses the settings currently in use for your printer. Generally Letter
paper is used in the USA, and A4 is used in the UK, Europe and many other parts of
the world. You should get good results leaving this set to Printer Default.
319
10 - PRINTING FORMS
320
10 - PRINTING FORMS
Margins
You can set margins for the printed page here, in units specified by the Units
dropdown. All margins are initially set to zero. If using margins it is important to set
all of them to a non-zero value.
321
10 - PRINTING FORMS
Note: When you go to print, you may receive a message that the current
record has not been saved. Sesame needs to save your record before it prints
it. You can save your current record by selecting Save Record from the
Navigation section of the Add Data Menu, or by simply pressing F10 followed
by F9 to save and return to the record.
If there are values too long for a layout element you will see printed only the
truncated values. Only data on the tab that happens to be visible at that time will be
printed.
Sesame scales forms to fit the printed page. This means that if you have a form with
very large dimensions, but you only have layout elements in the top left corner, then
the printed page will show the "active" area of your form in miniature at the top left of
the page. If your form is long then it will print scaled to fit onto a single page, and the
values may be too long to be legible. If printing such a form is important to you then
you should consider creating additional forms designed for printing, and as a minimum
design the form so that its dimensions are roughly in proportion to those of the page
in the orientation you intend to print. You can also use the Pages options described
above to split your form across multiple pages.
322
10 - PRINTING FORMS
Printing to HTML
Selecting Record Commands / Printing Commands / Print Form to HTML creates an
HTML file of the current record and saves it to any location on your local computer or
to a mapped drive or UNC path on the network. This choice displays a file manager
where you name the file and choose where you want to save it. You must use an .HTM
or .HTML filename extension (Sesame will assign the appropriate filename extension
by default) both produce the same results. See Figure 7.
When you supply the path and filename for the file and click OK, Sesame saves the file
to the location you specified then opens it in your browser (See Figure 8). Your output
will look exactly like your form. Even the data fields will be editable in your browser.
You can select static text on the form but not edit it.
Figure 7. File manager dialog window for saving an HTML file print of a single record.
323
10 - PRINTING FORMS
Figure 8. The "printed" record displayed in Internet Explorer. Note that the path and filename
are shown in the browser's Address box.
324
10 - PRINTING FORMS
Table view is printed in the same way as form view, using the Record Commands /
Printing Commands / Print Form or Results Commands / Printing Commands / Print
Forms commands.
The printed output will appear essentially as screenshot(s) of your table view
including column and row headers.
The printed output will print the columns and cells exactly as shown on your
screen. Cells will not be expanded. Non-displayed columns will not be printed.
Any columns to the left of the visible table will not be printed.
Your printout will consist of either just the visible records (if Print Form is
selected), or ALL the records, on multiple pages if necessary (if Print Forms is
selected).
Print Options
These work as described earlier in this section. A useful setting, when there are many
records, is:
Columns 1 Rows 3
This prints 3 'rows' or screenshots of the table under each other on one page. The text
will still be legible, but you get up to 3 sets of data on a page. See example Figure 9.
325
10 - PRINTING FORMS
326
10 - PRINTING FORMS
In addition, there are two choices of merging with a word processor. These are
described in the next section.
Another way to print involves adding programming to your forms (or Mass Updates)
that makes use of Sesame's powerful PrintString command. PrintString gives you
options for specifying the font face, font size, type of enhancement (bold, italics, etc.),
where to start printing on the page, and the number of columns in which to print the
data. You can even use PrintString to print merge-like documents right from your
records, where only the fields you select will appear in the printed output merged in
with any fixed text you choose. See the Sesame Programming Guide for more
information on using PrintString.
For merge printing more sophisticated documents such as formal business letters and
invoices along with mailing labels and envelopes see the next section Merge
Printing Your Data.
327
Section 11
Merge Printing Your Data
You can use Sesame to easily produce form letters, envelopes, and mailing labels
using the data in your application files by merging the data with documents you create
in your favorite word processor. This is called mail merge or merge printing because it
allows you to take specific information from your database and merge, or insert, that
information into a standardized letter or other document for one, a few, or all the
records. The same data can also be used to merge print envelopes and mailing labels.
Merge documents
Sesame helps you create merge solutions in three ways:
Merge File Print
Merging via data export
WordMerge
The first two methods do not necessitate any programming. WordMerge needs some
programming to be pasted in.
The basic process involves creating a Sesame application and entering into it the
information youll want to include in your merge document. Then, with one of the
above options in mind, designing a form letter (mail merge document) in a word
processing program to merge in that information. The final step is printing the merged
documents.
Figure 1 Merge File Print commands for one record and for the result set.
329
11 MERGE PRINTING YOUR DATA
Merge File Print enables you to perform basic merge print operations from Sesame.,
without any programming. When using this command, a file open dialog prompts you
to select a saved merge file from the list. You can browse to find the file.
The merge file must be an ASCII (human readable) formatted file, such as a plain text
file (.txt, .asc, etc.), a rich text file (.rtf), a postscript file (.ps) or an HTML file
(.htm/.html). When you've selected such a file, Sesame scans it, looking for layout
element names contained in double square braces -- [[Company]], for example. For
each one found, Sesame replaces it with the corresponding value from the current
record. After performing this find/replace operation on the entire file, Sesame then
sends the merged file to the printer.
Use Merge File Print (Current Record) to merge print the current record only. Use
Merge File Print to merge print all the records in the result set.
A Merge File Print merge document can be composed in Microsoft Word. After
composing it, you can save it, for example, as an .RTF file using Word's File / Save As
/ Save as Type feature.
For the first record in Customers.db, Merge File Print would print this:
Note that the double square braces used are the actual square braces available from
your keyboard. They are not the special characters that Word inserts to delineate a
merge field. This allows this command to work with virtually any word processor
available for Windows or Linux.
330
11 MERGE PRINTING YOUR DATA
Follow these steps to export a data source file for use in a merge document:
1. In Sesame, retrieve and sort the records you want to include in your merge
document, label template or envelope template.
2. In the Spec window in the lower left part of your screen, right-click on the action
bar and Select Export to display the export spec. Click on the fields you want to
include in the export. Or Left-click on the action bar and click on Set All to
export all fields. Left-click on the action bar again and click Run. (See Figure 2.)
331
11 MERGE PRINTING YOUR DATA
3. In the ASCII Export options dialog that displays (See Figure 3), click on Field
Name Header to select it. In the ASCII Export Filename field, type in the
complete path and filename for the export file you are about to create. Make
sure to give the file a .txt extension. Leave all the other settings as defaults
(Comma Separation, Delimit Strings and Double Quote Delimiter) and click
Accept.
Figure 3. Setting export criteria and saving the export file as a text file.
4. Open your word processor and use its wizards or menus to create your merge
letter. (Consult the documentation for the product you are using.) When you are
prompted for the data source to merge with the document, be sure to select
Text Files (*.txt) and choose the export file you just created. Insert the merge
fields in your document and you are ready to print. Figures 4 and 5 illustrate a
sample merge document being created in Microsoft Word XP.
332
11 MERGE PRINTING YOUR DATA
Note: Both MS-Word and Corel WordPerfect have very good in-product help
on merging data from an external text file. The exact steps vary between the
products and from version-to-version within each product.
Once you are satisfied with the merge document youve created, save it. It will now be
permanently linked to your Sesame export file. All you need do to perform a new
merge printing using that same document is retrieve a new set of records in Sesame
and export them to the same filename. Then, when you open your saved merge
document, it will automatically merge with the new data now contained in the export
file.
333
11 MERGE PRINTING YOUR DATA
Figure 5. An example of completed merge letter with the data merged in.
WordMerge
Described just above is how to perform an export, manually, so that the exported data
can be used in an external word processor. The user would then go to the word
processor, choose a merge document and open it. WordMerge, once set up, automates
many of these steps. WordMerge can be used with any word processor that supports
mail-merge to an ASCII or CSV file, such as Microsoft Word and Corel WordPerfect.
The examples below use MS Word.
WordMerge is not built in to Sesame as a feature; it does not appear on any Sesame
menu. It is also not a third-party utility. It is a program which can be attached to a
command button you create on a form in Sesame Designer. To add WordMerge
facilities to a form you:
The process should take no more than an hour and once added is self-maintaining and
will not need any further changes.
334
11 MERGE PRINTING YOUR DATA
Using WordMerge
Create your merge documents in Word. They can be as fancy as you like and
include graphic elements such as your company logo and digital signature. They
can be simple merge letters. They can have a sophisticated invoice-like or other
form design with rows and columns of merged data inside tables. They can be
documents that merge print envelopes or sheets of mailing labels.
Add a Command button named Merge Print or the like to your Sesame database
form. When you click on it, programming attached to the button performs the
following actions:
2. Asks you if you want to include just the record currently on-screen or all
the records youve retrieved. (This could be all the records in the
database.)
WordMerge also makes it easy to copy one already-prepared merge document with a
different name, edit it, and it will automatically appear on the picklist next time.
To set up WordMerge in your application, refer to the notes in the PDF document
provided with Sesame: Setting Up WordMerge.pdf which is found in the Sesame\Docs
folder. There is also a sample application in the Sesame\Data\Samples folder which
allows you to try out WordMerge easily without any setting up. Sample merge
documents and mailing labels are included.
335
Section 12
Import, Export and Copy Records
Data management tasks can include populating or filling Sesame applications with
data from files created by other programs or systems, or outputting data from Sesame
applications in formats that other programs and systems can use. This is called
importing and exporting.
Sesame can import and export data to and from a variety of common formats
supported by most programs which themselves have import and/or export capabilities.
If an external program has facilities for exporting its data, chances are good that you
can have it create a file that can then be imported into a Sesame application. If an
external program has facilities for importing data, chances are good that you can have
Sesame create an output file that the other program can then import.
Copying records consists of populating a Sesame database with records from another
Sesame database, without having to go through separate export and import
procedures.
Note: In the sections on import and export, you will see the term "Standard
ASCII." This indicates a text-only file format designed to store data values of
variable length, usually delimited by quotes and separated by commas.
Importing Data
Importing is the process of bringing into a Sesame application data created by other
programs or even another Sesame application. Such data must be imported into an
existing Sesame database and form.
Q&A
You do not use Import to bring a Q&A database into Sesame. You use
Translate Q&A from Sesame's main menu. However, you can export data from
Q&A to Standard ASCII format, and import the resulting data file into an existing
Sesame database as you would any other importable file.
337
12 IMPORT, EXPORT & COPY RECORDS
and worked with in a text-only editor such as Windows Notepad. ASCII files can be
created by many programs. Most database and spreadsheet programs can create
delimited ASCII files, and even word processors can be used for this purpose.
ASCII import files may have text values (as opposed to date or numerical values)
enclosed within quotes. Or they may not. They might have all data values enclosed in
quotes. Sesame will accept any values with or without quotes as long as they are
separated by commas or some other delimited character.
If you are importing any data text or numeric that contains delimiters as part of
the data values, such as 120,595 or Susan, John and Linda, such values must be
enclosed in quotes, like this: "120,595" and "Susan, John and Linda".
A typical ASCII import file one that could be imported into an application such as
Countries.db might look like this:
"Afghanistan","Kabul",19.5,657,"Asia"
"Albania","Tirane",2.5,29.0,"Europe"
"Algeria","Algiers",17.3,2383.0,"Africa"
"Angola","Luanda",6.4,1247.0,"Africa"
"Argentina","Buenos Aires",25.7,2777.0,"America"
"Armenia","Yerevan",,,"Asia"
"Australia","Canberra",13.8,7687.0,"Australasia"
"Austria","Vienna",7.5,84.0,"Europe"
"Azerbaijan","",,,"Asia"
In this case there are quotes around the text values such as the country
name, but not around the numerical values such as the area and population.
338
12 IMPORT, EXPORT & COPY RECORDS
Another type of file you may need to import is called a Fixed ASCII or table ASCII file,
where the data is organized in columns of fixed widths and any "area" between the
columns is "padded" by spaces or another character, such as a 0 (zero) in the case of
strictly numeric data. These types of data files are less frequently encountered than
Standard ASCII files. Although Sesame does not import Fixed ASCII files directly, it is
possible to convert such files to Standard ASCII format using tools in Sesame's
programming language. Alternatively, the data for each record can be imported into a
text field in the database, then a mass update used to parse (separate) the data
values and distribute them to the correct fields. This can be done, for example, by
knowing the starting column position of each data value and using the @Mid function.
See @Mid in the Sesame Programming Guide.
How to import
You import into an open form in either Add Data or Search/Update mode. In either
case, the imported records are added to the existing result set, and you can
immediately perform actions on them, such as printing them in a report, mass
updating them, or even mass deleting them!
The steps involved in importing an external data file into the Countries database using
the Countries form are as follows:
1. Review the data file you are about to import, so that you know the position of
each data value within the file.
2. Open the Countries form in Search/Update (with a set of records retrieved) or
Add Data mode.
Figure 1. Form open in Add Data, selecting Import spec in the Spec Window.
3. Right-click the Spec Action bar, or use the Spec selector buttons (with the
arrows), to display the Import Spec. (See Figure 1.) For full details on using the
spec window, see page 46.
339
12 IMPORT, EXPORT & COPY RECORDS
4. Click on the element selector (the button just to the left of the element name)
for each layout element into which you wish to import data. As you click on each
one, the element name is moved to the top of the list and the element selector
acquires an "I" to indicate that this is an element to receive imported data. See
figure 2.
5. Repeat the above step for all elements that are to receive imported data.
The Import Spec window has a first column which shows the 'column number' of the
file to be imported (see figure 3 below). This is a convenience that can be useful for
matching up columns with fields in the import spec.
Ignoring columns
As you select elements, the item that was at the top of the list [IGNORE COLUMN]
is moved down. Ignore column is a placeholder that represents a data value or field
in the import file that is not to be imported. The word "column" is used because if you
were to open the ASCII file in a spreadsheet program, each field would be a column in
the spreadsheet. You must have as many elements in the Import spec marked for
import as you have fields in the import file. If you are only importing some of the
columns then you must add IGNORE COLUMN rows for the others.
For example, suppose you have an ASCII file containing three fields in the following
first name, middle initial, last name format:
"Frederick","J","Anderson"
You want to import the file into a form containing just FirstName and LastName fields.
In this case, your Import spec would look like the one shown in Figure 2.
It is important that the rows in the Import spec match the order of the columns in the
import file. To move an element name up or down in the spec window, drag it up or
down. Alternatively, click once on it to select it and then press Shift-Up arrow or Shift-
Down arrow to move it up or down the list. You can only move layout elements
marked with an "I". A completed Import spec for importing countries-related data
might look like the one shown in Figure 3.
340
12 IMPORT, EXPORT & COPY RECORDS
If you need to suppress the import of more than one field (column) of the import file,
then you can replicate more IGNORE COLUMN placeholders by clicking on the "R"
button alongside its element selector. Another IGNORE COLUMN is created, which you
can then position as desired.
You can save an Import spec either before or after performing the import. To learn
about saving and reusing specs, see Using the Spec Manager in the Mass Updating
section of this Guide.
The "Select a File to Import" dialog opens. Specify the location and file you wish to
import, the click on Accept.
The file is imported in accordance with the current Import spec. If the import is
successful, the new records are added to the result set and a message is displayed on
the status line telling you the number of records imported. (See Figure 4.)
341
12 IMPORT, EXPORT & COPY RECORDS
Figure 4. Import complete. Nine records imported. See message on status line.
In the example shown in Figure 4, the message says "Imported 9 top level records..."
because the Countries form includes a Cities subform. Records were imported only into
the main form hence Top Level.
You can see this in the import spec (Figure 4) where only the main form elements are
marked with an "I". The subform elements Cities!City and Cities!Population are not
included in the import. If they were, Sesame would have intelligently imported the
data into the appropriate databases (assuming your Import spec was in accordance
with the import file.) For information on importing into subforms, see the Working with
Subforms section in this Guide.
342
12 IMPORT, EXPORT & COPY RECORDS
Import errors
If there are errors on importing, you will see a message like that shown in Figure 5.
In this case, you will want to view the error log. To do so, select Server Administration
from File menu on the main Sesame menu bar. You will be asked for a user name
(Login:) and password.
The login name is admin and the default password is hello. Both are case sensitive.
Once in Server Administration, click on the Logs tab and you will see a list of errors
and warnings. There will be a line in the log for each record in the import file that
generated an error and, because of that, was not imported.
This indicates that the Import spec did not match the import file with respect to the
number of fields.
Exporting Data
Exporting copies data out of Sesame for use by other programs or other Sesame
applications. Sesame exports ASCII files. ASCII files can be read by most other
programs. Sesame's ASCII export facilities are quite versatile you have a great
degree of control over the format of your export file. Like Import specs, export specs
can be saved and re-used.
343
12 IMPORT, EXPORT & COPY RECORDS
ASCII files often have text values (as opposed to date or numerical values) enclosed in
quotes. Or they may not. They might have all data values enclosed in quotes. You
have control of all of these settings when you export from Sesame.
A typical ASCII file in this case, one that has been exported from Countries.db
can be seen in the preceding Import section.
How to export
You export from a result set. The form can be open in Add Data or Search/Update
mode. The steps required to export are as follows:
1. Obtain a result set by running a search or by adding new records in Add mode.
2. Right-click the Spec Action bar, or use the Spec selector buttons (with the
arrows), to display the Export spec.
3. Select the layout element names that represent the fields you want to export.
4. For each element, specify the parameters if you want anything other than a
Standard ASCII export. (See Fixed ASCII Export and Truncating Values below,
for information on setting Fixed or Max for any element.)
5. Arrange the elements in the order you want them to appear in the output file.
(See Figure 6.)
344
12 IMPORT, EXPORT & COPY RECORDS
6. You can save the Export spec before or after performing the export. To learn
how to save and re-use specs, see Using the Spec Manager in the Mass Updating
section of this Guide.
7. Run the export in one of the following ways:
Select Export Data from the Results Commands menu. (See Figure 6.)
If the location for the output file is the same as for your Sesame applications,
type just the filename as shown in Figure 7. If the location is elsewhere, type
the full path and filename.
9. Click on Accept.
The data in the current result set is exported to an ASCII file in accordance with the
current Export spec. A message appears on the status line like this one:
The various options available on the ASCII Export dialog are covered below.
Using Sesame's default export settings, the ASCII file for the Export spec shown in
Figure 4 above will look like this:
"Afghanistan","Asia",657.000000
"Albania","Europe",29.000000
"Algeria","Africa",2383.000000
"Angola","Africa",1247.000000
"Argentina","America",2777.000000
"Armenia","Asia",
"Australia","Australasia",7687.000000
"Austria","Europe",84.000000
"Azerbaijan","Asia",
346
12 IMPORT, EXPORT & COPY RECORDS
Exporting does not alter your result set. It simply copies your data to an external file.
It does not change the current database.
ASCII options
Sesame is quite versatile when it comes to ASCII file export options. If you need
specially formatted output files, you can change your options at the ASCII Options
dialog. (See Figure 8.)
The Separator
The separator is the character that separates the data values in the export file. You
could say that it separates the "fields" in the export file, if that's how you like to think
of it.
347
12 IMPORT, EXPORT & COPY RECORDS
The default separator for a Standard ASCII file is a comma, hence the term "CSV file"
for Comma Separated Values a type of Standard ASCII file.
Should you require a different separator, you can select Custom Separation, then
specify the character in the adjacent text box. (See Figure 9.)
"Australia","Australasia",7687.000000
"Austria","Europe",84.000000
You can also specify No Separator. This is required for Fixed ASCII files with fixed
column widths. (See below). For Standard ASCII file export with variable "column
widths," No Separator would be an unusual option as it would join the field values
together into a continuous string.
348
12 IMPORT, EXPORT & COPY RECORDS
The Delimiter
It is common in Standard ASCII files to enclose text values in double quotes. The main
advantage of this is that data values can contain the separator character (usually a
comma) with no danger of them being interpreted as a field delimiter. The following
example illustrates this:
Without the quotes around the text values, there would appear to be two additional
fields, and the record would not be correctly imported by the destination program.
This Delimiter option lets you specify a double quote delimiter (the default), or no
delimiter.
Fixed ASCII files generally have no delimiters or separators. Should you require a
different delimiter, you can select Custom delimiter, then specify the delimiter
character in the adjacent text box. (See Figure 10.)
Figure 10. Here, "^" is specified as the Custom Delimiter, and Field Name Header has been
selected.
349
12 IMPORT, EXPORT & COPY RECORDS
Even if the intended destination program will ignore (bypass) a field name header,
including it in the export file can be useful, as it helps to identify the source and
structure of the data. It is also very helpful when using export to generate data source
files for use by external word processors and spreadsheets. For example, when
exporting a file for use by Microsoft Word as a data source merge file, a field names
header enables you to insert your merge fields in a letter or mailing label using a
convenient pick-list of field names.
"Country","Continent","Area"
"Afghanistan","Asia",657.000000
"Albania","Europe",29.000000
"Algeria","Africa",2383.000000
Sesame offers two options for changing the export file from the more typical Standard
ASCII type file to a fixed format.
The default is "Open" signified by an "O" in the element selector. The three settings
available in the Export spec window are shown in the following table.
F Fixed Fixed column width. Make the value the specified number of
characters in length. Truncate it if it exceeds that length. Pad it
with spaces if it is shorter.
Having selected an element for export in the Export spec window, you can change the
"O" default to "F" or "M" by clicking on the "O" alongside the element name. It toggles
between the three values. When F or M are set, an extra text box appears to the right
350
12 IMPORT, EXPORT & COPY RECORDS
of the element name where you type in the number representing the number of
characters you want. (See Figure 11.)
Figure 11. Setting Fixed and Max values when exporting data.
Note: Sesame will let you set a maximum export character limit for
number, date, time and currency fields. This may produce what you
want, such as just the year for a date field (max 4). But it could instead
produce results which are not meaningful. For example Max 3 of
$1,234.56 is "123"; Max 2 of 1.2345 is "1."
The following file structure has a fixed width of 14 characters for each data value, with
no separator or delimiter. It is a Fixed ASCII file:
This following file has a max width of seven characters for each data value, with a
comma separator and no delimiter:
Egypt,Africa,1002.00
El Salv,America,21.0000
Equator,Africa,28.0000
Ethiopi,Africa,1222.00
Fiji,S.Pacif,18.0000
Notice that El Salvador, Ethiopia and S.Pacific have been truncated, and that the data
is not aligned in fixed-width columns.
351
12 IMPORT, EXPORT & COPY RECORDS
You can mix Open, Fixed and Max within the same Export spec to produce the type of
export file you need to create.
Layout elements on the subform(s) appear under those of the parent form in the
format ParentFormName!SubformLayoutElementName, as shown for the Cities!City
subform in Figure 11 above.
"The most valuable sapphires have a medium intense, vivid blue color.
\nThe best sapphires hold the brightness of their color under all
different types of lighting.\nAny black, gray, or green overtones
mixed in with the blue will reduce a stone's value."
Export Limits
There are no limits on the number of fields, the number of records, or the total output
file size. There is a limit of 4Kb for a single field, in a single record. So if you have a
comments field and for one record there is over 4k of text in it, that will be truncated.
Copying Records
Sesame's Copy command allows you to copy selected forms (records) from one
Sesame form (database) to another. You can copy all the layout elements (fields) or
just selected ones.
Copy copies records into the current form from another open form.
352
12 IMPORT, EXPORT & COPY RECORDS
The form you are copying records from must be open in the Sesame
session and in the same application.
All records in the current result set in the source form are copied to the
destination form.
One new record is created in the destination form for each record in the
result set in the source form.
Q&A
Sesame's Copy command copies records INTO the current form from another
open form. This is the opposite of Q&A. In Q&A, you copy records FROM the current
database to the destination database. Q&A uses "field position numbers" on the form
to specify the matching fields in the destination database. In Sesame, the positions of
layout elements on the two forms are irrelevant.
How to copy
In the example detailed below, there are two databases in the application:
353
12 IMPORT, EXPORT & COPY RECORDS
1. Find the records you want to copy. Open the More Countries form in
Search/Update mode and run a search to obtain the result set you want. All the
records in the result set will be copied. Sorting is irrelevant.
2. Leaving the More Countries form open, click on the Application Menu tab.
3. Open the destination form Countries. You can be in Search/Update mode (in which
case the copied records are added to the current result set) or Add Data mode.
4. In the Spec window, use the Spec selector arrows to show the Copy Spec. You will
see a list of all the layout elements (fields) on the form and subform.
5. Double-click any layout element name. The Copy dialog opens. (See Figure 13.)
The destination elements and source elements are listed, but no matching has
been set up. You can change the source elements from the dropdown at the top of
the dialog.
6. Click on the Source dropdown. (See Figure 14.)
354
12 IMPORT, EXPORT & COPY RECORDS
Figure 14. The Source dropdown listing the valid source forms.
The source dropdown lists four forms in this case the two open main forms and
their respective subforms. When a form is open, its subform is open.
The mode for each form is also shown. As you might want to copy records within
the same database by having the same form open in Add and Search/Update
modes, having the mode shown allows you to work out which is which.
In this case the source is the More Countries form, in Update mode.
If the layout element names match, you can click on the Match Names button.
7. Click on the Match Names button in the lower part of the dialog. This matches
elements on the two forms if they have the same names. Having matched names,
you can make alterations later if you want you will see an example later. The
Copy dialog should now look like Figure 15.
8. Click on Close to close the Copy dialog. The Import spec now shows in the spec
window, as shown in Figure 16.
355
12 IMPORT, EXPORT & COPY RECORDS
The new records are copied to the database and are viewable immediately as part of
the result set in Update mode or as added records in Add mode.
356
12 IMPORT, EXPORT & COPY RECORDS
again will re-enable it, using the same matching. Whenever you open the Copy dialog
and close it, all matched elements are again enabled and included in the copy
operation.
357
12 IMPORT, EXPORT & COPY RECORDS
358
12 IMPORT, EXPORT & COPY RECORDS
XML Utilities
The Export Application to XML command is on the Application Utilities branch of the
Application Menu. After the Export Application to XML command is selected, a file
dialog appears to allow the user to select the filename of the file to be saved as XML.
XML Database
The XML Database command on the File Menu imports a XML representation of a
Sesame application. See the section: XML Database in the Data Management and
Manipulation section in the XML Utilities section for details.
The Export Design to XML command appears in Sesame Designer under the
Application branch of the Design Menu. After the command is selected, a file dialog
appears allowing selection of the filename for the XML file that will be created.
The XML file produced by Export Design to XML can be opened in Sesame Runtime or
Designer using the XML Database command from the File pulldown menu. Because it
excludes data, this command will produce an "empty" application containing only the
forms, reports, and underlying structural pieces that comprise the design.
359
12 IMPORT, EXPORT & COPY RECORDS
These commands can be used to copy Forms and Reports to different databases or
applications.
These commands appear in the Commands control panel when a form or report is
open in Design mode. A file dialog appears to allow selection of a filename for the
resulting XML file.
360
Section 13
Working with Subforms
Subforms are a way to view the records from a second database from the form of a
master database, so that you can see records from both databases at the same time.
The main form displays a record on the one side of the relationship, and the subform
displays records on the many side of the relationship.
A good example of this would be an Invoice form where each record is the invoice for
a customer, and the subform displays the individual line-items purchased on that
particular invoice.
A main form can have more than one subform. For example, a department can have a
subform listing employees in that department, and another subform listing cars in the
car pool for that department. Both these subforms are at the same level. For both of
them, the parent form is Department.
A subform can itself have a subform, or even multiple subforms. For example, a
company form can have a subform for departments, with the departments having the
employee and car pool subforms described earlier.
Subforms are dynamic you are not limited to just viewing your data. You can edit
data in a subform. You can delete records in a subform. You can add records in a
subform.
Using subforms
Most subform operations are the same as using a "regular" form. This section will
focus on describing the differences between using subforms and using regular forms.
Types of subform
There are two types of subform:
361
13 WORKING WITH SUBFORMS
bars are available to view other parts of the subform if the entire subform isn't
visible.
362
13 WORKING WITH SUBFORMS
Form Navigation
Once in the subform, you can fully navigate between elements with the keyboard, and
can navigate out of the subform with the Up Arrow key. You can also return to the
main form by clicking in any element on the main form. The Shift-Tab key will not
move you from a subform to the main form.
363
13 WORKING WITH SUBFORMS
Record-to-record navigation
When you are in a subform, the same rules apply to the set of subrecords as to a set
of main form records. F10 advances, F9 goes back, Ctrl-Home takes you to the first
record, and Ctrl-End takes you to the last record. You can also select these
commands from the Navigation menu.
When you are in the subform, the record navigation toolbar (See Figure 3) works as
usual on the set of subrecords, instead of the set of main records.
With a normal main form without a subform, it is simple. When you move to another
record your changes are saved. This "other" record can be a new blank record if you
are in Add Data mode, or another record in Table view, or another record viewed by
pressing F10 or F9 or using the navigation commands on the menu tree.
For a subform, the rules are somewhat different. The subform is a layout element on
the main form. The main form itself has to be saved, not just layout elements on that
form, even if one of them is the subform. So, as you work with subrecords in your
subform, you are saving them, but not completely. They remain unlinked to the parent
record (the main form) until you save the main record. The simplest way to do this is
to move the cursor to the main form, by clicking in it, for example, and then pressing
F10 or any of the other actions that will save the record.
There are some special keystrokes designed for working with subforms. These are:
364
13 WORKING WITH SUBFORMS
Shift-F10 Saves the record and subform records and closes the form.
Press F10.
Click on "next" button on navigation toolbar.
Select Advance Record from the navigation menu.
For a table-view subform these are:
Press F10.
Click on "next" button on navigation toolbar.
Press Down Arrow.
3. Enter the data.
4. Use any of the "Advance Record" techniques (F10 for example) to save this
subrecord and display a new, blank subrecord.
At this stage, saving your data is incomplete. As mentioned earlier, the subrecords are
unlinked. The main form record needs to be saved. If you click in the main form and
press Escape at this point you are warned that changes to this (main) record will be
lost if you continue.
To save the main record and all subrecords, do one of the following:
365
13 WORKING WITH SUBFORMS
and subform are set up using "natural linking," which is the default, rather than
relational linking.
Re-parenting
If using relational linking (matching fields) you can "re-parent" a subrecord by
changing the value it has in the field that links it to its parent record. If using natural
linking, there is no visible linking element, so you cannot re-parent the subrecord.
Orphan records
Thinking of the records in a subform as "children" and the record in the subform as a
"parent," you can open a form showing just the children the subrecords
themselves. The Cities form is an example. If you add records to the Cities form when
it is open by itself, either by typing the data in or importing, then these records will
have no parent. They will be "orphans." They will never appear in the subform of the
Countries form.
Deleting subrecords
This is exactly like deleting main form records. To delete the current subrecord, either
press F3 or select Delete Record from the Record Commands menu. A confirmation
dialog appears. Click Yes to permanently delete the subrecord from the database.
There is no undo when you delete a record.
Mass Delete
You can, in Sesame 2, use Mass Delete in a subform. Click in the subform first. You
will be shown a confirm box asking you to confirm deletion of n records, where n is the
number of records in the subform. Check carefully that this is correct, and you are not
about to delete parent records by mistake.
Note: Although the word "field" is used here, strictly speaking you are
manipulating data in a layout element on the form, not a field. A layout
element is a "container" in a form or report that displays the data in the
underlying database. The term "field" is commonly used in this context, and it
will be here too.
Editing data in a form-view subform is exactly the same as editing data in a regular
form.
366
13 WORKING WITH SUBFORMS
Editing data in a table-view subform is just like editing data in table view.
To replace the data in a field, click or navigate to the field. Press Enter or
double-click on the field contents. Type the new entry from the keyboard. The
original data will be replaced.
To edit the data in a field, click or navigate to the field. Press F6 to open the
expanded field editor and edit the data. Or, double-click on the field and use
the Arrow keys to move to the position where you need to start your edit.
Start typing. Text you type will be inserted into the existing text unless the
existing text is selected (highlighted), in which case what you type will replace
the selection.
Your changes to the field are saved when you move out of the field. Your changes to
the subrecord are saved when you move off the row the record is on using the Arrow
keys or by pressing F10 or F9 or clicking on another record in the subform. You then
need to save the main record.
As explained above, the subrecords are not yet saved. The main form record needs to
be saved. To save the main record and all subrecords, do any of the following:
Table view
If your subform is Form View (not table view) initially, then you can press Shift-F6 in
the subform to toggle the subform between form view and table view. See Using Table
View in the Adding and Editing Data section of this guide for details on using table
view.
Mass Update
You can mass update subrecords just as main form records. In the Spec window in the
lower left part of your Sesame screen, you can show the Mass Update spec for the
main form, or the Mass Update spec for the subform. The name of the form is shown
on the Spec Action bar. The list of layout elements is confined to those on that form,
not the main form and subform mixed.
When you run the mass update, the only records updated are the subrecords that
belong to the main form record you are currently viewing. It does not matter where
367
13 WORKING WITH SUBFORMS
the cursor is in the main form or in the subform you still get just that main
record's subform records updated, not all records in the result set.
In the example below (see Figure 4), just three records will be updated the three
cities of Egypt. This is despite the fact that the cursor is in the continent field in the
main form. The reason for this is that the mass update spec is for the subform Cities,
with programming attached to the City element.
Printing forms
Print Form(s), Print Form(s) to HTML (on the Printing Commands menu) always print
the main form only. What is printed is a "snapshot" of the main form. Any subform is
printed exactly as you see it on screen.
Searching
There are a couple of significant differences between searching a regular form, or a
main form, and searching in a subform. The syntax what you enter as criteria for
your search is identical. The differences are in the records that are returned.
368
13 WORKING WITH SUBFORMS
The Cities database contains 726 records. You can view just the cities by opening and
searching the Cities form itself, rather than the Countries form.
Performing the same search in the subform may produce surprising (yet correct)
results. If instead of searching the main form, you search the subform (see Figure 6
below), the results will be quite different.
The first record retrieved is Algeria, with the one city Algiers. When you click in the
main form, the record counter tells you that you are looking at record 1 of 22.
Advancing to the next record shows Australia with nine Cities (Adelaide, Brisbane,
etc.), followed by Belgium.
369
13 WORKING WITH SUBFORMS
What's happening here is that Sesame is retrieving exactly what you requested:
Belgium qualifies because it has the city Antwerp. It does not matter where in the list
of cities the qualifying record(s) are. There are 22 countries in the database that have
one or more cities beginning with the letter A.
Figure 7. Searching the Cities form. The first 15 of these are shown in
table view below in Figure 8.
370
13 WORKING WITH SUBFORMS
Produces a "No records returned by query" message on the status line. This might
seem to be failing to find records such as Albania and Cambodia. But this is correct.
What you are requesting of Sesame is:
For this search to retrieve any records, you would have to go to one of the cities
Vienna for example and clear the City field and save the record. The search would
then find Austria, because it would have a subrecord (the population is still in place)
with an empty City field. Searching for main records with no subrecords is not simple,
but it can be accomplished with special programmed retrieves. See "Programmed
Retrieves" in the Searching and Sorting section for information on these.
371
13 WORKING WITH SUBFORMS
Exporting data
The output file created by an export from a main/subform will depend on which fields
you include or more particularly, where you take these fields from: the main form,
the subform, or both. This is best illustrated by three examples using the Countries
form in the Countries.db sample database. In each example the result set used is the
same: Countries starting with the letter "A".
Here's an example. Look at Figure 9, along with the export file it generates shown to
the right of the figure.
"Afghanistan","Kabul",657.000000
"Albania","Tirane",29.000000
"Algeria","Algiers",2383.000000
"Angola","Luanda",1247.000000
"Argentina","Buenos Aires",2777.000000
"Armenia","Yerevan",
"Australia","Canberra",7687.000000
"Austria","Vienna",84.000000
"Azerbaijan","Baku",
In this example, fields are selected from the main form only one record per country.
372
13 WORKING WITH SUBFORMS
"Afghanistan","Kabul",2080000
"Afghanistan","Kandahar",0
"Algeria","Algiers",1650300
"Angola","Luanda",2094200
"Argentina","Buenos Aires",11624000
"Argentina","Cordoba",1434900
"Argentina","Rosario",1229800
"Armenia","Yerevan",1278700
"Australia","Adelaide",1115900
"Australia","Brisbane",1535300
"Australia","Cairns",0
Figure 11. Main form and subform fields "Australia","Canberra",0
exported. "Australia","Darwin",0
"Australia","Melbourne",3317300
In Figure 11, fields are exported from "Australia","Perth",1365600
both the main form and the subform. "Australia","Springwood",0
"Australia","Sydney",3985800
There is one record per city. In other
"Austria","Vienna",1610100
words, the information derived from "Azerbaijan","Baku",1214400
the parent form will repeat for each of
its child records included in the export.
Importing data
When importing an ASCII file into a Sesame main/subform the results will depend on
which fields are included or more particularly, where you take these fields from: the
main form, the subform, or both.
Like export, there is a single import spec for the main form and its subform, listing
fields from both. You can import into the main form, or into the main form and the
subform in the one import. This is a hierarchical import and is simple if the ASCII file
has the correct structure. If you export from a Sesame main/subform as in the third
example above (see Figure 11), then that export file can be imported into Sesame to
give you the correct results.
If you import just into the fields of the main form, you get new main form
records and no subrecords.
If you import just into the fields of the subform, the import will not work. You
cannot import into just the subform. If you import into the subform form itself
(such as Cities) you will make orphan records. You must import into the main
form, and have parent/child information in the import to establish correct
parenting.
373
13 WORKING WITH SUBFORMS
If you include fields from both the parent form and the subform, you will
create new parent records and associated child records.
The only scenario to be considered here is the third one. The first example is a
straightforward single-form import as covered in the Import, Export and Copy Records
section of this Guide.
A further example
The following example is the same as the third example of importing (above), but with
fewer records.
Here is the file to be imported:
"Afghanistan","Kabul",2080000
"Afghanistan","Kandahar",0
"Algeria","Algiers",1650300
"Argentina","Buenos Aires",11624000
"Argentina","Cordoba",1434900
"Argentina","Rosario",1229800
"Armenia","Yerevan",1278700
"Australia","Adelaide",1115900
"Australia","Brisbane",1535300
"Australia","Canberra",0
"Australia","Melbourne",3317300
"Australia","Perth",1365600
"Australia","Sydney",3985800
"Azerbaijan","Baku",1214400
It has 14 rows: 14 cities, in six different countries. The file has a field from the main
record Country, from the Countries database, and two fields from the subrecord
City and Population, from the Cities database. The import spec is as shown in Figure
12.
The result is six new countries, each with its cities three for Argentina, for example.
374
13 WORKING WITH SUBFORMS
If the rows of the import file were rearranged slightly, as below (the out of sequence
record is shown in boldface):
"Afghanistan","Kabul",2080000
"Afghanistan","Kandahar",0
"Algeria","Algiers",1650300
"Argentina","Buenos Aires",11624000
"Argentina","Rosario",1229800
"Armenia","Yerevan",1278700
"Australia","Adelaide",1115900
"Australia","Brisbane",1535300
"Australia","Canberra",0
"Argentina","Cordoba",1434900
"Australia","Melbourne",3317300
"Australia","Perth",1365600
"Australia","Sydney",3985800
"Azerbaijan","Baku",1214400
You would now get eight new main form records. You would get two Argentina records
one with the cities of Buenos Aires and Rosario, and another with Cordoba. You
would also get two Australia records one with the cities of Adelaide, Brisbane and
Canberra, and another with Melbourne, Perth and Sydney.
375
Section 14
Creating and Using Macros
A macro is a series of menu selections, keystrokes, and/or mouse clicks that have
been recorded, assigned a name, and saved. When the macro name is called, the
macro is "played back" that is, the steps in the macro are executed from beginning
to end just as if you were performing those steps manually.
Macros can be recorded and played back both in Sesame runtime and in Sesame
Designer.
Macros are used to shorten long menu sequences as well as create "miniature
programs" within an application.
Sesame uses a simple event recorder to record and playback macros. Macros are
literally the events being sent to Sesame from the keyboard and mouse, recorded to
your computers memory. On playback, those same events are sent back to Sesame
as though they came from the keyboard and mouse. Sesame runs in a graphical user
interface, rather than a text screen, so elements may be moved, resized, or otherwise
rearranged at a very fine level of detail between the time when the macro was
recorded and when it is played back. To compensate for this, when it can, the Sesame
macro recorder also records the "names" of objects. These serve as further guides to
the playback system as it attempts to send the correct events to the correct
application elements.
Since the macro recorder is a simple event recorder context is very important. For
reliable operation, Sesame must be in the same state when the macro is played back
as when it was recorded. If, for example a macro is recorded from an ordinary form,
but is played back with the Table View on the screen, the Table View will receive all of
the events that were intended to go to the form. For this reason, it is advisable that
macros be used for short generic sequences of events. For more control of complex
events, Sesames programming language offers a wide range of automation
commands, including the ability to launch macros. See the Sesame Programming
Guide for more information.
Q&A
Unlike Q&A, Sesame can playback only the current macro. Multiple
macros are not maintained in a single file. There is no limit as to how
many you can have, but they are loaded individually prior to running
them. Only one macro can be current at any one time. If there is a current
macro already loaded or recorded and you choose to record or load
another macro, the currently loaded macro is replaced. Unless you choose
to save your new macro using the same filename, the original macro file is
left intact and can be reloaded.
377
14 CREATING AND USING MACROS
Recording a macro
To begin recording a macro, select Macro/Recording On from Sesames main menu
bar. The record function is available at all times except during macro playback. You do
not need to have an Application open to begin recording. (See Figure 1.)
While recording, the Macro indicator on the main toolbar turns white and displays the
message Recording. The indicator also shows the cumulative number of events
recorded by the macro. (See Figure 2.)
378
14 CREATING AND USING MACROS
To turn off recording, select Macro/Recording Off from the main menu bar. This
command is available only while the macro is recording. The Macro indicator displays
"Unnamed." This indicates that you have an unnamed macro currently loaded. (Refer
to later section on saving and naming a macro.)
Note: Be sure that your macro has been carefully tested before using repeated
playback. Also ensure that it returns to the initial starting condition for the macro.
379
14 CREATING AND USING MACROS
Loading a macro
To load a macro file, select Macro/Load Macro from the main menu bar. Navigate to
the directory where your macros are stored and select the macro file from the list of
macro files. Only macro files and directories will appear on this dialog. The macro will
380
14 CREATING AND USING MACROS
not commence until you select Playback or press F2. The Macro indicator shows the
name of the currently loaded macro.
Load Macro is an available option while a macro is being recorded. This gives you the
ability to "nest" already recorded and saved macros in the middle of the macro you are
currently recording. If a macro has a nested macro recorded within it, the nested
macro will load and play back when the macro that recorded the "load event" is played
back. In this case, and only in this case, playback is automatic after a load.
Macro files
Sesame can playback only the current macro. Only one macro can be current at any
one time. If there is a current macro already loaded or recorded and you choose to
record or load another macro, the currently loaded macro is overwritten. Unless you
choose to save your new macro using the same filename, the original macro file is
unchanged.
Programming does have a limitation in that it cannot run unless contained within a
Layout (a form in a database). This means that you must run a macro if you want to
automate the opening of another form.
The best way to achieve this is to record a macro and save it. Then launch that macro
from a program using the @Macro command. If the macro closes the current form, the
@Macro call must be the last command in the program. For details on @Macro and the
other programming commands referred to above, see the Sesame Programming
Guide.
Each line in the macro file represents a single event in the Sesame user interface. A
typical, though very short macro file would appear as:
381
14 CREATING AND USING MACROS
MACRO HR
PUSH 13 16 16 45
ENTER 10 14 16 45
RELEASE 10 14 16 45
ENTER 21 28 24 57
ENTER 20 1 26 60
PUSH 37 26 43 85
RELEASE 37 26 43 85
MENUBAR SELECT &Open Application...
ENTER 40 56 43 85
LEAVE 117 142 120 171
ENTER 1 104 124 175
PUSH 105 236 228 307
RELEASE 105 236 228 307
TREE SELECTION Countries.db
ENTER 225 278 228 307
KEYDOWN 65505
SHORTCUT 65505
KEYDOWN 65471 SHIFT
The macro listed above clicks on the "File" pulldown menu button, selects the "Open
Application" item from the pulldown and selects the "Countries.db" application from
the subsequent file selection dialog.
To distinguish the human readable macro files from the older binary macro files, the
first event in a human readable macro file must be "MACRO HR".
Series Counter
Pressing CTRL-F2 inserts a counter value into the "keyboard stream" just as though
the user had typed the number. After the number is inserted, the number is
incremented. It is available in both Sesame Runtime and SDesigner. It is used to
"type" a value that changes every time it is used. The settings for this feature appear
on the Macro menu, but its use is not limited to macros. You can use this to number
lines in a Multi-Line Notes field or to sequentially number records during data entry. In
macros, for example, you can use this in SDesigner to quickly create ten elements
numbered Phone1 through Phone10.
The Series Counter value is retained for as long as the Sesame client is open, even if
you switch forms or open a different application. When Sesame is opened, the Series
Counter for that session is set to the default of 1.
To set the starting value, select Macro / Set Series Counter from the main menu. See
Figure 6. Enter the new starting value in the small dialog box that appears. The value
can be inserted in any of four supported formats by selecting the appropriate choice
from the Macro / Set Series Format pulldown menu, as shown in figure 6.
382
14 CREATING AND USING MACROS
Digits as Needed (Default) Inserts as many digits as are needed to fully express
the number.
383
14 CREATING AND USING MACROS
Macros can be run directly from this list. Selecting a macro name from the Macro
menu both loads AND runs the macro as though that macro was loaded and the user
selected Playback (F2).
When you exit Sesame runtime / Sesame Designer the macro list is cleared.
Macros loaded by calling @Macro or @DeferredMacro are not added to the menu, in
that they might be sensitive to security and should not be seen by the user.
384
Section 15
Designing Reports
Introduction
A report is a way to view data from multiple records in a grouped format that shows
relationships. Reports can provide much more information than just viewing the
individual records that make up a report.
For example, you might want to display a list of customers who still owe you money,
along with the amount each owes. Or you might want to see a list of all your friends
whose birthday falls in the following month, along with the date their birthday falls on.
When you design a report, you need to tell Sesame what information you want to see
and in what order to present it. You can then view the report on-screen and optionally
print it to paper, send it to an associate, or even open it in another application. You
design a report as a part of a specific database.
1) You can create and print 'Quick Reports' while you are working with your data in a
Sesame application. Quick Reports are limited to simple columnar reports but have the
ability to sort, break on values, and do summary calculations. They can be used on a
temporary basis only or you can save them for use in later sessions. See details in
Designing and Using Quick Reports on page 386.
2) You can use Sesame's Report Wizard to design permanent reports in the
Sesame's designer mode. For the beginning report designer, the Wizard will walk you
through the steps of creating a new report with point and click simplicity. Answer a
few questions and the Wizard will create your report design. Once the Wizard is
complete, you can modify and enhance the resulting design using any of Sesame
designer's report features. Once saved and reconciled, these reports become a
permanent part of your application and can be run whenever you are using your
database. See details in Using the Report Wizard on page 412.
3) You can use the Sesame designer to manually design and control a report through
all phases of the process. This mode gives the designer 100% control of the design
from start to finish. Once saved and reconciled, these reports become a permanent
part of your application and can be run whenever you are using your database.
With the second and third methods, the reports you create are stored with the
database for which they were designed. This is also an option for the Quick Reports
method. Any time you retrieve a set of records from that database, Sesame will show
you a list of available reports for it whether they were created with Sesame designer
or saved as a quick report. Those reports designed in Sesame's designer module will
385
15 DESIGNING REPORTS
appear on the menu tree while saved Quick Reports will appear in the Spec manager
list of saved specs.
Unlike regular Sesame reports they are not created in the report designer. They have
access to a set of commonly used report features that can be manipulated by the user
for creating quick looks at summarized data.
They do not have separate attached sort or retrieve specs as they use the current
result set in the current sort order.
While Quick Reports can be created and saved for both main and sub forms, you
cannot build a hierarchical report/subreport with them. Quick Reports use default
fonts, headers and footers which are automatically selected by Sesame based on the
columns appearing in the Report.
The Quick Report Spec found in the Spec Window quadrant of Sesame in the lower
left-hand corner of the screen.
Like the other specs, the user is presented with a table list containing all of the
elements available on the form. Clicking on an element name selects it to be included
386
15 DESIGNING REPORTS
in the report. The order the elements appear in the list is the order the columns will be
presented in the final report output. You can change the order of the elements in the
report by dragging them up and down with the mouse or selecting one and moving it
with the Shift-Arrow keys.
The second column lets you set a report 'break' on the specific element which allows
the report to group data and perform operations based on that grouping. Repeated
clicking to cycle through the break options button presents the choices:
" " (blank) for no break
"B" for break on value change
"A" for an alphabetic break
"Y" for a year break
"M" for month break
"D" for day break (1 day)
The third column allows you to set a summary calculation on the specific element both
on a break (if specified) and as a grand value at the bottom of the report. These
summaries will appear under the appropriate column. The various choices for
summary, selected by clicking or cycling through the calculation button, are:
" " (blank) for no calculation
"S" for sum
"A" for average
"C" for count
"H" for high
"L" for low
"M" for median
"D" for standard deviation
"V" for variance.
The fourth column is the name of the element to be used in the report.
The fifth is where you can type in a number to control the width of the specific column
in pixels. If a width is not specified, Sesame will automatically size the column based
on the data it contains and the available page width. If your columns are too close
together, you can use this feature to increase the space between them.
The report spec shown in Figure 1 above will list Companies, sorted by State and then
Company (records were sorted that way), Last Name, and Currency. It will count
Companies whenever the State breaks and sum the currency values at the same break
point. At the bottom of the report will be a grand count and a grand total. The State
field was made wider to provide more separation between it and Company.
387
15 DESIGNING REPORTS
When setting column widths in a print only report, make sure that your report will fit
the width of your page. Specified widths in a print only report may not allow the
columns to all fit on the paper size specified. If only some of the columns are assigned
widths, those that have not been assigned will attempt to adapt their widths to cause
the report width to fit the width of the entire page. If the print only report columns are
too widespread across a page you can also use the column widths to solve this
problem.
Quick report specs can be saved and loaded utilizing the Spec Manager window (Alt-
F8). The Spec Manager window can also be opened directly from the Quick Reports
dropdown menu by
selecting Save or Load.
Note: If you save a Quick
Report, make sure to
create a new designer file
from your active database
the next time you make
design changes to make
sure your designer file
includes your saved Quick
Reports (as is true with all
saved specs).
Saved Quick Report specs can be run in programming using the command
RunQuickReportSpec(). If you do this make sure to have loaded and run the correct
retrieve and sort specs for your records.
389
15 DESIGNING REPORTS
Full-Feature Reports
This section will deal strictly with reports you create with Sesame's designer module
without the use of the report wizard.
Columnar Field data from multiple records presented in separate columns where
each line represents a single record. The data from the individual fields in each record
are aligned in columns. The rows can include calculations based on summaries or sub-
summaries of data in the records.
Freeform Field data from multiple records presented in a paragraph style where each
paragraph represents a single record. Freeform reports allow you to place elements
just about anywhere on the page. In a freeform report the data displayed in each
element is placed sequentially, one after the other, instead of in columns. Sesame
Report Writer uses elements like static text, static pictures, line breaks, horizontal
lines, and spacers to allow you to structure your reports almost any way you want
them to appear.
Keyword Reports - Field data from multiple records presented in separate columns
where each line represents a single record sorted and broken by the values of data
stored in keyword fields. See the section on Breaks below.
Any report is based on, and generated from, data retrieved from a database prior to
running the report (the result set) or from data retrieved by the report itself due to an
attached retrieve specification.
Your reports are created and previewed in Designer as part of the application.dsr file
using DSR data rather than actual application data. All modifications (redesigns) to
390
15 DESIGNING REPORTS
reports are done in the Designer module. After you are satisfied with your report
design, you reconcile the design back to the actual application in order to make the
report a permanent part of your application.
Once a report has been designed and reconciled to a Sesame application, you will
have control over:
Which records are used and the order in which they are included in the report.
Whether to print to a printer or preview the report on-screen.
Whether to use the report output in other applications.
Begin your report design by selecting Add New DatabaseName Report from the
designer Reports menu.
A dialog will open asking you to name your report. Type a name and click on OK.
Designer's report layout screen will then be opened. The report writer is divided into
separate sections in which you will create the different parts of your report including
your data, the headers for the data columns, summary calculations such as sub-totals
and totals, averages, counts, etc. See Figure 8.
391
15 DESIGNING REPORTS
Report writer's default is set for use as a columnar report designer. It will produce
reports structured like the one shown in Figure 9 on page 393.
The Report Writer main working screen is initially displayed as nine separate sections,
each represented by a column. Each of these sections can be opened or closed by
clicking on the panel to the left of the label. Clicking on will close a section, while
clicking on will open a section.
The orientation of the design layout is horizontal so that the elements of the report
design appear in the same order as they will in the final report output. i.e. the headers
are above the data and the footers appear below the data. The report and view
headers are above the group, or column, headers and the view and report footers
appear below the group, or column, footers.
392
15 DESIGNING REPORTS
1. Report Header This section determines what will appear at the very top of the
Report.
2. Page Header This section determines what will appear at the top of each page.
This section will normally start in a closed mode. HTML does not respect the
concept of individual "pages," so elements placed in this section may not behave
predictably.
3. View Header This section determines what will appear above the data in each
separate view in the report. (See report views later in this section).
4. Group Header This section determines the headers that will appear above the
data displayed in the group body.
393
15 DESIGNING REPORTS
5. Group Body The section where the elements that repeat for each record in your
result set, are laid out in the order they will appear in the final report.
6. Group Footer This section determines what will appear below the data displayed
in the group body, including subtotals, counts, and the like.
7. View Footer This section determines what will appear below the data in each
separate view in the report body (See report views later in this section).
8. Page Footer This section determines what will appear at the bottom of each
page. This column will normally start in a closed mode. HTML does not respect the
concept of "pages," so elements placed in this section may not behave predictably.
9. Report Footer This section determines what will appear at the very bottom of
the report.
On the left of the Report Writer screen is the Control Panel section containing the
following tools:
394
15 DESIGNING REPORTS
Message Log The panel that displays any applicable messages to you as you
perform actions during the design process.
Below the Control Panels are the program tabs that allow navigation between all
currently open design tabs. They display the names of any reports or forms open for
design or redesign.
Figure 11. Tabs describing different open tasks with the name of the report being designed or
redesigned.
You have the ability to work on more than one report at a time. The tab interface will
allow you to track where you are, and enable you to easily move from task to task.
Certain tasks, such as setting Application Options, require that other design tabs are
closed first.
395
15 DESIGNING REPORTS
Columnar reports
When you start a new report, there is an empty row for each section of the Report.
Sections can be opened and closed using the button to the left of each section.
Basic design
There are a series of steps required to
layout a basic columnar (Table type)
report.
Make the Group Body section active Figure 12. Tooltip on View Header Row
as indicated by background color and
highlighting by clicking in the row. This is the basic area of a report where you will
place your data. When elements are added to a report they are placed in the active
section.
Group Body where the layout elements will be listed in the order you want
them to appear on the report.
Group Header where you will specify the headings for each of your columns
of data. The header titles are placed in the same order as their corresponding
layout elements in the Group Body. This is also where you specify whether you
want borders around your report data by clicking on the section label, and
selecting the size of the border. A size of "0" sets no borders.
Group Footer where you will place the summary calculations for the data in
your columns. The calculation elements are placed in the same order as their
corresponding layout elements in the Group Body.
In columnar reports, the three sections listed above work together to ensure that the
column headers, data, and footers line up with each other. If either Group Headers or
Footers are used, make sure that you place the same number of elements in the
Group Header and/or Group Footer sections as appear in the Group Body section.
396
15 DESIGNING REPORTS
This sample report will use the Company, Firstname, Lastname, Position, and Currency
fields and will be called Customer Amount Owed.
1. Select the Group Body section. (Click in the row with your mouse.)
2. From the Layout Element Adder control panel, in the Select Element Type,
choose Value Box.
3. In the Bind Element To, select Company. (A list of all the fields in your
database will be presented here.)
4. Click on Add Element To Report. You do not have to give it a name. Report
Writer will assign it a sequential layout element number.
Figure 13. Adding a layout element "Company" as a value to the group body.
A new report element will appear in the Group Body section. If you have made an
error, any element can be removed from the report layout by selecting it and pressing
your Delete key.
397
15 DESIGNING REPORTS
You can see all the properties of each report element in the Property Viewer. Each
element shows either two or three pieces of information about itself.
Value Box (Blue): Value (data from your records or the result of a
calculation).
Repeat steps 1 through 4 above until you have added the layout elements for
Firstname, Lastname, Position, and Currency to the Group Body section. (See Figure
14.)
398
15 DESIGNING REPORTS
Figure 14. All of the elements added to the group body section.
Figure 15. Complete column titles using the Group Header Section
399
15 DESIGNING REPORTS
Figure 16. Spacing the footer for Summary Calculation to line up with the Amount data.
8. With the Group Footer section still selected, from the Select Element Type
dropdown list, choose Summary Calculation / Sum.
9. From the Bind Element To dropdown list, select LE4. (It will be the only selection
available because there is only one element that can be summed.) LE4 is the
Report Writer assigned name for the Currency layout element. (See Figure 17.)
Note: Any element can be removed from the report layout by selecting it and
pressing the Delete key.
400
15 DESIGNING REPORTS
Element Selection
Multiple elements can be selected by:
1. Holding the shift key and clicking on multiple elements
2. Selecting one element and using Shift-Arrows to select adjacent elements, even in
different rows such as headers, body, and footers all at the same time.
3. Using the Advanced Element Selector to select multiple elements based on similar
criteria. See section on Advanced Element Selector Control Panel.
Element Movement
Any single selected element it can be moved by holding down the mouse button and
dragging it to a new position, even into different groups. It may also be moved, even
between groups, by holding the Ctrl key and using the applicable arrow keys.
Multiple selected elements can be moved, even between groups, by holding the Ctrl
key and using the applicable arrow keys.
Changing properties
To make your design more complete, you will want to change some of the settings
that are the result of a simple basic design. You can change the fonts, add a report
header and footer, and so forth. You do these tasks using additional sections and the
Property Editor and Property Viewer.
To add a report header, you use the Report Header section. In a report with only one
view, the View Header and the Report Header sections are essentially interchangeable.
Click on the Report Header section to select it.
401
15 DESIGNING REPORTS
Add a static text element with whatever title you want to appear on your report.
Figure 20. View header. Setting Headers to BOLD using Property Editor and Property Viewer.
402
15 DESIGNING REPORTS
As with Sesames Form Designer, the active element drives the Property Viewer. The
active element is also the one that can be moved, relative to other elements in the
section, using the keyboard or mouse.
As in Figure 20 above, setting the report column headings to be bold is just one
example of what you can do to enhance your reports. Details of all the options and
capabilities of the Property Editor are covered in the section of this Sesame User Guide
on the Designer module.
With some other changes made in Property Editor, such as setting the Group Headers
and Summary Calculations to bold, your final report can look like the one shown in
Figure 21 below.
Preview mode
If there is data in your designer file, you can preview your report design with one click
on the Preview Report choice in the Commands section of the report designer. Sesame
will select approximately 50 records to use as a preview.
Fonts/Colors
You can use the Property Editor to change the fonts and colors of the printed output as
well as the display format of the data to be included in the output (Number, Money,
Date formats). Exact procedures for using these features of the Property Editor are
covered in Property Editor in the Designing a Sesame Application section of this guide.
Breaks
If you set a group in a Table report to
Break on Keyword element, Sesame
produces a Keyword report. Sorting and
breaking the records by the values in that Figure 22. Ignore Blank Values in
Summary calculations
keyword field.
404
15 DESIGNING REPORTS
No Repeat option
Using the multiple breaks feature, you can break on an element and click on the "No
repeat" box to tell Sesame to only print the break value for the first record in the
group.
Scrolling
Report Designer scrolls on drag. If you are dragging an element past the end of the
visible screen, the screen will scroll with you to allow you to complete your
movements.
Printing Options
When your report designs are completed and are put into use in the Runtime module
of Sesame, you will have the multiple options when you select a report to print.
HTML Preview Prints the report to your browser for your follow up actions. It
also writes an HTM file copy of the report to disk.
HTML Immediate Prints the basic HTM report to the printer with no preview
in the browser. It also writes an HTM file copy of the report to disk.
Print Only Preview - Prints to the printer with no HTM disk file. This option
gives you a series of printer options to choose from and also opens a window to
preview what the report will look like before printing.
Print Only Same as Print Only Preview without the preview window. After
setting the printer options the report is sent to the printer.
Freeform Reports
A freeform report includes layout elements that are placed on the final report in a
structured, continuous mode rather than in aligned columns. In a freeform report you
can have elements like static text, static pictures, line breaks, horizontal lines, and
spacers. You can structure your report to print in almost any structure you desire.
Basic Design
The steps required to layout a freeform report include:
405
15 DESIGNING REPORTS
Most freeform reports will have at least two or maybe three sections:
Group Body where the layout elements will be listed in the order you want
them to appear on the report.
Group Header where you will specify a heading for the data to be printed in
your report.
View Header or Report Header where you can place a title to appear at the
top of your report.
This example will use the SalesPerson, CallDate, Call Time, Company, Appointment
With, and Comments fields in the report design.
1. Select the Group Body section. (Click in the section with your mouse.)
2. From the Layout Element Adder control panel, in the Select Element Type,
choose Static Text.
3. In the Name box type Sales Person:
4. Click on Add Element To Report.
5. In the Select Element Type dropdown list, choose Value Box.
6. In the Bind Element To dropdown, select SalesPerson from the fields list.
406
15 DESIGNING REPORTS
7. Click on Add Element To Report. You do not have to give it a name. Report
Writer will assign it a sequential layout element number.
8. In the Select Element Type dropdown list, choose Newline.
9. Click on Add Element To Report.
Note: Any element can be removed from the report layout by selecting it and
pressing the Delete key.
Figure 25. Working with report sections to create a freeform report. Each element will appear
directly after (next to) the one above it in the section. Line Break elements move the data to the
next line.
You have just created a basic freeform line that will appear in the final output like this:
This is the structure behind freeform reports. Layout elements placed in the Group
Body section are strung together, one after the other. You utilize the available static
elements and page layout elements to separate them and make them readable as
output.
As you can see in the table below and in the sample report in the Schedule.db
application, this structure is repeated using sets of static text, followed by a value box,
and then a newline until the report design is completed and all of the elements
required in it are included (CallDate, Call Time, Company, Appointment With, and
Comments).
All the entries for the Scheduling Report are shown below. Layout Elements are shown
in italics. Data Values are Underlined.
407
15 DESIGNING REPORTS
View Header
Static Text - Your Appontment
Group Header
Static Text - Below is Your Schedule
Group Body
Static Text - Sales Person, Value - SalesPerson, Line Break, Static Text Date:, Value
- Call Date, Line Break, Static Text -Time:, Value - Call Time, Line Break, Static Text -
Company:, Value - Company, Line Break, Static Text - With:, Value - Appointment
With, Line Break, Static Text - Notes:, Value - Comments
In addition, static text elements are added to both the Group Header and View Header
to place title lines in the report. The Property Editor was used to enhance the header
and static text fonts. The result is a final design that creates the report shown below.
408
15 DESIGNING REPORTS
You can combine both types of reports (freeform and columnar) in one design. Report
writer allows you to have multiple views of your data in the same report. You can
change the type of report format, from view to view, so that you can create a list
(table) in a columnar format for easy reading and review, with a set of full page-width
notes (freeform) appearing below the list.
Basic design
The examples presented in this section are based on the freeform report, Combination
Schedule that youll find in the Schedules.db sample application provided on the
Sesame CD.
This example will use the SalesPerson, CallDate, Call Time, Company, Appointment
With, and Comments fields in the database.
Creating a combination report requires the creation of multiple views in a single report
design. The steps to accomplish this are as follows:
1. Design the first view (Columnar or Freeform) as covered in the previous sections,
and add all of the layout elements needed. If you need to modify this view, you
can come back to it at a later time.
2. Open the Report Section Properties editor for the View Header by clicking the
section label and select Add New View After This View (or Before as needed) from
the View Management dropdown. (See Figure 27.) Click on the Perform Selected
Action button and then OK. A new view, with a complete set of sections, is added
to the report layout. The columns for this view appear after the View Footer
section for your initial view.
3. In the second Views set of columns, click on the View Header title and set the
View Type for this view to be different from the first view (in this example,
Freeform). (See Figure 28.)
In the columnar (table) view, you will use SalesPerson, CallDate, Call Time, Company,
and Appointment With fields. Also, add a Line element to the first report View Footer.
In the second view the freeform view you will use Static Text elements and the
Value Box elements Company and Comments. Note that Report Writer allows the use
of multiple layout elements bound to the same field, in this case, Company.
410
15 DESIGNING REPORTS
411
15 DESIGNING REPORTS
Sesame's Report Creation Wizard creates columnar reports in the Sesame design
module by prompting you for your report requirements. When the Wizard is complete,
you wind up with a final report or one that you can go on to modify further. The
Wizard is accessed by selecting Reports ! Design/Redesign a Report ! Database Name !
Report Creation Wizard from SDesigner Design Menu. You will be presented with a
series of dialogue screens that, when answered, will build your report in the database.
The opening screen will request a name for your report. Fill it in and click Next.
The next screen will show a list of all of the fields in your database and allow you to
select the ones you want in the report. The available list appears on the left and the
selected list on the right. You can select fields one at a time by clicking on an field
name and then on the right pointing arrow in the middle of the screen. You can also
select multiple contiguous fields from the list by clicking on the first one and, while
holding down the shift key, clicking on the last one you wish to select. You can select
non-contiguous fields from the list by clicking on the first one and, while holding down
the control key, clicking on the other(s) you wish to select.
You can either select the fields in the order you wish them to appear in your report or
you can use your mouse to change their order, once selected, by clicking and dragging
them to different positions in the right-hand window.
412
15 DESIGNING REPORTS
If you want to remove a field from the selected list of columns, click on it in the right
column and then click on the left pointing arrow in the middle of the screen. You can
use the shift or control key to select multiple fields with the mouse.
The third Wizard screen gives you the ability to select what fields you want to sort
your report by and whether you want to group them by creating a 'break' in these
values. When you break an element, you can also perform calculations like totals and
subtotals on that break. The Wizard will allow a sort on any value in the database it
does not even need to be included in the data shown in the report.
When you click in a sort dialogue (First, Second, Etc), a list of the fields will be
presented. After selecting an field from the list, you will be given a chance to select
the order of the sort by clicking on Descending or leaving it blank (Ascending). You will
also be able to select whether you want to break on the selected element by clicking in
the Break box.
If you select Break, you will also be able to select the characters on which you want
the break to occur. Leaving this block blank will cause a break to happen on a change
in the first character of the element's value. If you select a Date field to break on, you
413
15 DESIGNING REPORTS
will be allowed to break by day, month, or year. If you select a Number or Money field,
you will be allowed to select the amount to determine the break.
Once you complete your selections, another dropdown will appear to allow you to do
the same things for another field.
When you have completed selecting all of the fields you wish to Sort by and Break on,
click on the Next button.
If you have selected to break on an field that can be totaled, the Wizard will next
present you with the Totals and Subtotals screen that will display each of these fields
in a separate row. Selecting Subtotal will create that total each time the field selected
for breaks change their values. Selecting Total will create a grand total at the end of
the report.
The Wizard will then either allow you to generate the report by clicking on a Generate
button or allow you to go back and review the choices you have made.
414
15 DESIGNING REPORTS
If you are finished and generate the report, the Wizard will ask if you wish to create
another report. If you answer yes, you will give the report a name and repeat the
process above for the new report. If you answer no, the Wizard closes and your report
will be opened in SDesigner.
The Wizard lays out the report with the correct amount of Group Header/Footer sets to
accommodate your selected breaks and totals as well as spacers to ensure correct
placements of your totals and subtotals.
At this point you have the full capability of SDesigner to make any additional changes
you require in the report such as:
415
15 DESIGNING REPORTS
At this point, you can also Preview your report design from the Commands Control
Panel.
The report will present the records you retrieved (the result set) in the order you
sorted them.
Report Writer allows you to attach previously saved sort or retrieve specifications to
your report design. Any spec that has been saved in the database can be used in
Report Writer.
Attached specifications take precedence over any retrieve or sort you used to get your
current result set. If there are both retrieve and sort specs saved with your report, any
416
15 DESIGNING REPORTS
result set (retrieved records) you obtain in Sesame will be ignored by the report when
run. If only a retrieve spec is attached, the report will override only the current
retrieve, If only a sort spec is attached, the report will override only the current sort.
It is recommended that you attach sort specifications to the report design, but that
you leave the retrieve specification out. This way, your result set of records will be the
ones included in the report in the attached sort spec order and it will be easy to
run the same report against any result set.
Note: Attaching a saved spec makes a copy of that spec in your report. Later
changes made to the original saved spec will not affect the report design.
Follow these steps to attach a sort or retrieve spec to your report design:
1. Select Attach Specs from the Commands Control Panel.
2. Using the Attached Specs Editor that opens, select:
The type of spec to apply.
Whether to keep the current spec or attach a new one.
The specification name from the list of those saved in the database.
3. Click on Attach.
Figure 36. Attaching a previously saved Sort specification to the report. This will override any
sort performed in Sesame.
417
15 DESIGNING REPORTS
Saving a report
When you have completed your report design, you must save it before you can
preview or use your design in a Sesame application. When you have saved your work,
you will see a message to that effect in the Commands / Message Log.
The process of saving a report is to click, in the Commands control panel, on Save
Layout Design. The screen will flash momentarily, or present a progress bar, and the
"Layout Saved" message will appear in the message log panel.
While working on complex report designs, it is a good idea to save your work
regularly.
Previewing a report
When you are finished with your design or at any intermediary stage if you want to
see how it is going Report Writer will allow you to save your work and preview the
report. The preview will only include records that were in the DSR file when it was
opened, or have been added to the DSR in Preview Mode. You can preview the report
by opening your entire design in preview mode or get a quick look by clicking on
Preview Report in the Commands section of the control panel. Sesame will select
approximately 50 records to use as a
preview.
Preview mode operations are exactly the same as they are in any Sesame application.
For information on specific functions / operations, see the applicable section of the
Sesame User Guide.
In order to preview your report, you first need to retrieve a set of records (result set)
against which you want your report to run.
418
15 DESIGNING REPORTS
On the Preview menu, open the applicable database in Search /Update mode.
1. Retrieve the
records you wish
to include in your
report.
2. Double click on
Reports/Name of
Database until
the vertical scroll
bar expands.
HTML Preview Preview the report in your browser, save a copy to disk,
and let you print from the browser.
HTML Immediate Saves a copy of the report to disk and opens the Windows
printer dialog without displaying in your browser.
Print Only Preview Previews the report in a separate window but does not
save a copy to disk or open in the browser.
Print Only Opens the Windows printer dialog, does not save to disk
or preview the report.
419
15 DESIGNING REPORTS
Figure 39. Opening Reports list with horizontal and vertical scroll bars.
Reconciling a report
Your report has been created, or redesigned, in Designer and, once saved, is part of
the DSR file. When you have finished your design and have previewed it to make sure
that it is what you want, you must Reconcile your design back to the active
Application. Until then, it will not be available to you in your actual Sesame
application.
For steps and information about reconciliation of DSR files to DB files, see the section
on Reconciling Designer Changes in the Designing a Sesame Application section of the
Sesame User Guide.
420
15 DESIGNING REPORTS
Layout view is the normal working mode during design. Format view shows the
elements with sample data. In Format view, the sample data is displayed with the
correct setting for color, font, alignment, format, and so forth, applied. In Figure 41,
you can see that all the elements in the Group Header are in boldface text. The date
and time formats are also displayed. In this view, selection is indicated by the
background color, so that the correct font color settings can be displayed. Each
element has colored bars indicating its type, for reference (Static Gold, Value Blue,
Page layout element Gray, Summary Purple).
Sesame reports can have as many breaks as are required for your sub calculations.
421
15 DESIGNING REPORTS
Break elements are set in the Group Headers. The break element is set by clicking on
the Group Header title. This will open the Report Section Properties dialog.
Set the Break Element to the layout element that controls the subtotals (State, in this
example), and set the Break Value to control the actual break. The tooltip that opens
over the Break Value number will give you details on the Break Value setting.
In this case, the Break Element is set to State. The Break Value is 0. This will cause a
group break each time the State changes, and will generate sub totals, sub averages,
or sub counts, as the case may be.
422
15 DESIGNING REPORTS
If you need to create a group break based on the value in more than one element, you
can add an additional Group Header/Footer and repeat the above steps. You can add
as many groups as you need to your reports. To add a new set of header/footer, click
on an existing Group Header to open the Report Section Properties Window. In the
Group Management section drop down the action window and select where you want
the new group added.
Note: Keep in mind that adding a group refers to placement of the Group Header
so, placing a new group after the current group will place any sub calculation
(which takes place in the footer) in that group prior to current calculations and
adding it before will place its calculation after the current calculation.
Click on Perform Selected Action and close the window with the OK button.
Derived columns
You create a derived column to produce information derived from existing data in your
database. For example, you can create a derived column in your report that shows a
persons full name and position on two lines even though there is no element that
contains this complete information. You can calculate a derived column from other
elements that exist in the report layout or even from the results of other derived
columns in the same report.
A layout element that is used as part of the derived column calculation must be part of
the report. It can be made Not Visible, using the Property Editor so that it doesnt
show, but it must be in the report layout.
Derived columns are created using Sesames Program Editor. To make a derived
column, you create a Value Box layout element that is unbound (not linked to any
423
15 DESIGNING REPORTS
field). The unbound element displays data created On Print, when the report is run. In
this example using Customers.dsr, the unbound Value Box involved is called
Combination (typed in the Name box when added to the report) in the Group Body.
The elements LE1, LE2, LE3, and LE4, in the Group Body, are set to Not Visible.
Figure 45. Report Design with Unbound Layout Element [Combination] for programming as a
derived column.
Open the Program Editor by selecting Program Layout in the Commands Control Panel,
and program the On Print event for the unbound element (LE4) as shown below. (See
Figure 46.)
Combination = LE1 + " " + LE2 + " " + LE3 + @Newline() + LE4
Figure 46. Creating the data for derived column LE4 using Program Editor.
424
15 DESIGNING REPORTS
Close the Program Editor, save your layout design. By adding a new group for creating
a break between names (as explained above), you will have a simple derived column
report that looks like the one below.
Schedule_Report_2_2003_11_02_20_47_29.htm
425
15 DESIGNING REPORTS
The report files will remain in the default report folder until they are moved or deleted,
using your operating system file manager.
Note: If you do not want your report files to be created in the current
working directory, you can change their location using the
SESAME_REPORT_PATH environment variable. (See Appendix 2 Sesame
Environment Variables.)
426
Section 16
Using the Application Utilities
The Application Utilities Menu
Sesames Application Utilities menu (see Figure 1) gives you access to application-wide
tasks that you may need to perform routinely or occasionally, depending what you
want to accomplish. These tasks include:
Backup Application
A Sesame application is comprised of a pair of files, one with a .db extension, and one
with a .dat extension. To create a successful backup of your application design, along
with all of its data, you must make a backup copy of both of these files.
427
16 USING THE APPLICATION UTILITIES
External backup
Any system-wide backup routine performed by a proprietary backup program, such as
a daily backup to a tape drive or other device or simply copying the two application
files to another location, such as a writable CD will make a successful backup of
your application.
As with any backup or file copy, ensure that the application is not in use before
attempting to back it up.
Merge Application
A Sesame application can contain multiple databases. These databases do not all have
to be designed and added to the application in a single session. In other words, they
do not have to be part of the initial application.
You can start with a simple one-database application, and work with it for a while,
adding records to it and so forth. Later, you can design a second application with its
own database or databases, and add new records to it, too. When you are happy with
both applications, you can combine them into a single application using the Merge
Application feature. Later on, if you want, you can add yet another application to the
428
16 USING THE APPLICATION UTILITIES
one that is now the result of having merged the first two. You can even merge an
application with multiple databases into another application. All of its databases will be
merged with the current or target application.
Merging two applications where the databases in each application are related in
some way gives you certain advantages over using those databases as separate
applications. For example, you can place a subform on a form if the database for the
subform is in the same application as the form. (See the section Working with
Subforms in the Sesame User Guide.) In addition, external lookups between databases
in the same application are faster and more efficient than between databases in
separate applications. (See the XLookup family of commands in the Sesame
Programming Guide.)
Sesame merges the second application into the currently opened application. All
databases, forms, reports, and data are added to the first application. No data is
merged or mixed between the databases of the first and second application. That is,
each database involved in the merge retains its own pre-merge design and data. The
new combined application is now a single application with multiple databases.
When merging applications, the existing security on the target application (the open
application) will prevail, but security for merged applications should always be
reviewed.
Trim Application
Sesames Trim Application feature is the opposite or reverse of the Merge Application
feature. It allows you to remove or delete one or more databases from a current
application that contains multiple databases.
429
16 USING THE APPLICATION UTILITIES
Trimming a database from an application is the same as deleting that database and all
of the forms, reports, specs, and data attached to it. Trimming is an irrevocable
operation so, again:
Your selected database will be permanently removed from the current application. All
of the data related to that database is deleted. Data, forms, reports and the like
attached to any remaining databases in the application are left intact.
Note that you can also remove a complete database in Field Manager in Designer.
Deleting a database by using Trim Application in Sesame runtime does not affect any
Designer (DSR) file. Deleting a database in Field Manager in Designer does not affect a
DB file unless you reconcile or Save As a new application.
Note: Exporting an entire application to XML can produce a very large file depending
on the size of the application files.
430
16 USING THE APPLICATION UTILITIES
Copying
Facilities for copying all or portions of a Sesame application are not found on one
specific menu. They are in different areas of the program depending on what you
might need to copy.
Copying an application
You can copy an entire application in several ways:
1. Externally Copy the two files that comprise the Sesame application,
application_name.db and application_name.dat, to new filenames or a new
location:
The new application will contain all the databases, forms, elements,
reports and data of the original application.
All internal elements databases, forms, layout elements, reports, and so
forth will have the same names as the application that was copied.
From the menu bars File Menu, select Save As and provide a new name
for the copy of the application. Sesame will copy both the .db and .dat files
to the new name. Alternatively, from Sesames menu tree, select
Application Utilities - Backup Application and provide a new application
filename. Sesame will copy both the .db and .dat files to the new name.
The new application will contain all the databases, forms,
elements, reports and data of the original application
All internal elements databases, forms, layout elements,
reports, and the like will have the same names as the application
you copied.
From Designers Application menu, select Delete All Data Records and then
select Save As New Application. Provide a new application filename.
Sesame will copy the relevant files to the new name.
The new application will contain all the databases, forms,
elements, and reports, but none of the data of the original
application.
All internal elements databases, forms, layout elements,
reports, etc. will have the same names as the application you
copied.
431
16 USING THE APPLICATION UTILITIES
Copying a Database
You cannot directly copy a database within an application in Sesame. You can however
copy a database from another Sesame application. See Merge Application.
432
Section 17
Securing Your Applications
You do not have to apply security to a Sesame application it is an option. A new
application has no security unless and until you choose to apply it.
When an application has security, all databases within the application have the same
users and groups.
There are four attributes that define a user and that user's rights, as shown in Table 1.
User Level Administrator, Manager, User Levels determine how much access
or Data Entry. the user has to the data and Sesame
menus and dialogs. For example, not all
menu choices are available to all levels.
Server administration rights are controlled by a Login name and password that are
completely separate from the users and attributes described above.
Q&A
Q&A compatibility With Q&A, security must be defined for each Q&A
database. With Sesame, security is defined for an application, including all
databases, forms and reports within that application.
433
17 SECURING YOUR APPLICATIONS
Sesame's three levels are simpler than Q&A's "Access Rights," which specify seven
rights that can be independently granted to each user. The Q&A rights are:
password, design and program change, mass delete, individual record delete,
mass update, design reports/forms, enter/edit data.
Sesame's groups are similar to what Q&A Windows calls a "Group" and what Q&A
for DOS calls "Field Security Specs."
In Q&A security, you can control a number of different tasks such as assign
passwords, design and program, mass delete, etc. at the individual user level.
Q&A also has a quite separate "Database Lock." Neither of these is directly
comparable to Sesame's method of granting design rights by group, but similar
functionality is offered by use of the following:
Q&A's Groups (also called Field Security Specs) are translated into Sesame
groups. Users are automatically assigned to the proper groups. Note that
groups are not required by Q&A but they are required in Sesame. Therefore, if
a Q&A database does not have groups, during translation the Sesame group
QA Group will be created and all users will be assigned to it.
User levels
As the name implies, it is users that have levels, not groups. User levels restrict the
tasks that users can undertake in Sesame run-time. (Sesame run-time is the normal
Sesame database program specifically not Sesame Designer.)
Each user is assigned one of three levels. These levels are: Administrator, Manager,
Data Entry.
434
17 SECURING YOUR APPLICATIONS
Access to different functions within the run-time is mostly controlled by these factors:
Note: Groups, not user levels, determine which data a user can see or modify
and whether a user has the right to use Designer.
Backup Application
Merge Application
Trim Application
Results Commands
After creating a result set, access to Results Commands is as shown in Table 2.
435
17 SECURING YOUR APPLICATIONS
Copy Y Y Y
Export Y Y Y
Import Y Y Y
Mass Update Y Y N
Sort Y Y Y
Table 3. How User Level affects Spec Manager access.
436
17 SECURING YOUR APPLICATIONS
Load Y Y Y
Save Y Y N
Rename Y Y N
Delete Y Y N
Defaults Y Y N
Table 4. How User Level affects Spec Manager operations.
To summarize:
Administrators and managers have full access to all specs and all operations
on them.
Data entry users have no access at all to mass updates.
Data entry users can load specs (other than mass updates) but have no access
to any operations on them except Load.
Deleting records
Data entry users cannot use Mass Delete found on the Results menu, but they can
delete individual records in both form view and in table view.
The Security Manager is part of Sesame Designer. Start Designer as you do to make
any design changes to an application. Once in Designer, select Application from the
menu tree and, under that, Security Manager. The Security Manager dialog will
appear. It has four tabs along the bottom. These tabs allow you to define groups,
users, element level security, and application settings.
For an unprotected application, the Security Manager will show that there are no
groups, no users, and that "Everyone" is permitted to redesign.
Note: Only administrators can access Designer directly from the run-time by
selecting Redesign Current Application from the Application Utilities menu.
Managers and Data Entry users who are given rights to make design changes will
have to run Designer directly because they have no Application Utilities menu.
Note: The right to use Designer for any particular application is controlled by
group membership, not user level. That is, an administrator does not get access to
Designer simply by being an administrator. Even though he can run Designer from
437
17 SECURING YOUR APPLICATIONS
the run-time menu, he must also be in a group with designer rights to be allowed
to log in to it. It is possible to allow managers and even data entry users to have
design rights while denying them to administrators it all depends on which
group each individual user is a member of.
As with other design changes, you will need to select either Reconcile Existing
Application or Save As New Application to have your Designer changes take effect.
To create a new group, type the name in the Group Name edit box at the top and click
the Add New Group button. After the group has been created, you can add users to it
by clicking on the Users tab. (See Figure 2.)
438
17 SECURING YOUR APPLICATIONS
To change the name of an existing group, edit the existing name to make the desired
change.
To delete a group, check the box marked Delete This Group. Note that you cannot
delete a group if it has any users in it the Delete This Group option will be grayed
out.
Each group also has a pick-list labeled Set All Users To Level. The pick-list's default is
Keep Current Level. Click the down arrow and use the mouse to highlight
Administrator, Manager, or Data Entry if you wish to change all users in the group to
that particular level. This is a convenient way to change all users currently in the
group to that level, but it does not ensure that all users of this group will remain at
that particular level. In other words, users can subsequently be changed to other
levels, and users added to the group in the future may be assigned to other levels.
After making any changes, click Apply Changes. You can cancel your changes by
clicking Close without applying the changes; Designer will ask you to confirm that you
wish to close without making the changes.
User Name
Password
User Level
Group
To create a new user, type the name in the User Name edit box and type the
password into both the Password and Confirm Password boxes. You can also select the
User Level and the Group if the defaults displayed are incorrect for the new user. (See
Figure 3.)
439
17 SECURING YOUR APPLICATIONS
Note that user names are not case sensitive, but passwords are.
When you enter a password, it will not be visible. Names and passwords can be as
short or as long as you wish, but each user must have both a name and a password.
When everything is filled in for the new user, click Add New User.
Caution: If you move yourself from a group with Designer rights, make sure
that at least one user remains assigned to a Group with those rights. If not,
youll lock yourself out of the database design. See section below, Deployment
and Preventing Design Changes, for details on how to do this intentionally and
how to avoid doing it accidentally.
Note that a user's level can also be changed by the Set All Users To Level control on
the Groups tab.
After making any changes, click Apply Changes and Close. You can cancel your
changes by clicking Close without applying the changes; Designer will ask you to
confirm that you wish to close without making the changes.
Layout and Layout Element settings tab Define element level access
Figure 4. Security Manager Layout and Layout Element Settings tab. The Key layout element
on the Main Form is read-only for users in the Restricted Group.
441
17 SECURING YOUR APPLICATIONS
A layout is a form or a report. You can control access to individual elements, and also
to the layout (the form or report) itself.
Use the Select A Layout and Select An Element controls to select sensitive elements
that you wish to restrict access to. If no restrictions are specified for an element, then
all users in all groups have full access to that element. To restrict access to an
element, for each group that has been defined, select any of the following rights:
Allow Read, Allow Write, and Allow Execute. (See Figure 4.)
These can be selected in any combination. You can also select none of the rights or all
of the rights. The combinations of Read and Write are shown in Table 5.
Allow Execute allows programming (including mass updates) to change the element
value. If this right is not granted to a user, when he causes programming to be
executed that would set the value of the element (for example On Form Exit) the
value is simply not changed. It is not considered an error if this happens.
To clear all security for a layout, select the layout in the Select A Layout dropdown list
box, then click Remove All Security For Layout. You will be asked to confirm that you
want to do this.
To clear all security for an element, select the layout in the Select A Layout dropdown
list box, and the element in the Select An Element drop down list box, then click
Remove All Security For Element. You will be asked to confirm that you want to do
this.
After making any changes, click Apply Changes and Close. You can cancel your
442
17 SECURING YOUR APPLICATIONS
changes by clicking Close without applying the changes; Designer will ask you to
confirm that you wish to close without making the changes.
You can alter settings for all layout elements even static text, lines and boxes.
Figure 5. Security Manager Application Settings tab. Only members of the Design group can
open Designer. An XLookup password for this application has been set using the User Name
"Customers_DB."
443
17 SECURING YOUR APPLICATIONS
The group that a user belongs to determines whether that user can make design
changes to the Sesame application. In the box labeled Which Groups are allowed to
redesign the application? you will see a list of the groups in this application (defined
using the Groups tab). Check one or more groups which are to be allowed to redesign
the application. (See Figure 5.)
If Allow Everyone was previously selected, selecting an actual group will uncheck it
automatically.
There are two ways to allow all users in all groups to make design changes.
1. Check Allow Everyone (which appears in the list of groups as if it were the first
group). If you do this, the other groups will be automatically unchecked.
2. Uncheck all groups one by one. If you do this, Allow Everyone will be automatically
checked for you.
Caution: If you leave all boxes unchecked, the Allow Everyone box is
automatically checked when you click on Apply Changes or switch to another
tab. You now have an application that everyone can redesign.
Caution: Make sure that you are in one of the groups that has Design rights
unless you intend to create a lock-out situation. See section below,
Deployment and Preventing Design Changes, for details on how to do this
intentionally and how to avoid doing it accidentally.
Once you have completed all the tabs, you will see that you can get an overview of the
security at the Groups tab. (See Figure 6.)
After making any changes, click Apply Changes and Close. You can cancel your
changes by clicking Close without applying the changes; Designer will ask you to
confirm that you wish to close without making the changes.
444
17 SECURING YOUR APPLICATIONS
445
17 SECURING YOUR APPLICATIONS
Type your user name and password. The user name is not case sensitive, but the
password is. Then click on Accept and you can use all the databases and forms and
reports in the application, subject to the permissions granted to you.
Password Controls
In a Sesame application that has had security applied to its design a failure alert
("Your User Name or Password was not accepted") will display when an invalid
password/user name is entered. Clicking OK in the message will return you to the
password dialogue box for another attempt at correctly logging in.
You can also use the Sesame.ini file to add entries that will increase the strength of
Sesame passwords. You can set minimum lengths required for passwords with the
entry "PASSWORD MINIMUM LENGTH: <n>" and you can require that passwords
contain at least one non-alpha character with the ini file entry "PASSWORD MUST
CONTAIN NONALPHA: <ON|OFF>". Ini file settings only apply to new passwords added
to an application and will not affect existing passwords in an application.
A lock-out situation can also be created by mistake. To avoid this, never exit from the
Security Manager in a way that (1) there is only one group that can open Designer and
(2) there are no users in that group.
1. Have two or more groups, only one of which is permitted to open Designer.
At the Users tab in Security Manager, move all the users from the group which can
open Designer to any of the others that can't.
2. Have two or more groups, only one of which is permitted to open Designer. One of
the other groups has no users, perhaps because it was just created.
At the Application Settings tab in Security Manager, in the Which groups are
allowed to open Designer area, uncheck the group that can open Designer and
instead check the empty group.
Server administration
Server administration is not, generally, application-specific. It is used to unlock
applications and see server messages. It can be run from Sesame run-time, or from
Designer. It can be opened without an application being open. If a protected
application is open, there are some application-specific functions available. See below
for details.
To start Server administration, select Server Administration from the run-time File
menu. You will be asked for a user name (Login:) and password. Note that this
password dialog is not the same as the regular security password.
The name is "admin" and the default password is "hello". Both are case sensitive
even the user name "admin" (unlike at the regular security password dialog).
Once in, you can change the server admin password by selecting the Administrative
Password tab. You cannot change the server admin login name from "admin", nor add
another server administrator login name.
The Server Administration dialog will vary depending upon whether it is called when a
protected application is currently open or not. When called with a secured application
open, there is an additional tab on the dialog titled User Management. (See Figure 8.)
447
17 SECURING YOUR APPLICATIONS
This screen presents an alternative user interface to security for the current
application. Here you can:
The interface here is a subset of the full security features in Designer. You cannot
change passwords, create groups or change layout permissions here.
It is important to note that here you are making changes to the security for this
application stored in the runtime (.DB) file. Changes made in Designer are stored in
the Designer (.DSR) file. If you make design changes to your DSR file and then
reconcile, you will lose all changes made to security in Server Administration / User
Management.
448
17 SECURING YOUR APPLICATIONS
You can choose to create a new Designer (.DSR) file or to re-use an existing one. If
you re-use an existing DSR file, you will overwrite that designer file with a copy of the
DB file complete with data and security.
The security settings in Server Administration are useful for making temporary
changes to security on a running application. For example, if you have an application
in current use by twenty users, you dont want to shut it down to allow a new
employee to start working. You can use Server Administration to quickly grant
permissions in the application.
Summary
Security is disabled only for the current Designer session. The next time you open
your Application, security will behave normally. This setting does not affect Runtime,
even if you Reconcile with security temporarily disabled. There is no need to re-enable
security before closing the Application.
449
17 SECURING YOUR APPLICATIONS
Sesame has a built in web server. By starting Sesame using the -web_server startup
switch, you can cause Sesame to act as a simple web server capable of delivering
web pages and data content from your applications without requiring any
programming.
Example:
sesame -server <machine_name> -web_server 80
<machine_name> is the name of the computer
All web servers, including Sesame's, operate on the same basic principle. A web client,
such as a browser, connects to the web server and makes a request using a URL
(universal resource locator). Typically, a URL is seen in a web browser as something
like: http://www.ExampleSite.com/ExamplePage.html. The named web server receives
that request and sends the browser HTML, usually from the HTML file requested in the
URL.
451
18 WEB CAPABILITIES
The supporting pages are used by the main pages above to perform the required task.
For the sake of simplicity and minimal typing for you, the example pages do not make
use of colors, fonts, images, CSS. You can use all of these things in your own web
pages.
Note: When creating the web pages, make sure to use a text editor such as
Notepad or vi. Do not use a word processor as this may add extraneous tags and
information that will prevent your pages from displaying correctly.
Create a Directory
In the current working directory for Sesame, create a new directory called Site. All the
files for your site will go in this directory. Copy Customers.db and Customers.dat from
the Samples directory into your new Site directory. Rename the new files to
CustomersWeb.db and CustomersWeb.dat
If you needed to change the port number from 80 because you are running another
web server, substitute the 80 above with a different number. Try to choose a number
above 4096.
You should now see the Sesame server dialog. The Sesame Server is now able to
operate normally for Sesame Clients and will also respond to web page requests.
Start a Sesame Client using the following command line. Remember to substitute
"MyServer" with the name of your server machine:
452
18 WEB CAPABILITIES
To create this page, open your text editor and type or paste the following to create a
web page with three links:
<html>
<head>
</head>
<body>
<P><A HREF="find.html">Search For Customer Listings</A></P>
<P><A HREF="update.html">Update Your Listing</A></P>
<P><A HREF="new.html">Submit A New Listing</A></P>
</body>
</html>
To see this page, start your web browser and set the URL to
http://localhost/Site/index.html or http://MyServer/Site/index.html (again, substitute
your machine name for "MyServer"). If you are running on a port other than 80, for
example 4099, type: http://localhost:4099.
You should now see a web page in your browser that looks like Figure 1.
If your machine was exposed to the internet without any intervening firewalls, anyone
could set their browser to look at the web page you are now serving. To serve a web
page other than index.html, give the file a filename ending in .html or .htm and place
it in the current working directory or in any directory below the current working
directory. When you specify the URL, include the path to that file. If the new file is
named MyNewPage.html and is in the MyDir directory, specify the URL as
http://MyServer/MyDir/MyNewPage.html.
453
18 WEB CAPABILITIES
Note: You must specify index.html in the URL. Only the top level directory will
load the index page by default.
Now, we can build the three pages to which this Menu page links and make them talk
to the CustomersWeb application.
Searching a Database
The first page we will build is the one to Search For Customer Listings. There are a
number of fields in the database, but we will limit our users to searching by Company,
State and ZIP.
The Menu page links to a page called find.html, so that is what we need to call this
page.
Open your text editor and type or paste the following to create a web page with a form
with the fields needed to search the CustomersWeb database. This page also contains
some special tags needed to talk to Sesame, which will be explained below.
454
18 WEB CAPABILITIES
<html>
<head>
</head>
<body>
<form name="kmp" method="post" action="result.html">
<input TYPE="hidden" NAME="command" VALUE="search">
<input TYPE="hidden" NAME="file" VALUE="Site\CustomersWeb.db">
<input TYPE="hidden" NAME="database" VALUE="Customers">
<input TYPE="hidden" NAME="searchfields" VALUE="Company;State;ZIP">
<input TYPE="hidden" NAME="sortfields" VALUE="Company">
<P>Please enter your search criteria and click Find Matches.</P>
<TABLE>
<TR>
<TD>Company</TD><TD><input type="text" size="20" name="Company"></TD>
</TR>
<TR>
<TD>State</TD><TD><input type="text" size="20" name="State"></TD>
</TR>
<TR>
<TD>ZIP</TD><TD><input type="text" size="20" name="ZIP"></TD>
</TR>
<TR>
<TD> </TD><TD> </TD>
</TR>
<TR>
<TD><input TYPE="SUBMIT" NAME="b1" VALUE="Find
Matches"></TD><TD> </TD>
</TR>
</TABLE>
</form>
</body>
</html>
Now, if you click the Search For Customer Listings link on your Menu page, your new
page should appear as shown in Figure 2.
The three fields in this form are search fields taking the same search syntax as
Sesame. Once we build the final piece of this section, you will be able to enter search
criteria into these fields in Sesame syntax, click the Find Matches button and display
information from the records in the CustomersWeb database that match your criteria.
The secret to doing this is in the line that starts with <form name and the five lines
that start with <input TYPE="hidden".
These six lines tell Sesame what to do with the criteria typed into this form and what
information you want from the CustomersWeb database.
455
18 WEB CAPABILITIES
Looking at these six lines individually, you can see how this works:
This line tells the web server that this is a form and the when the form is submitted
the web server should send the data on this form to the web page result.html, which
we will be building next. This line is standard HTML and a line very much like it
appears in any web form.
This line tells the web browser to place a hidden field on the form and to give it the
value of "search". When the form is submitted to a web server all of the fields are sent
over, including hidden fields. When the Sesame web server receives a field named
"command" that contains a value of "search", it knows to use some of the other fields
and their names to search the Sesame application.
456
18 WEB CAPABILITIES
This line tells Sesame which application file to use for the search. The application must
already be loaded on the server.
This line tells Sesame which database inside the application file named above to use
for the search.
This line tells Sesame to search the named fields Company, State and ZIP using the
criteria entered on the HTML form. This is a semicolon separated list of named fields.
This line must appear in the HTML before the HTML fields it names. The HTML field
names must match the names of the database fields to be searched.
Your HTML form can include other fields, but only those listed in searchfields will be
used for the search.
This line tells Sesame to sort (ascending only) using the named fields. Again, this line
must appear before the named field in the HTML.
The rest of the page is what makes the form fields appear on the screen. Note that
their names match the database field names specified in the hidden field values
explained above.
When you submit this form, the web server will collect the values in the hidden and
visible fields and hand them to the next page, result.html.
When the Sesame web server sees the form submission, it will notice the special
instructions created by the hidden fields. It will search CustomersWeb.db for records
matching the criteria, sorted by Company. The data in these records can then be used
to create the web page displayed by submitting the form - result.html.
Open your text editor and type or paste the following to create a web page with a form
with the fields needed to search the CustomersWeb database. This page also contains
some special tags needed to make use of the data retrieved by Sesame, which will be
explained below.
457
18 WEB CAPABILITIES
<html>
<head>
</head>
<body>
<p>Matching Member Records</p>
[[SESAME_START_REPEAT]]
<p>
[[First]] [[Last]]<br>
[[Company]]<br>
[[Add1]]<br>
[[City]], [[State]] [[ZIP]]<br>
<hr>
</p>
[[SESAME_END_REPEAT]]
</body>
</html>
Everything in find.html is standard HTML and will work with any web browser. The
same cannot be said for result.html, which we will now build. While the basic
framework of the file is standard HTML, it also contains some special tags that the
Sesame web server recognizes and uses, to perform a kind of "merge" with the data.
These tags are the ones enclosed in double square braces - [[ ]].
[[SESAME_START_REPEAT]]
[[SESAME_END_REPEAT]]
Everything between these tags will be repeated for each record retrieved.
[[FIELD_NAME]]
Inserts the value in the named field from the current record. Note that these tags will
only work between the [[SESAME_START_REPEAT]] and [[SESAME_END_REPEAT]]
tags listed above.
So, if you type m.. into the Company field on find.html and click the Find Matches
button to submit the form, Sesame will retrieve the four records where the Company
begins with M and create a web page for you displaying the information from those
records as shown in Figure 3.
458
18 WEB CAPABILITIES
Figure 3. Dynamic web page created from live Sesame data - result.html
459
18 WEB CAPABILITIES
If you wish, you can click the Back button on your browser to enter different criteria
and submit again to see different results.
Keep in mind that these example pages are intentionally free of enhancements and
decoration. You can make your own pages as fancy as you like by using fonts, colors,
images, CSS and other web page enhancements.
To see this in action, we will now build the pages for the Update Your Listing link on
the Menu page (index.html).
CustomersWeb.db includes a unique KEY field, so we will let the user enter their KEY
in order to get their record.
Open your text editor and type or paste the following to create a web page with a form
to enter and search for a KEY.
Save the file as update.html, which is the page specified by the link on the Menu form.
Note that the hidden fields in this page are almost identical to the ones used for the
earlier search. The difference is that, this time, we are only searching the KEY field.
We have also omitted the sortfields as we expect to find only one match and do not
need to sort.
<html>
<head>
</head>
<body>
<form name="kmp" method="post" action="findkey.html">
<input TYPE="hidden" NAME="command" VALUE="search">
<input TYPE="hidden" NAME="file" VALUE="Site\CustomersWeb.db">
<input TYPE="hidden" NAME="database" VALUE="Customers">
<input TYPE="hidden" NAME="searchfields" VALUE="KEY">
<P>Please enter your Key.</P>
<TABLE>
<TR>
460
18 WEB CAPABILITIES
Now, if you click the Update My Listing link on your Menu page (index.html), you
should arrive at your new search form, as shown in Figure 4.
This form submits to findkey.html as specified in the form's action tag, so we will build
that page next.
461
18 WEB CAPABILITIES
Open your text editor and type or paste the following to create a web page with a form
to display and update information from CustomersWeb.db.
<html>
<head>
</head>
<body>
[[SESAME_START_REPEAT]]
<form name="kmp" method="post" action="postupdate.html">
<input TYPE="hidden" NAME="command" VALUE="search">
<input TYPE="hidden" NAME="file" VALUE="Site\CustomersWeb.db">
<input TYPE="hidden" NAME="database" VALUE="Customers">
<input TYPE="hidden" NAME="postfields"
VALUE="First;Last;Company;Add1;City;State;ZIP">
<input TYPE="hidden" NAME="searchfields" VALUE="Key">
<input TYPE="hidden" NAME="KEY" VALUE="[[KEY]]">
<P>Please enter your listing information.</P>
<TABLE>
<TR>
<TD>First Name</TD><TD><input type="text" size="20" name="First"
value="[[First]]"></TD>
</TR>
<TR>
<TD>Last Name</TD><TD><input type="text" size="20" name="Last"
value="[[Last]]"></TD>
</TR>
<TR>
<TD>Company</TD><TD><input type="text" size="20" name="Company"
value="[[Company]]"></TD>
</TR>
<TR>
<TD>Address</TD><TD><input type="text" size="20" name="Add1"
value="[[Add1]]"></TD>
</TR>
<TR>
<TD>City</TD><TD><input type="text" size="20" name="City"
value="[[City]]"></TD>
</TR>
<TR>
<TD>State</TD><TD><input type="text" size="20" name="State"
value="[[State]]"></TD>
462
18 WEB CAPABILITIES
</TR>
<TR>
<TD>ZIP</TD><TD><input type="text" size="20" name="ZIP"
value="[[ZIP]]"></TD>
</TR>
<TR>
<TD> </TD><TD> </TD>
</TR>
<TR>
<TD><input TYPE="SUBMIT" NAME="b1" VALUE="Submit
Listing"></TD><TD> </TD>
</TR>
</TABLE>
</form>
[[SESAME_END_REPEAT]]
</body>
</html>
Note that, for each visible field, the value is preset to the current value in the
database using the special [[FIELD_NAME]] tag.
There are two things to notice about the usual set of hidden fields. First, the inclusion
of a hidden postfields field. The value of this field, just like searchfields, is a list of field
names. These field names match the names of the fields on the HTML form and in the
database. Any fields listed in postfields will post their values to the records in the
database that match the criteria in the searchfields list. In this case, all the visible
fields are listed. This line must appear in the HTML before the HTML fields it names.
On update.html, enter 938 as the Key and click Find My Listing. Sesame will build and
display the page shown in Figure 5.
463
18 WEB CAPABILITIES
The last piece of this process is to post the updated information back to the database.
This page already knows which record to update (searchfields) and which fields to
change (postfields). So all we need to do (if we want to) is display the results of the
update on the page specified by the action tag of this form - postupdate.html.
Open your text editor and type or paste the following to create a web page that
displays the information form the updated record.
464
18 WEB CAPABILITIES
<html>
<head>
</head>
<body>
<p>Listing Update Confirmation</p>
[[SESAME_START_REPEAT]]
<p>
[[First]] [[Last]]<br>
[[Company]]<br>
[[Add1]]<br>
[[City]], [[State]] [[ZIP]]<br>
<hr>
</p>
[[SESAME_END_REPEAT]]
</body>
</html>
Now, if you change something on the update form and click Submit Listing the result
of your update will display in the browser as shown in Figure 6. For this example, we
changed City from "PHILA" to "Philadelphia".
If you now search the database for this record using an ordinary Sesame client, you
will see the update in the record.
465
18 WEB CAPABILITIES
This page is very similar to the update form we created earlier. Since we are creating
a new record, we don't need searchfields, we only need postfields. We also set the
command field to "post" instead of "search". The post command instructs Sesame to
make a new record using the values from the web form, instead of finding or updating
existing records.
Open your text editor and type or paste the following to create a web page with a form
to add information to CustomersWeb.db.
<html>
<head>
</head>
<body bgcolor="#FFFFFF">
<form name="kmp" method="post" action="addnew.html">
<input TYPE="hidden" NAME="command" VALUE="post">
<input TYPE="hidden" NAME="file" VALUE="Site\CustomersWeb.db">
<input TYPE="hidden" NAME="database" VALUE="Customers">
<input TYPE="hidden" NAME="postfields"
VALUE="First;Last;Company;Add1;City;State;ZIP">
<P>Please enter your listing information.</P>
<TABLE>
<TR>
<TD>First Name</TD><TD><input type="text" size="20" name="First"></TD>
</TR>
<TR>
<TD>Last Name</TD><TD><input type="text" size="20" name="Last"></TD>
</TR>
<TR>
<TD>Company</TD><TD><input type="text" size="20" name="Company"></TD>
</TR>
<TR>
<TD>Address</TD><TD><input type="text" size="20" name="Add1"></TD>
</TR>
<TR>
<TD>City</TD><TD><input type="text" size="20" name="City"></TD>
</TR>
<TR>
<TD>State</TD><TD><input type="text" size="20" name="State"></TD>
</TR>
<TR>
<TD>ZIP</TD><TD><input type="text" size="20" name="ZIP"></TD>
466
18 WEB CAPABILITIES
</TR>
<TR>
<TD> </TD><TD> </TD>
</TR>
<TR>
<TD><input TYPE="SUBMIT" NAME="b1" VALUE="Submit
Listing"></TD><TD> </TD>
</TR>
</TABLE>
</form>
</body>
</html>
Now, if you click Submit A New Listing on your Menu page (index.html), your new
page should display as shown in Figure 7.
467
18 WEB CAPABILITIES
Open your text editor and type or paste the following to create a web page that
displays the information form the updated record.
<html>
<head>
</head>
468
18 WEB CAPABILITIES
<body>
<p>New Listing Confirmation</p>
[[SESAME_START_REPEAT]]
<p>
[[First]] [[Last]]<br>
[[Company]]<br>
[[Add1]]<br>
[[City]], [[State]] [[ZIP]]<br>
<hr>
</p>
[[SESAME_END_REPEAT]]
</body>
</html>
Now, if you fill out the update form and click Submit Listing the resulting new record
will display in the browser as shown in Figure 8.
If you search the database for this record using an ordinary Sesame client, you will
find the new record.
Using these techniques, you can make a Sesame application that can be publicly
viewed, searched, and even edited without needing Sesame client software - any
browser will do.
469
18 WEB CAPABILITIES
Hidden Fields
command: Instructs Sesame whether to find/update matching records (search) or
add a new record (post).
<input TYPE="hidden" NAME="command" VALUE="search">
<input TYPE="hidden" NAME="command" VALUE="post">
file: Specifies the application file to use. This file must already be loaded on the
server. For security purposes, Sesame web server will not load application files. The
value can include a path.
<input TYPE="hidden" NAME="file" VALUE="MyApp.db">
postfields: Specifies the list of fields to be updated or set in the affected record(s) as
a semicolon separated list. This line must appear in the HTML before any of the named
fields. The field names must match the names specified in the HTML and in the
database to be affected.
<input TYPE="hidden" NAME="postfields" VALUE="Field1;Field2;Field3">
sortfields: Specifies the list of fields by which to sort the affected record(s) as a
semicolon separated list. The sort will always be ascending. This line must appear in
the HTML before any of the named fields. The field names must match the names
specified in the HTML and in the database to be affected.
<input TYPE="hidden" NAME="sortfields" VALUE="Field1;Field2;Field3">
Tags
[[SESAME_START_REPEAT]]
[[SESAME_END_REPEAT]]
Everything between these tags will be repeated for each record retrieved.
[[FIELD_NAME]]
Inserts the value in the named field from the current record. Note that these tags will
only work between the [[SESAME_START_REPEAT]] and [[SESAME_END_REPEAT]]
tags listed above.
470
18 WEB CAPABILITIES
@(LOGIN)
Inserts the login value entered by the user. This is only available if you are using a
password file. For more information, see the Sesame Web Server Security section
below.
If you use this feature, you can also embed the special @(LOGIN) tag in your HTML to
insert the User Name in your pages. This can be very useful in a hidden field for
limiting users to their own records.
To use this feature, you need a password file and an entry in your sesame.ini file. The
password file is a text file which you can create in your text editor. It has one
login/password combination per line and takes the form login:password.
471
18 WEB CAPABILITIES
Once you have saved your password file, you then make an ini file entry telling
Sesame where to find it. For example, if you save the password file in your Site
directory as webpass.txt, then your ini file entry would look like this:
WEB SERVER PASSWORD FILE: Site\webpass.txt
Sesame can scan an email server and retrieve the email that it finds there. If that
email contains special Sesame commands, Sesame will respond to the sender of that
email by running a report in a Sesame application an emailing that report to the
sender.
472
18 WEB CAPABILITIES
Sesame will pick up this email and run the report. When your sales rep checks her
email she will have a message with a report that looks something like Error!
Reference source not found..
This is what the email would contain to generate the report shown:
EMAIL COMMANDS POP3 LOGIN: [login name] - the login name on the POP3
server.
EMAIL COMMANDS DELETE READ: [ON | OFF] - specifies whether Sesame should
delete the email message after it is read.
EMAIL COMMANDS POLL INTERVAL: [n] - the interval in seconds Sesame should poll
the POP3 server.
EMAIL COMMANDS SMTP LOGIN: [login name] - the login name on the SMTP
server.
473
18 WEB CAPABILITIES
For example, the following ini file entries scan a server named pop3.MyServer.net
every 3 minutes (180 seconds) for email in the JDoe account, using the password
my/password. Once the email is retrieved, it is deleted from the server. The reply is
sent using the same account and password for the outgoing email server of
smtp.MyServer.net:
EMAIL COMMANDS: ON
EMAIL COMMANDS POP3 SERVER: pop3.MyServer.net
EMAIL COMMANDS POP3 LOGIN: JDoe
EMAIL COMMANDS POP3 PASSWORD: my/password
EMAIL COMMANDS DELETE READ: ON
EMAIL COMMANDS POLL INTERVAL: 180
EMAIL COMMANDS SMTP SERVER: smtp.MyServer.net
EMAIL COMMANDS SMTP LOGIN: JDoe
EMAIL COMMANDS SMTP PASSWORD: my/password
EMAIL COMMANDS LOCAL PASSWORD: remote/user
Some of the commands above are optional and default to safe and/or reasonable
values. EMAIL COMMANDS DELETE READ defaults to OFF. This means that the Sesame
email scanner will not delete retrieved email from the server until this flag is set to
ON. In general, OFF is a good setting for testing purposes. Once you are using this for
actual queries, you should set this to ON to avoid responding more than once to the
same request message. EMAIL COMMANDS POLL INTERVAL defaults to 30 seconds.
Setting it lower than 30 seconds is not recommended. Many outgoing email servers do
not require a password. In such cases no SMTP login or password should be set. More
details on these sesame.ini file commands are available in the Sesame Initialization
File section.
Once scanning is enabled, Sesame will begin to scan the specified email account for
emails with special Sesame commands in the body of the email. If the correct
commands are found in the email, Sesame will reply to that email with information
derived from the applications accessible to the Sesame server.
Email Commands
SCommand Open: [Application File Name] - Specifies the application file to use. The
value can include a path.
SCommand Database: [Database Name] - The name of the database to use in the
application file specified in the Open command.
SCommand Query: [Search Spec] - Retrieve spec specifying which records to include
on the report. The spec takes the form of !Field=Spec where Field is the name of the
database field to search and Spec is what you would have typed in the Retrieve Spec.
You must include the bang(!) before the field name. Multiple criteria can be included
by using multiple SCommand Query lines in the request email.
474
18 WEB CAPABILITIES
SCommand Report: [Report Name] - The name of the report to run. This report
must be based on the database specified in the Database command.
SCommand Reply To: [Reply Email Address] - Email address where the report
should be sent.
SCommand Password: [Password Needed to Access Sesame] - This must match the
password specified in the EMAIL COMMANDS LOCAL PASSWORD entry in the
sesame.ini file.
will cause Sesame to open the Customers.db application and in the Customers
database, search for records where the value in the Key field is less than 1000. It will
run the report called MyReport using those records. The resulting report will be
emailed to sales_rep@your_domain.com.
Because Sesame will reply to the email address specified in SCommand Reply To, it is
possible to send the email from one address and have the resulting report sent to a
different address.
The email scanner runs from a Sesame client, not from the Sesame server. This allows
multiple users to set up scanners on their own boxes without impacting the Sesame
server or other users. In most cases it is advisable to dedicate a Sesame client to this
task, in that it will stop responding to the user interface at the polling interval to scan
the email server for more email. Name the ini file containing the email command
something other than sesame.ini and use the -ini_file startup switch to specify the ini
file containing the email commands for the dedicated client only without impacting
other Sesame clients running on the same machine.
Because Sesame's email scanner uses email protocols, this feature can be used to
serve data to remote users using only their email program. They do not need to have
a Sesame client on their remote computer. Additionally, because email can pass
readily through firewall protected networks, Sesame email scanning can be used while
the Sesame server and all of its clients are still protected by a firewall.
475
Section 19
Troubleshooting
Q&A Translation Errors
The login name is admin and the default password is hello. Both are case sensitive
and must be entered in lower case as shown.
You will be shown the Server Administration dialog. The tabs comprising this dialog,
and the first tab shown, will vary depending upon the mode you are in: standalone or
client-server, whether an application is open or not, or whether an open application
has security or not.
477
19 TROUBLESHOOTING
478
19 TROUBLESHOOTING
Once in Server Administration, click on the Local Log tab and you will see a list of
errors and warnings. There will be a line in the log for each translation error, for
example a field name that translates into an illegal layout element name, or a data
record which has an illegal value in a field. There will be one line for each occurrence
of a field which has a value which cannot be retained, such as a text value in a date
field or "ERR" in a number field. You can filter this window, e.g. for client warnings,
and you can print it, by using the menu commands.
479
19 TROUBLESHOOTING
Unlocking an Application
If Sesame or Designer should be terminated abnormally for any reason then the file in
use will be locked. Trying to re-open this file will give the message "Database . . .
failed to open". To unlock both DB files and DSR (Designer files) use Server
Administration. You use Server Administration even if you are running Sesame in
standalone mode.
NOTE: unlocking an application which is open for example by another user on the
network is likely to cause severe damage to the application. Make absolutely
certain that the application is not legitimately locked before unlocking it.
Sesame itself will do all it can to make sure that you are not trying to unlock an
application that is currently in use. If you attempt this, you will get a message that the
unlock attempt failed.
The login name is admin and the default password is hello. Both are case sensitive
and must be entered in lower case as shown.
You will be shown the Server Administration dialog. The tabs comprising this dialog,
and the first tab shown, will vary depending upon the mode you are in: standalone or
480
19 TROUBLESHOOTING
After reading the warning message, select the .DB or .DSR file to unlock. The status
box will show "Selected " followed by the pathname and filename of the selected file.
Next click on the Unlock Selected Application button. The status box changes to
"Unlocked " followed by the pathname and filename of the selected file.
If Sesame will not allow you to Unlock an application it is probably because it is in use
by another user. The best approach in this instance is to either unload the application
or completely shut down Sesame server and then retry unlocking the application.
Note: Make sure that users do not try and reopen an application
once you have unloaded it.
Both the unloading and shutdown operations are available on their own tabs
servers and unload applications, respectively.
481
19 TROUBLESHOOTING
482
Appendix 1
Network Administration
Depending on your requirements, your Sesame client-server environment may be as
simple as two users sharing an application, or as complex as dozens of users
connecting to multiple Sesame servers serving multiple applications in a load-
balancing scheme. This section is intended to familiarize you with your choices for how
to set up your Sesame client-server system to meet your needs.
Configurations
Sesame can run in a number of client-server configurations:
483
APPENDIX 1 NETWORK ADMINISTRATION
You may have one Sesame application for Inventory and another for Sales Calls. (See
Figure 2.)
devote an entire computer, with all its RAM and CPU to the application needed by your
phone room, and use a second computer to serve other, less heavily used
applications. (See Figure 4.)
Limitations
The main limitation is that a Sesame application may only be opened by one Sesame
Server at a time. Once that application is being served, it can be used by as many
Sesame clients as permitted by your license, but the application cannot also be
opened by another Sesame Server.
485
APPENDIX 1 NETWORK ADMINISTRATION
You can create desktop shortcuts that will automatically start Sesame as either a client
or a server. The command line options needed for this are detailed below.
Server
sesame -server machine_name[:port1:port2]
machine_name The name of the server computer. See your operating system
documentation for how to determine this.
port1:port2 Optional. If these are omitted, the default ports will be used. Using
and setting ports is covered later in this document.
Client
sesame -client machine_name[:port1:port2]
port1:port2 Optional. If these are omitted, the default ports will be used. If
specified these must be the same ports as are used to start the Server to which
the Client is to connect.
Ports
Ports are a way of channeling network resources. By providing port numbers, you give
Sesame ownership of a particular set of these network resources, so that the Sesame
server can communicate with its clients without interference from or interfering with
other programs. Sesame requires two port numbers: one for normal operations and
one for special notifications messages sent from the server to the clients.
486
APPENDIX 1 NETWORK ADMINISTRATION
The services file entry specifies the first port number. Sesame will automatically add
one (1) to get the second port number. The sample entry below will cause Sesame to
default to ports 20020 and 20021. The services file may be edited using any text
editor which does not apply formatting codes. If you are in Microsoft Windows, use
Notepad. Before editing your services file, you should make a backup copy.
When choosing port numbers, it is customary to make the second port one (1) higher
than the first port (i.e. 20020:20021). Port numbers below 1024 cannot be used. It is
recommended that you use port numbers no lower than 2048.
487
APPENDIX 1 NETWORK ADMINISTRATION
Connections: Shows the number of Sesame Clients currently connected to this Server
and the total allowed by your license. A Sesame multi-user license allows a maximum
number of concurrent users.
Virtual Memory Remaining: Shows the amount of available virtual memory remaining
on the system.
Open Applications: Lists the applications currently being served. The first item on the
list is always System Database, which is used internally by Sesame.
488
APPENDIX 1 NETWORK ADMINISTRATION
Connection: Shows the connection portion of the command line used to launch the
Server. As a minimum shows the Server name.
Commands Processed: Shows the number of Client requests processed by this Server
since it was started.
Activity Meter: A bar which turns green to show the general level of Sesame Server
activity.
Uptime: Shows the elapsed time since Sesame Server was started.
The login name is admin and the default password is hello (unless you have changed
the Server Administrator password). Both are case sensitive and must be entered in
lower case as shown.
489
APPENDIX 1 NETWORK ADMINISTRATION
You will be shown the Server Administration dialog. The tabs comprising this dialog,
and the first tab shown, will vary depending upon the mode you are in: standalone or
client-server, whether an application is open or not, or whether an open application
has security or not. Standalone mode. If you start the Server Administration interface
while Sesame is running in standalone mode, only the Unlock Application, Local Log,
Administrative Password and User Management tabs are available.
Servers tab
The Servers tab (see Figure 8) provides the ability to start and stop servers.
490
APPENDIX 1 NETWORK ADMINISTRATION
To start another Server on the same machine as the Server being administered, click
the Start Another Server button. If you do not want to start the new server using the
default ports, you can also enter the desired port numbers into Port 1 and Port 2. If
the default ports are already in use, you must enter different port numbers to start the
new Server.
To stop the Server, select the desired shutdown options and click Stop This Server.
Notify All Clients: Broadcasts a message to all connected Clients that the Server is
about to shut down. The Server then waits at least 60 seconds before beginning
shutdown, giving the Clients an opportunity to save their work and disconnect.
Wait For All Clients to Disconnect: Server will wait for all connected Clients to
disconnect before starting shutdown. If Notify All Clients is also selected, the
connected Clients will be notified that the Server is waiting to be able to shut
down.
Disconnect and Stop All Clients: Disconnects all connected Clients and begins
shutdown. If Notify All Clients is also selected, the connected Clients will be
notified and given an opportunity to disconnect on their own before being forcibly
disconnected.
Notification tab
The Notification tab (see Figure 9) provides the ability to see and communicate with
connected Clients.
491
APPENDIX 1 NETWORK ADMINISTRATION
The lower panel shows a list of machine names currently connected to the Server.
Buttons above the box allow you to mass select and deselect Clients. You can select
individual Clients by clicking on the machine name.
The upper panel allows you to type a message to be sent to the selected clients. The
Client will see the broadcasted message as a popup on their screen. Optionally, after
broadcasting your message, you can also disconnect the selected clients.
After reading the warning message, select the .DB or .DSR file to unlock. The status
box will show "Selected " followed by the pathname and filename of the selected file.
Next click on the Unlock Selected Application button. The status box changes to
"Unlocked " followed by the pathname and filename of the selected file.
492
APPENDIX 1 NETWORK ADMINISTRATION
If Sesame will not allow you to Unlock an application it is probably because it is in use
by another user. The best approach in this instance is to either unload the application
or completely shut down Sesame server and then retry unlocking the application.
The log display can be filtered by severity (see Figure 11) and printed by pressing
Alt-P or selecting File / Print.
The log file rotates automatically. It will always the show the most recent messages,
up to 10000. If more than 10000 messages accumulate, the oldest ones are deleted.
The log file is automatically created in the current working directory.
Select the name of the application you want to unload and click the Unload Selected
Application button. That application will immediately become unavailable to any of the
Clients that are using that application. Because there is no warning available to these
Clients, it is advisable to only unload applications after you have confirmed that that
493
APPENDIX 1 NETWORK ADMINISTRATION
application is no longer in use by any Client as any unsaved changes will be lost. The
application file is unlocked and may be opened again by any connected Client.
The list of applications is not automatically updated as Clients connect and open
applications. To refresh the list and view the current set of loaded applications, click
the Refresh Application List button.
You cannot unload applications that are open on the same Client that invoked the
Server Administration dialog. To unload an application that you have open on your
computer, you must first close that application, or open a second Client on the same
computer.
The Unload Application tab is only available when the server is running in client/server
mode. It is not available in standalone mode.
Relicense tab
This tab allows you to update your license information. You need to be connected to
the internet to do so. (See Figure 13 below.)
494
APPENDIX 1 NETWORK ADMINISTRATION
495
APPENDIX 1 NETWORK ADMINISTRATION
Select the name of the application you want to back up and click the Backup Selected
Application button. Sesame will copy the files comprising the selected application to a
directory under the current working directory named after that application (.db
filename). In the case of Customers.db, the directory is named "Customers". The
copied files are named after the original application files with the addition of a unique
number. The backup file for Customers.db will be named something like
Customers1154981757.db. The backup file for Customers.dat will be named
Customers1154981757.dat. The files created by Backup Selected Application are not
immediately loaded for use as they would be using the similar "Save As" command.
Once an application has been backed up its name is removed from the selection list in
the dialog box. To restore an application's name to the list, or to see the current set of
applications loaded on the server, click the Refresh Application List button.
Type the password in the New Password input box. It shows as asterisks. Type it again
in the Confirm Password input box. Click on Apply. If successful the message box
shows "Password accepted". If not the message box shows "Error: Passwords not
accepted. They do not match.".
NOTE: Admin password is case sensitive. Be careful to note the state of the Caps Lock
key when changing passwords, as you do not see the password entered.
496
APPENDIX 1 NETWORK ADMINISTRATION
You cannot:
Changes made on this tab will be overwritten by a Reconcile made from the Sesame
Designer module, if the security setting at the reconcile Options dialog is changed
from the default "No" setting. (See Figure 17.) If this is set to Yes, then changes to
security for example changed user passwords made since the last reconcile,
would be lost.
497
APPENDIX 1 NETWORK ADMINISTRATION
Sesame can be started as an administrative client. In this mode, Sesame only shows
the Server Administration dialog. The administrative dialog that appears when running
Sesame as an administrative client is identical to the dialog that is invoked by
selecting Server Administration form the File menu in either Sesame Runtime or
Designer. Starting Sesame this way does not use up a client license and is intended to
be used on those occasions when you intend only to perform server administration
tasks.
This mode is invoked by starting Sesame with the "-admin" startup switch:
Optionally, you can start the administrative mode with the port number specified:
The port number used must match the port numbers used when the Sesame Server
was started. The administrative mode can only be used when Sesame is running
client/server.
Following are a few tips and tricks that may improve your client-server experience.
Preloading applications
Sesame opens an application when it is needed and closes it when the last Client using
the application releases it. If there is an application that is used regularly for XLookups
or is used daily and takes a long time to load, you may want to preload the application
and make sure it stays loaded. You can do this by starting a "dummy" Client and
opening the desired application. As long as this Client remains open, the Server will
498
APPENDIX 1 NETWORK ADMINISTRATION
keep the application loaded. The "dummy" Client can be on the same machine as the
Server.
c:\sesame\data
c:\lantica_data
c:\sesame\data
[DRIVES]
The rootdirs.ini file should be placed in the current working directory on the Server
machine. If you do not want to keep your rootdirs.ini file in the current working
directory, you can specify a full path to this file using the SESAME_ROOTDIRS_PATH
environment variable.
The example below tells Sesame to look for your license file in the HideMyFile directory
on your C drive. The variable name is SESAME_LICENSE_PATH. The value should be
the full path to your license file, including the filename.
499
APPENDIX 1 NETWORK ADMINISTRATION
You can also use this method to rename your license file. See your operating system
documentation for instructions on setting environment variables.
Protect your server with the network connection allow and deny files
There are two optional files the Sesame server will use to specifically allow or deny
particular network connections or ranges of connections. These files can be used to
make sure that only specific computers are allowed to connect to your server. When a
particular computer running Sesame Client attempts to connect to a Sesame Server,
the Sesame Server will attempt to locate that computers IP address in the allow file, if
there is one. If that IP address exists in the allow file, or there is no allow file, the
Sesame Server will attempt to find that IP address in the deny file. If it finds that
address in the deny file, the connection is disconnected. If there is no deny file, or the
IP address is not found in the deny file, the connection is allowed to continue.
The wildcard character "*" (asterisk) may appear within the IP address specified in the
allow and deny files. Once it appears, it causes a range of addresses to be specified.
Subsequent wildcard characters will be ignored:
178.* allows all computers in the IP range starting with 178 to be connected.
168.20* allows all computers in the IP range starting with 168 with a secondary
address of 200 or greater to be connected.
The same wildcard rules apply equally to the deny file. Using the combination of the
two files it is easy to set a range of computers that are allowed, such as a single
department, while excluding particular computers from within that department:
192.168.0.*
192.168.0.22
192.168.0.23
192.168.0.147
The above examples will exclude all computers not in the range of 192.168.0 (those
not in the department) and the specific computers with IP addresses ending in 22, 23,
and 147.
500
APPENDIX 1 NETWORK ADMINISTRATION
The allow and deny files do not use unresolved IP addresses (for example,
www.lantica.com). All IP addresses must be specified numerically in the common IP
address dot separated format: XXX.YYY.ZZZ.NNN (for example, 192.168.0.12).
The default filename for the allow file is "sesame_allow.txt". The default filename for
the deny file is "sesame_deny.txt". Unless superseded by the environment variables
SESAME_ALLOW_FILE and SESAME_DENY_FILE, both files must appear in the current
working directory to be used. The environment variables supersede the full paths and
filenames.
501
APPENDIX 1 NETWORK ADMINISTRATION
Log File
Sesame 2.0 logs message, errors, and warnings to a file named "s2_logxxxx.log",
where "xxxx" represents a four digit number, such as s2_log0000.log or
s2_log0001.log. The four digit number is incremented to produce a new file if the
currently highest numbered file cannot be written by Sesame. As with earlier versions
of Sesame, the log file format cannot be read or written in any other program, such as
a text editor or word processor. The Sesame 2.0 log file contains a "key" value to
distinguish it from earlier versions and to protect the file from external manipulation.
This file can be viewed or printed from the Server Administration window.
Lock/Unlock
Sesame application files (.db. .dat, .dsr, .ddt) are locked while in use. Unlocking an
application file while it is in use allows multiple Sesame servers (whether running
client/server, or standalone) to access that file at the same time. Each server has a
copy of that application file in its own memory. As each server runs, these different
copies begin to differ from one another as different users make different changes to
the application. Having these multiple servers writing these changes all to the same
file causes that file to become unusable to any of the Sesame servers. This is only
possible if the file becomes unlocked while in use.
To prevent multiple Sesame servers from accessing a Sesame application at the same
time, the administrative interface will not allow unlocking an application file that is
currently running on that Sesame server. The "Unlock" tab in the Server
Administration dialog will only present application files that are not currently loaded
into the current Sesame server.
It will present application files that are in the current root directories available to that
server that are not loaded in that server, but might be loaded into a different Sesame
server. Each Sesame server is independent of any others that may be running on that
computer, or any computer that has access to that computer's file system, and cannot
know if any application file is loaded onto a different Sesame server. Because it can
only know if a file is locked or unlocked and whether or not that file is loaded into its
own memory, a Sesame server can unlock applications that are loaded in a different
Sesame server.
Because unlocking a running application can cause that application file to be rendered
unusable, the Sesame server checks if its application files have been unlocked by an
external server. If they have, the Sesame server with those file loaded will
immediately begin to refuse to save any changes made by the attached clients. The
clients will receive an alert indicating, "This application has been unlocked while
running. This application will no longer save changes to the application files. It is
recommended that you close this application at once."
502
APPENDIX 1 NETWORK ADMINISTRATION
Additionally, Sesame 2.0 uses facilities in the operating system to make it difficult, if
not impossible, for an external program or user to unlock, copy over, delete, or in any
other way alter a running Sesame application. In most cases it requires a concerted
effort to allow an external program, including a different Sesame server or the
command line "sunlock" program to unlock a running Sesame application. Different
operating systems provide differing levels of file protection and cannot be relied on to
provide 100% protection for running files. For this reason, it is strongly advised that
great care be used when copying application files atop one another, or when unlocking
an application, to make sure that you are not inadvertently unlocking or overwriting a
running application.
Communications
Sesame 2.0 provides a "heartbeat" message to client/server network communications.
Every ten seconds, the Sesame server sends a "ping" message to each of the
connected clients. If a client, for whatever reason, does not respond to the heartbeat
message within thirty seconds, that client is considered disconnected and the server
will close the ports used by that client and reclaim the connection for use by a
different client. This all happens automatically and does need any action on the part of
the user or administrator. The "ping" and the "ping reply" are handled in tasks
separated from the main tasks in both the client and the server. So having
exceptionally busy clients or servers will not cause a timeout condition. Clients are not
automatically detached due to inactivity or idleness.
Many of the critical communications between client and server now have timeout
values so that the client or server can detect if the network has failed. This allows the
client or server to continue operation and report the error, rather than waiting
indefinitely for communications to resume. The length of the timeout period varies
depending on the command. Most are set to very lengthy periods, greater than ten
minutes, to prevent premature failures.
Communication timeout detection is entirely automatic. It does not require any action
on the part of the user. Should a communications failure occur, it is important that the
circumstances be examined to determine if there has been a network failure. Any
network failure should be repaired before that network is put back in use.
503
APPENDIX 1 NETWORK ADMINISTRATION
Optimizing Performance
Sesame 2.0 incorporates many new features to maximize performance. Some are
automatic, some are optional.
Load optimization occurs when an application is loaded into the Sesame Server from
the application file. Sesame 2.0 loads applications 4-10 times faster than Sesame
1.x.x, depending on the size and configuration of the Sesame application. For
example, on a Pentium IV with 2 gigabytes of RAM, a 100,000 record application with
442 megabytes of data, takes 61 seconds to load in Sesame 1.1.4. The same
application takes 6 seconds to load in Sesame 2.0. An application with 91,000 records,
but only 25 megabytes of data takes 4 seconds to load in Sesame 1.1.4, and only one
second in Sesame 2.0.
This optimization is in place for initial loading when an application is opened by a client
or standalone, and also when applications are loaded to be used by "X" commands in
SBasic. The optimization is in the Sesame Server and in Sesame standalone. If you
have a large application and start to see slower loads occurring, the server/standalone
computer probably needs to have more RAM installed.
Load optimization is achieved by preloading the file image of the application's files
directly into memory in a single operation and then "parsing" that image into the
application the Server will actually present to the clients. This means that the
optimization depends on the server computer having enough memory to briefly keep
two copies of the application in memory. If the load cannot get enough memory,
including both RAM and "swap", for the optimization, it will "fail over" and use the
slower load. This is a very rare condition and will only occur if the application file is
very large, or there is very little available memory.
Relational record searches have also been optimized through a dynamic index of the
relational key fields in the child records. This allows the child records to be excluded
504
APPENDIX 1 NETWORK ADMINISTRATION
from consideration in the search much faster, especially if the relational key field is
unique or exclusive in value.
Both relational search optimizations depend on the search parameter and the key
fields to be free of search constructs. In other words they must be values that match
the field value as a whole, rather than wildcards or range comparisons.
X-Commands
With the SERVER PREINDEX XLOOKUPS flag set in the sesame.ini file, XLookup
commands use the same preindexing as relational records. This allows the X-
Commands to run much faster than non-indexed records. Setting the flag will cause X-
Commands to run 100 to 400 times faster. For example, a simple XLookup to an
application with 100,000 records normally provides 385 results a minute. The same
XLookup using the preindexing flag provides 120,774 results a minute. As with the
relational indexing, the X-Command indexing requires that the key value not contain
any search constructs, such as wildcards or range comparisons.
Images
In Sesame 2.0, images are cached on the Server. This means that after the Server
has read an image file from the hard drive, it is kept in memory. If that image is
needed again, it does not need to be reread from the hard drive, but can be sent from
the server's memory directly to the requesting client.
FormFieldValues in Tables
The SBasic function @FormFieldValues detects if the element to be accessed is in a
table. If so it reads the value directly from the table without requiring that the table
refresh that value from the server. While necessary for a form view subforms, further
acquisition is not required by table subforms in that every record In a table subform
has already been acquired from the server. This results in much faster
access to elements in tables than is possible in Sesame 1.x.x. In Sesame 1.x.x, a
typical retrieval from a table view subform provided 4,575 values a minute from
@FormFieldValues. In Sesame 2.0 the same function provides 373,720 values a
minute on the same Pentium IV computer.
505
Appendix 2
Sesame Environment Variables
Sesame uses a small set of environment variables to customize its behavior. Most of
these variables are completely optional. Some of the variables are created by Sesame.
Others are operating system variables used by Sesame to locate specific resources.
Unix-only variables
BROWSER* Used by Sesame to determine the HTML browser to be used by the Help
System. If BROWSER is not set, the HTML browser "netscape" will be invoked.
LPDEST* Used by Sesame to determine the special file for the printer device to be
used. LPDEST is only used if PRINTER is not set.
507
APPENDIX 2 ENVIRONMENT VARIABLES
PRINTER* Used by Sesame to determine the special file for the printer device to be
used. PRINTER is only used if SESAME_PRINTER is not set.
SESAME_PRINTER Used by Sesame to determine the special file for the printer
device.
For Microsoft Windows operating systems, because the method of setting environment
variables is different on most versions of Microsoft Windows, see your operating
system documentation for how to set environment variables for your system.
For Unix based operating systems, environment variables are set based on the shell
being employed:
Examples:
ksh: export LPDEST=/dev/lp
tcsh: setenv LPDEST /dev/lp
Schedule_Report_2_2003_11_02_20_47_29.htm
By default, these HTML files are created in your current working directory. The current
working directory is where you "are" as far as your computer is concerned. This
directory is not affected by where you installed Sesame. If you started Sesame using a
Windows desktop shortcut, your working directory is the path shown in the Start In
property of the shortcut. If the Start In property is blank, then your working directory
is a system default directory, such as your Desktop folder. If you are running from a
command line, the current working directory is the directory shown at the command
prompt.
508
APPENDIX 2 ENVIRONMENT VARIABLES
If you do not want your report files in the current working directory, you can set an
environment variable to specify a different path for them a path such as
c:\sesame\reports.
Follow the steps below to set this environment variable on the Sesame Client
computer for that computers operating system. Other Sesame environment variables
can be set using the same procedure. If you are unsure about anything, or the screens
shown below are not the same as yours, ask your system or database administrator
for assistance.
2. Create the folder on your computer (if it doesnt already exist) where you want
to store your Report Writer output files. For example, c:\sesame\reports.
3. From your Windows XP or Windows 2000 desktop, click Start / Control Panel.
5. Click on the Advanced tab. (See Figure 1a for Windows XP; Figure 1b for
Windows 2000.)
509
APPENDIX 2 ENVIRONMENT VARIABLES
Figure 1a. The Windows XP System Properties Advanced tab with the Environment Variables
button.
510
APPENDIX 2 ENVIRONMENT VARIABLES
Figure 1b. The Windows 2000 System Properties Advanced tab with the Environmental Variables
button.
7. Under System Variables, click on the New button to display the New System
Variable dialog. (See Figure 3.)
511
APPENDIX 2 ENVIRONMENT VARIABLES
512
APPENDIX 2 ENVIRONMENT VARIABLES
9. In the Variable value field, type the full path to the folder where you want
Sesame to create your report files. Figure 3 shows a C:\SESAME\REPORTS
path already entered.
10. Double-check that you typed the variable name and value correctly, then click
OK to save your new environment variable.
11. Click OK twice more to return to Control Panel, then close Control Panel.
Your SESAME_REPORT_PATH environment variable has been set. You do not need to
restart your computer.
For Windows 98
2. Create the folder on your computer (if it doesnt already exist) where you want
to store your Report Writer output files. For example, c:\sesame\reports.
4. Move to the end of the file and, on the first available empty line, type the
following:
SET SESAME_REPORT_PATH=C:\SESAME\REPORTS
5. Replace C:\SESAME\REPORTS with the full path to the folder where you want
your Report Writer output files stored. Otherwise, the line must be typed
exactly as shown. Do not use quotation marks.
7. Close any open programs, then restart your computer for the change to take
effect.
For Unix based operating systems, environment variables are set based on the shell
being employed:
Examples:
ksh: export SESAME_REPORT_PATH = "/usr/local/Sesame/Reports"
tcsh: setenv SESAME_REPORT_PATH "/usr/local/Sesame/Reports"
513
Appendix 3
Philosophy
Filling the void
If you are familiar with the history of Sesame, then you know that it began as a
replacement product for a Symantec database product called Q&A. All of the original
Lantica team are developers, consultants and power users brought together by using
Q&A. As Q&A began to be less and less viable, mainly due to changes to hardware and
operating systems, the Q&A community began to look for a replacement. They wanted
an easy-to-use database product that they could run themselves, yet still had enough
power to create viable business applications. They had a hard time finding one.
The current software market is filled with application development tools. These are
products focused on allowing a consultant/developer to build an application which
users then use. The users dont really know how it works and they cant find out. If
they need changes, the consultant/developer must provide them. Many products are
turning more and more into nothing more than front-ends for high-end database
engines.
Sesame, on the other hand, tries to maintain a slant towards the user. Simple tasks
remain simple until you ask for more complexity. Powerful features are available, but
you are not forced to deal with them. Wherever possible, Sesame offers you the easy
way first. Its design philosophy is centered around allowing users and small business
people to be self-sufficient.
Form based
Sesame is highly form-based, especially in Designer. The connection between data and
forms is often difficult for a new user to understand. Sesame allows you to build your
forms first. As you build forms, Sesame quietly creates matching storage for your
data. This is explained more fully in the Advanced Concepts appendix of this manual.
Non-invasive interface
Sesame tries to avoid doing anything that you did not explicitly ask it to do. It also
tries to stay out of your way as much as possible. Confirmation dialog boxes are
limited to actions that can be destructive to your data. Layout elements and forms
attempt to maintain your cursor position as you move between elements and records.
515
APPENDIX 3 PHILOSOPHY
Command trees maintain the state you left them in until you close their tab. In
general, screen elements do not attempt to second-guess your intent.
Revaluate ease-of-use
Just because a particular technique is common, that alone does not automatically
mean that it is good. While familiarity is part of overall ease-of-use, it is not the only
factor to be considered. Sesame sometimes departs from a commonly used technique
where doing so would improve usability.
It allows for a much smaller installation for those users who do not need to
design or redesign databases.
It protects a copy of the application design itself.
It allows the application designer to make and test extensive changes to a
working application without requiring the runtime users to stop working.
It allows the application designer to keep multiple revisions of an application
design. This way, if a particular change does not work out, it is fairly easy to
retreat to an earlier version of your application. This also allows you to keep a
history of your application changes.
516
APPENDIX 3 PHILOSOPHY
Designer takes the opposite route. With few exceptions, all properties are available at
all times. If one of the selected elements does not accept the property, that element is
simply skipped. For example, all elements have a background color property.
However, only certain elements display a value of type DATE. If you select several
elements and apply a background color, the change affects all the selected elements.
If you then change the date format, the change affects only those elements displaying
a value of type DATE. The non-DATE elements are ignored. This prevents you from
having to deselect all the non-DATE Elements to apply your format change.
It allows you retain the "last thing you did". For example, you can set sizing
and alignment for one set of elements, then apply those same settings to
another set of elements with a single click, and without having to remember
exactly what you did.
It keeps the current settings available for reference until you actually change
them.
It allows Designer to offer richer controls for setting properties than are
needed for displaying properties. For example, the color chip palettes used for
selecting colors, as opposed to the single line used to display your choice.
Report Writer
Sesame Report Writer does not look like the striated "WYSIWYG" report designer that
is often used. The main reason for this is because those report designers are not really
WYSIWYG. The striated sections are not able to correctly depict the dynamic section
sizing and repetition that occurs when a report is actually run. Sesame Report Writer
uses a simple list. You tell it what you want in what order. Because the reports are
HTML-based, sizing and layout is handled automatically. By not pretending to be
WYSIWYG, Sesame Report Writer can often provide a clearer picture of what your
report design will actually produce.
517
Appendix 4
Advanced Concepts
Application components
By this time you will have built several forms, added numerous layout elements, and
created the components that are the underpinnings of Sesame: databases and fields.
While it is not necessary to understand exactly how these elements relate to one
another, it may well be beneficial to the designer of more complex applications to have
a clear picture of what is going on "behind the scenes."
In the simplest case, you create a form. Sesame takes note of this and builds a
database to which that form is tied. You then place layout elements, such as text
boxes, combo boxes, or radio button groups, on the form. Sesame builds fields in the
database that can hold data for each of these elements. In this simple case, a form
and a database parallel each other. A layout element and a field parallel each other. A
form contains layout elements and gets data from a database. A layout element is the
"window" onto the data contained in a particular field in that database. (See Figure 1.)
519
APPENDIX 4 ADVANCED CONCEPTS
Figure 1. Forms and layout elements provide a "window" onto your data.
520
APPENDIX 4 ADVANCED CONCEPTS
The form-to-record definition relationship is often completely invisible. But, there are a
few cases where this relationship can be manipulated by the application designer get
the most out of their application. The most obvious example of this is a database that
contains more than one form providing views onto a single record definition. Because
Sesame separates forms from records, it is easy to build two forms that each show the
same set of records. These records, will, of course, be built from the same record
definition.
For example, imagine that you have a form that displays employee information. It is
complete in that it displays all of the information about each employee. You may also
want a form that only displays contact information about each employee, excluding
many of the fields that are not appropriate. You could use the same form again and a
healthy bit of security to hide the inappropriate layout elements. But, in many cases, it
would be far simpler to build a second form that is simply bound to the same record
definition as the first. Its layout elements would then be bound to the field definitions
of the desired fields, thereby hiding much of the information the first, more complete,
Form reveals. Figure 2 shows the field definitions that might appear in an Employees
record definition.
The sample record definition in Figure 2 is created automatically by building the form
in Figure 3. No additional field definitions are created by building the form in Figure 4.
Instead, the form and its layout elements are bound to the record definition and field
definitions that were created when building the form shown in Figure 3.
521
APPENDIX 4 ADVANCED CONCEPTS
Figure 4. A second form based on the Employees record definition, but showing only some of the
fields.
Once a form is built, and a record definition is bound to that form, Sesame can build
records based on that record definition. These records are bound to the record
definition that was used to make them. Just as a form has a record definition specified
as one of its parameters, every record in a Sesame application also has a record
definition as one of its parameters. This is how Sesame determines the type of any
record in the application. Unlike the layout element-to-field definition relationship, a
522
APPENDIX 4 ADVANCED CONCEPTS
record can never be unbound from its record definition, or re-bound to a different
definition.
Subform elements have the concept of a view. A text field can be displayed in Sesame
using a text box, a combo box, or even a radio button group. Each of these are views
onto the text field. The subform element isnt quite so flexible. Its views are limited to
Table View or Form View. The views can be seen as both a kind of filter and a type of
format. The Table View, for example, filters out (does not display) any static elements
from the form displayed in the subform element. The format for a Table View subform
is the familiar tabular arrangement of columns and rows, where each column
represents a non-static layout element and each row represents a record. The view
used by an element to display a field value or another form does not change the
underlying bound data in any way. Views are there to help you and your users
understand and edit their data.
If we were to look directly at the record definition for the Album record we would see a
field definition called SongList. That field definition would have the type SUBRECORD
and would contain the record identifier (an index into the application) that points to
the record definition for the Song records. If we looked directly at an actual Album
record, we would find a field that contains the record identifier for a Song record as its
data. That way each Album has a unique list of Songs as children. Note that natural
linking uses direct pointers to records. There are no key fields (hidden or otherwise) as
there are in relational linking. (See Figure 5.)
523
APPENDIX 4 ADVANCED CONCEPTS
Figure 5. With Natural linking, relationships are stored as pointers to actual records.
Natural linking has the advantage of being very simple and very fast. But it is also
inflexible. With natural linking, once a record is set as a child of another record, it
cannot be moved to be a child of a different parent record. The parent record can
delete its children, or add more children, but it cannot share a child with another
parent record. So, if a song is on an original album, and also on the Greatest Hits
album of the same musical group, that song would appear identically on two different
song records, under two different album records. If you were to correct the songs
author field in one of the two records, it would not be changed in the other. That can
lead to a data normalization problem, if the two recordings are actually identical
songs.
524
APPENDIX 4 ADVANCED CONCEPTS
Going back to our example of a record album collection, while it may make sense to
use natural linking to attach a Song to a particular album, you may want to look at
your Songs by genre instead. Since you may change your mind about how to
categorize a song, you probably want to use the more flexible relational linking.
Relational linking is slower that natural linking, because it has to match key values,
however, you can easily change the parent record to which any particular child record
belongs simply by changing the key value in the child. For example, if you create a
parent form and record definition called Genres (with a field named GenreName), you
can then add a field to Songs called Genre. When you create your subform, tell
Sesame that the relational link exists between Genres!GenreName and Songs!Genre.
When you view the Genres records, the Songs tagged "Jazz" will show up under the
Jazz record, the Songs tagged Classical will show up under the Classical record, and so
on.
Relational linking is even more flexible than a simple match between two fields. The
parents key field acts as a "Retrieve Spec" and can use the same syntax as the
retrieve form uses for that field type. You can use this capability to have a Song
appear under more than one Genre. If, instead of simply tagging a Song "Classical",
you tag it "Classical, Italian, Opera", then it can show up under three different Genre
records having the key values "..Classical..", "..Italian.." and "..Opera..", respectively.
(See Figure 6.) This way, you can use the same record for all three Genres, rather
than having to create three separate records. Also, because the same record appears
as a child under each parent, if you correct the spelling of the Song title in the record,
it will automatically appear correctly under each parent record. In most cases the key
field values should be generated by programming. In many cases they never need be
set visible to the user.
Figure 6. Relational linking allows the same record to appear under more than one parent
record.
525
APPENDIX 4 ADVANCED CONCEPTS
A simple way to understand the basic difference between relational and natural linking
is to imagine two families: the Nevilles and the Orvilles. The Nevilles all hold each
others hands. The Neville parents recognize their own children because they are
holding the eldest childs hand. The eldest child holds the next oldest childs hand, on
down the line of children to the youngest. The Nevilles are a naturally bound family.
The Orvilles are relational. The parent wears a tee shirt that says "Orville" on the
front. The children each have tee shirts that say "Orville" on the back. The parent
knows the children by matching the names on the tee shirts. (See Figure 7.)
526
APPENDIX 4 ADVANCED CONCEPTS
Definitions summary
Layout Element A display element (or "widget") that displays the contents of a
field (bound) or the result of a calculation (unbound). A bound layout element
knows what field definition defines the field value to display. A layout element is
contained by a form. Layout elements live in the user interface.
Field The component of Sesame that can actually contain user data. It is
defined by a field definition. It is contained by a record. Fields live in the data
engine.
Field Definition The component of Sesame that tells a field what type it is. It is
contained by a record definition. Field definitions live in the data engine.
sesame
alone tells Sesame to start with the client behavior and the server behavior
integrated together in a one standalone executable.
527
APPENDIX 4 ADVANCED CONCEPTS
One of the most difficult aspects in writing a piece of software that must operate both
locally and through a network, is insulating the code from that difference in behavior.
To accomplish this, Sesame uses a set of "proxies" to allow the client or the server to
always act the same. A proxy is a component of the software that emulates something
else. If Sesame is running as a client through a network and is attached to a server,
there is a component on the client computer that is pretending to be the server. If you
run Sesame as a server, for each client actually connected through the network, there
is a proxy pretending to be that client running on the servers computer.
If we were to follow a command (such as save a value) through the Sesame system
when a client is connected to a server through the network, it would take the following
steps:
As far as the client and the server are concerned, they talk to each other through the
pipe and are completely unaware of the intervening network. Figure 8 shows a
Sesame server with two Sesame clients connected. Figure 9 shows Sesame running
standalone, with the same machine acting as both server and client.
528
APPENDIX 4 ADVANCED CONCEPTS
If Sesame is started without specifying any of the networking options via the startup
flags, the client and the server talk to each other directly through the same pipes
otherwise used to communicate with the proxies. This arrangement not only means
that neither the client nor the server ever have to be concerned with the network, it
also means that the network itself can be readily replaced with any other means of
communication simply by replacing the proxies for proxies that "speak" an
alternative protocol.
529
APPENDIX 4 ADVANCED CONCEPTS
The only time the client or the server concern themselves with the network is during
startup and shutdown. When Sesame starts up it reads the startup flags and chooses
a single course of action depending on their state. If no startup flags are specified and
Sesame is running "standalone" (that is, all on one machine not client/server), the
server (or "data engine") starts first. If all is well, it then "spins off" the client thread.
A thread is a task that can run simultaneously with the process that started it. Pipes
are then established, so the server thread and the client thread can communicate. If
Sesame is started as a client and told to connect to a server on a different machine, it
starts by spinning off the server proxy thread. The server proxy thread attempts to
establish communications with the servers client thread across the network. If it can
establish network communications, it spins off the client thread and connects to it
using pipes. For each client that connects to the server, the server spins off another
client proxy.
When a command arrives at a networked server from any client, that command also
spins off an "execute thread" on the server. That way each client does not have to
wait for another clients command to finish executing before their command begins.
They both run simultaneously, sharing resources, including the CPU. If the server
machine is equipped with multiple CPUs, Sesame will take advantage of them, allowing
commands to run truly simultaneously. If the server machine only has one CPU, the
CPU is shared between execute threads in a round robin fashion, with each thread
receiving roughly equal time slices.
530
APPENDIX 4 ADVANCED CONCEPTS
and
The first port is used for the command protocol. The second port is used for the
notification protocol.
The command protocol always originates on the client. The server cannot issue any
commands to the client. In that sense, the client drives Sesame. The command is
received by the server and queued with the other commands from other clients. The
communications engine on the server de-queues each command in the order in which
they arrived and hands that command to the data engine. The data engine spins off a
thread to execute that command. At the same time, the communications engine is de-
queuing the next command in line.
The command protocol is a "command and reply" type protocol. This means that every
time a client issues a command the server will reply to that command with data
results, a flag indicating success or failure, or an error message of some kind. The
client "waits" for that reply and cannot issue another command until that reply arrives.
A user level command, such as "Retrieve the records that match this Retrieve Spec
and sort them as specified", is actually issued as half a dozen (or so) smaller
commands. By breaking large commands down into many smaller component
commands, with replies, we prevent the client from waiting overly long and becoming
unresponsive to the user. In all, Sesames server responds to over 250 different low
level commands.
Notifications come solely from the server and can be sent to either an individual and
specific client, or broadcast to all of the clients at once. The notification protocol is a
"one-way" protocol. The server does not wait for the clients to reply. Most notifications
involve events that inform the user of an event on the server that was not originated
from that client. Specifically, the locking and unlocking of records by other clients, the
shutdown of the server, the closure of a shared database, or a catastrophic failure in
the data engine from which it cannot recover.
Encryption
With the exception of passwords, Sesame protocols are not encrypted. But because
Sesame communicates through ordinary TCP/IP network ports, it is quite possible for a
531
APPENDIX 4 ADVANCED CONCEPTS
Delegation of labor
The client and the server both have jobs to do for the users. Largely, the server does
all of the work. (See Listing 1.) The client has a lot more fun. The client is concerned
primarily with providing a "window" a view, onto the data being managed by the
server. It also must be responsive to the input provided by the user interface (mouse
and keyboard) and translating the commands as issued by the user into commands
that the server can understand. It then sends those commands to the server and waits
for a reply. Once a reply comes in, the client must then display the results of the
command on the screen in a way the user can understand. The server receives
commands from one or more clients and opens database files, searches through data,
sorts, builds records, deletes records, modifies data, stores the forms, reports, and
specs and, of course, saves the results of these operations to the database files. If
multiple users open the same database file, the server does not load different copies
for each user, they share the same file. No two servers can access a Sesame database
file at the same time. If you wish to have multiple users use the same database files,
they must connect as clients to the same networked server.
The Sesame server is itself divided into two portions: the data engine and the
communications engine. The data engine manages the opening and closing of multiple
databases and applications. It performs the needed operations on the data, and saves
the results. The data engine performs nearly all of the file I/O operations in Sesame. It
is also in charge of managing the numerous "work threads" that run simultaneously to
create, edit, and delete records. The data engine keeps these work threads from
stepping on each others toes when trying to access the exact same data at the exact
same time.
The client receives the forms, reports, and specs from the server. The server stores all
of the user defined Sesame components as records in the database file. It is the
clients job to determine the relationship between open forms, reports, and specs and
the data they display or manipulate. If, for example the user is using a retrieve spec,
the client receives the form (the user has selected) from the engine. It translates that
"form" into the layout elements that appear on the screen. The user types in the
retrieve spec and hits F10. The client gathers the specification from the layout
532
APPENDIX 4 ADVANCED CONCEPTS
elements and builds a "search command" for the engine to perform, including in that
command the name of the record definition attached to that form. The server uses
that record definition to determine which kind of records to search.
The client performs almost no data manipulation tasks, and therefore does not need to
be nearly as powerful a computer as the server. The one exception to this is SBasic
program execution. Almost all SBasic programs run on the client, not the server. That
is why SBasic programs use layout element names instead of field names. SBasic runs
on the client and has direct access to the form that generated the event (on enter, on
exit, on change, and so forth) that caused the execution to begin. That is how SBasic
programs can temporarily change the size, color, and position of layout elements.
SBasic can also change the data on a form without committing that data, if that is
desired. Again, this is only possible because the program is running on the client,
rather than directly changing the data on the server.
There is a single exception to this. Retrieve spec programming runs on the server. This
is because the retrieve itself is performed on the server. The limitations on SBasic
during retrieve spec program execution that the program consists entirely of an
expression, rather than statements, subroutines, declarations, or any other elements
prevents the server from attempting to alter a form or report while running. It also
means that you need to use Field Names in Retrieve spec programming whereas you
use layout element names universally elsewhere in Sesame programming.
File pairings
The database files themselves are also divided. The .db/.dsr file contains only
structural components. It tells Sesame how the data is to be arranged what the
relationships are between the various records and record definitions. All the actual
data, the contents of the fields, and nothing else, is stored in the .dat/.ddt files. The
division between the Sesame runtime files (.db) and the Sesame Designer files allows
the application to be altered in the Sesame designer file while it is still in operation
and open by a Sesame server. It is only during the reconciliation step that an
application becomes the exclusive property of the Sesame Designer. When a .db file is
533
APPENDIX 4 ADVANCED CONCEPTS
opened by the Sesame server, it searches for the .dat file that matches the filename
specified, and merges the data in the .dat file with the structure found in the .db file.
Together, in memory, these two become a running application.
When changes are made to either the data (a field has been edited and the record
committed), or to the structure of a database (a record has been deleted or created),
the engine writes those changes out to the Sesame database file immediately.
Because such changes are interactive and must happen very quickly, it writes them in
a kind of "shorthand" notation. It isnt until the database file is reopened that the
changes are completely and seamlessly integrated into the file. You can see this occur
when the client informs the user that the database is being "optimized".
To continue the theme one step further, by separating Sesame as a whole from the
operating system on which it runs, we are able to produce Sesame for virtually any
modern operating system. This is done by putting a generic layer of code between
Sesame and the host operating system. In a sense, Sesame uses a "proxy" operating
system, which is always the same no matter what operating system is actually
running. Almost all of the operating system specific operations are done in this layer
and are thereby hidden from Sesame itself.
Fortunately, there are several GUI toolkits that provide a unifying layer between
Windows and X11. The one used in Sesame is called FLTK. FLTK is an acronym for Fast
Light Toolkit. It is freely available at www.fltk.org and is protected by a modified GNU
Library license that provides for both commercial and non-commercial use. FLTK works
by using the underlying GUI to simply draw the window frame and read the mouse
and keyboard. It then uses the low level drawing routines of Microsoft Windows, X11,
or Macintosh to draw the "widgets" and other GUI elements. This ensures that they
appear identically on any of the supported operating systems. As far as Sesame is
concerned, it runs on FLTK, and it rarely needs to concern itself with whether the GUI
under FLTK is Windows or X11.
Sesame does not use any proprietary interfaces. Proprietary interfaces limit the
lifespan of any program that uses them. Proprietary interfaces change, are replaced,
or are simply discontinued. All of the interfaces in Sesame were selected for their
proven stability, common sense approach, and adherence to widely accepted
standards.
535
APPENDIX 4 ADVANCED CONCEPTS
During operation Sesame does not create, delete, or attempt to manage directories. It
creates no temporary or hidden files. It does not require that it be placed in any one
particular directory. Nor does it require that its application files be placed in any
particular directory. While it does use defaults during installation, it will continue to
operate should the user or administrator move or rearrange things. When it is
necessary to limit Sesames access to specific directories, simple text files and
environment variables are used to tell Sesame where the files have gone. The number
and complexity of these external files is very low. The formats of these files comply
with the simplest and widest standards: ASCII and HTML. Even Sesames license file is
completely optional, though Sesame will only allow one client connection if it cannot
be found. And, while Sesame does require that the operating system provide a web
browser for report preview operations, it does not require that it be any particular
browser. Opera, Microsoft Internet Explorer, Netscape, Mozilla, or any other HTML 2.0
compliant browser is acceptable.
Future versions
By rigorously following this philosophy, Sesame will be able to move to additional
operating systems should the market demand and continue operation on Linux
and Microsoft Windows well into the foreseeable future. By being well insulated from
the host operating system, the network, even the printer interface, Sesame will be
able to adapt to changes in current technology and the introduction of new
technologies with aplomb. Additionally, because Sesame is self-contained and free of
external dependencies, entire product lines can be discontinued with no effect on
Sesames continued use and development.
536
Appendix 5
Sesame Utility Programs
Sesame comes with several utility programs, located in the Tools subdirectory of your
Sesame install directory. These programs are described as follows.
SUnlock
SUnlock (sunlock.exe) unlocks a locked application. An application is locked when it is
opened by Sesame. If the application is not properly closed due to a power failure or
other error, the application will remain locked and Sesame will be unable to reopen it.
In this case, SUnlock can be used to unlock the application. SUnlock should not be
used to unlock an application which is legitimately locked because it is in use.
filename: The name of the application .db file to unlock. If the .db file is not located
in the current working directory, you must provide path to the .db file.
sunlock my_application.db
sunlock c:\sesame\data\my_application.db
SVersion
SVersion (s_version.exe) prints the internal version number and the lock status of an
application (.db file). Note that the version number returned is the internal structural
version number, not the release version number of the Sesame software itself. If you
contact Lantica Technical Support, they may request this version number.
filename: The name of the .db file to examine. If the .db file is not located in the
current working directory, you must provide the path to the .db file.
s_version my_application.db
s_version c:\sesame\data\my_application.db
Output:
VERSION NUMBER: 0.243000 LOCKED STATE: 1
537
Appendix 6
Sesame Shortcut Keys
Keystroke Module or Operation Description
F1 All Opens context sensitive help screens
F2 All Macro playback
Shift-F2 All Macro recording start/stop
F3 Add Data, Search Permanently deletes a record with user
Update, Table View confirmation.
F3 Retrieve Spec Clears the retrieve spec
Alt-F4 All Exit from active program Sesame,
Designer, table view, expanded field editor,
program editor, etc.
F5 Designer Property Editor, Fills in Current values for certain layout
Report Writer Property element settings such as Label, Name,
Editor Initial Value, Restrict values, tooltip,
Custom Help.
F5 Add Data, Search Dittos (copies) into the current field the
Update, Table View value of the same field from the record last
entered.
Shift-F5 Add Data, Search Dittos (copies) a whole record. It
Update, Table View overwrites the entire current record with
the record last entered (with user
confirmation).
Ctrl-F5 Add Data, Search Inserts the current date into the selected
Update, Table View field.
Alt-F5 Add Data, Search Inserts the current time into the selected
Update, Table View field.
F6 Add Data, Search Opens expanded field editor. Closes
Update, Table View, expanded field editor, saving changes, if it
Designer Property Editor, is already open.
Report Writer Property
Editor
Shift-F6 Add Data, Search Update Opens current result set in table view
Ctrl-F6 Search Update Switches from Update to Add mode
539
APPENDIX 6 SHORTCUT KEYS
540
Appendix 7
Sesame Initialization File - sesame.ini
Sesame Initialization File
The Sesame initialization file provides a way for you to specify how Sesame looks and
behaves. It is typically named "sesame.ini". Sesame.ini is not required. If this ini file
does not exist, Sesame will use default settings.
You can create one from scratch, using Notepad or any other text editor. It
must be saved with the name sesame.ini and stored in the current working
directory (normally \Sesame2).
There is a sample file supplied with Sesame. You will find it in \Sesame.
Rename it from Sample.ini to Sesame.ini. This file contains a selection of the
more popular commands that you might like to alter as you wish.
Sesame Designer can generate a comprehensive Sesame.ini file with all your
current settings. Select Save Global Settings from Designer's File menu.
The first time you use Save Global Settingsyou will see the message box shown in
Figure 2 below. If you repeat using Save Global Settings you will be asked to confirm
that you want to overwrite the .ini file.
541
APPENDIX 7 SESAME.INI FILE
Warning! The .ini file generated this way will contain a large number of settings.
Some of these are fairly obscure. Some of them, if modified, might make Sesame
work in unfamiliar ways, so take care. You are advised to alter only those settings you
are familiar with. It is safer to start with the sample ini file provided and modify that to
your requirements.
Sesame.ini is read at program startup by the server, the client, and in standalone
mode. Each mode will use only the settings appropriate to that mode. For example, a
Server will not use the BACKGROUND COLOR setting. It needs to appear in the current
working directory (Start In directory) unless the "-ini_file" startup flag is used or the
SESAME_INI_FILE environment variable is set. Settings in the sesame.ini file override
their matching startup switches.
The sesame.ini file is comprised of "commands" that tell Sesame how to behave. Lines
beginning with a hash mark (#) are treated as comments. Any line that is not
recognized as a command or comment is ignored. Commands must be placed in the
file with one command per line in the following format:
COMMAND: VALUE
BACKGROUND COLOR: Sets the primary background color of Sesame windows to the
RGB value following the command. This setting affects the background color of many
Sesame screen elements, such as toolbars, message boxes and scrollbars. This setting
has no effect on user-defined Forms.
Example: BACKGROUND COLOR: 255 0 0
542
APPENDIX 7 SESAME.INI FILE
FOREGROUND COLOR: Sets the foreground color used by Sesame windows to the RGB
value following the command. This setting affects the foreground color of many
Sesame screen elements, such as text and labels. This setting has no effect on user-
defined Forms.
Example: FOREGROUND COLOR: 255 255 0
MENU FONT: Sets the primary font face used by Sesame screen elements such as
menus and dialog boxes. This setting has no effect on user-defined Forms.
Example: MENU FONT: Courier New
MENU FONT SIZE: Sets the size in pixels of the primary font used by Sesame screen
elements such as menus and dialog boxes. This setting may be ignored or limited for
screen elements with limited space. This setting has no effect on user-defined Forms.
Example: MENU FONT SIZE: 10
SECONDARY FONT: Sets the secondary font face used by Sesame screen elements
such as status bars. This setting has no effect on user-defined Forms.
Example: SECONDARY FONT: Courier New
SECONDARY FONT SIZE: Sets the size in pixels of the secondary font used by Sesame
screen elements such as status bars. This setting may be ignored or limited for screen
elements with limited space. This setting has no effect on user-defined Forms.
Example: SECONDARY FONT SIZE: 10
PROGRAM EDITOR FONT SIZE: Sets the size in pixels of the font used for code typed
into the Sesame Program Editor. Valid settings are 4 to 42.
Example: PROGRAM EDITOR FONT SIZE: 16
SCHEME: Sets the overall visual theme used by Sesame. The scheme affects the look
of all screen elements including those on user-defined Forms. The scheme can also be
set using the scheme startup switch. Available schemes are:
Plastic A highly stylized theme with rounded edges and softened colors.
Clean A crisp theme with minimal decoration.
Gradient All backgrounds are drawn as gradients of their background color.
Ghost Gradient theme that grades to lightened background colors.
Image Specifies an image to use as the background for all screen elements. The
path and filename of the image must be supplied.
SCHEME: image:\ImagePath\ImageName.jpg
Example: SCHEME: Plastic
SPLASH IMAGE: Replaces the usual Sesame splash image with the image specified in
Runtime and Preview modes. The SDesigner splash image is not replaced. The path
and filename of the image must be supplied. Same as using the splash startup
switch.
Example: SPLASH IMAGE: \ImagePath\ImageName.jpg
Default: Sesame Logo
543
APPENDIX 7 SESAME.INI FILE
COMMAND TREE HEIGHT: Specifies how much of the Command Area is used by the
Command Tree. The remainder will be used by the Spec Window. Set the command
value to a number of pixels or CLOSED. If CLOSED is used, users will not be able to
open the Command Tree.
Example: COMMAND TREE HEIGHT: 200
Default: 300
COMMAND TREE MODE: Sets the mode of the Command Tree. Valid settings are
SINGLE and FULL. SINGLE shows only one level or "branch" of commands at a time.
FULL shows the entire command tree allowing branches of commands to be opened
and closed as needed. Use of SINGLE mode will not interfere with the use of the
@SelectTreeItem SBasic command. SINGLE is the same as using the single_level
startup switch.
Example: COMMAND TREE MODE: SINGLE
Default: FULL
FIELD EDITOR HEIGHT: Sets the initial height in pixels of the F6 Field Editor.
Example: FIELD EDITOR HEIGHT: 300
Default: 300
FIELD EDITOR WIDTH: Sets the initial width in pixels of the F6 Field Editor.
Example: FIELD EDITOR WIDTH: 300
Default: 400
FIELD EDITOR WORD WRAP: Sets word wrap behavior for the F6 Field Editor. Valid
settings are ON and OFF.
Example: FIELD EDITOR WORD WRAP: OFF
Default: ON
Default: 545
X: Sets the initial distance in pixels of the left edge Sesame window from the left edge
of the screen.
Example: X: 100
No Default
Y: Sets the initial distance in pixels of the top edge Sesame window from the top edge
of the screen.
Example: Y: 50
No Default
TABLE ROW HEADER WIDTH: Sets the width in pixels of the record number column
appearing in Table View and Table View subforms.
Example: TABLE ROW HEADER WIDTH: 50
Default: 70
DEFAULT SEARCH SYNTAX: Sets whether the default search syntax is Q&A compatible
syntax or regular expression syntax. This default controls how search language is
interpreted when not specified with qanda() or regex(). The default is used wherever
search syntax can be used, including Retrieve Specs and X-Commands. Valid settings
are Q&A and REGEX.
Example: DEFAULT SEARCH SYNTAX: REGEX
Default: Q&A
EMBED DIALOGS: Causes most dialog boxes to appear in the main window instead of
creating a popup window. Valid settings are ON and OFF. ON is the same as using the
embed_dialogs startup switch.
Example: EMBED DIALOGS: ON
Default: OFF
MERGE FILE PRINT PATH: Setting this command causes the Merge File Print tree
commands to create a file on the Client instead of sending the merge results directly
to the printer. This allows for post-processing of Merge File Print results or use of a
third-party print spooler.
Example: MERGE FILE PRINT PATH: \MyMerges\lastmerge.rtf
545
APPENDIX 7 SESAME.INI FILE
No Default
PAUSE MACRO: Pauses a macro that is playing back whenever an alert appears,
allowing the user (as opposed to the macro) to "answer" the alert. Valid settings are
ON and OFF.
Example: PAUSE MACRO: ON
Default: OFF
QUICK START: Sets the initial state of the Quick Start menu. Valid settings are ON,
OFF and DISABLED. ON starts with the Quick Start menu visible and is the same as
using the quick_start startup switch. DISABLED prevents users from launching the
Quick Start menu after start up.
Example: QUICK START: ON
Default: OFF
RECENT FILE FILENAME: Sets the filename where Sesame looks for the recently used
file list.
Example: RECENT FILE FILENAME: my_recent_files.txt
Default: sesame_recent_files.txt
RUN UNIVERSAL ON MOVE: Sets whether SBasic code in the Universal event runs on
mouse movement events. As mouse movement events occur constantly, and are
usually not of consequence to normal operations, this setting is OFF by default. Valid
settings are ON and OFF.
Example: RUN UNIVERSAL ON MOVE: ON
Default: OFF
START FORM: Replaces the Sesame logo and content that appears beside the
Application Menu with the specified user-defined Form. The Start Form cannot be used
to save or edit records, but it can contain logos and application information. It can also
run SBasic, so it can be used as a custom menu for your Application. Same as using
the start_form startup switch.
Example: START FORM: My Custom Menu
No Default
USER PARAM: Allows Sesame to collect custom information from the initialization file
on startup which can then be retrieved in SBasic using @UserParameter. This
command is followed by text no longer than 1024 bytes. That is the text returned by
@UserParameter. You can have as many USER PARAM lines in the sesame.ini file as
are needed. The indexes for @UserParameter respect the order the USER PARAM
commands appear in the sesame.ini file. The first USER PARAM command would be
index 1, the second 2, etc. Same as using the user_param startup switch.
Example: USER PARAM: Lantica
No Default
VISUAL LOG: Sets whether Q&A Translation shows a progress log during the
translation process. Valid settings are ON and OFF. ON is the same as using the
visual_log startup switch.
Example: VISUAL LOG: OFF
Default: OFF
VISUAL UPDATE: Sets whether macros update the screen while running. Valid settings
are ON and OFF. OFF is the same as using the novisualupdate startup switch.
Example: VISUAL UPDATE: ON
Default: ON
WARNING LEVEL: Sets the level at which warning messages appear based on user
actions such as deleting records, entering values not matching data type, etc. Valid
settings are OFF, MEDIUM and HIGH. MEDIUM is the default. OFF is the same as using
the warn_none startup switch. HIGH is the same as using the warn_high startup
switch.
Example: WARNING LEVEL: MEDIUM
Default: MEDIUM
547
APPENDIX 7 SESAME.INI FILE
your database is changed often, this will use up a lot of disk space and system
resources.
Example: BACKUP ON SAVE: ON
Default: OFF
EXPLICIT SAVE ONLY: Normally, Sesame saves changes to disk as those changes
occur. This command causes Sesame to only save to disk when explicitly told to do so
using the Save button on the toolbar. This is a dangerous option in that if you make
changes and do not click the Save button before closing the application, the changes
will be lost Valid settings are ON and OFF.
Example: EXPLICIT SAVE ONLY: ON
Default: OFF
LOAD DATA ON REDESIGN: Sets whether Sesame includes user data when making a
dsr out of an existing db. Valid settings are ON and OFF.
Example: LOAD DATA ON REDESIGN: OFF
Default: ON
SERVER PREINDEX XLOOKUPS: Tells the Sesame server whether to optimize the
speed of X-Commands using a preindexing scheme. This command is best used in
situations where there are repeated lookups being made to an external database with
fairly static data. This optimization will only affect X-Commands where the Key value
contains no search characters. Valid settings are ON and OFF.
Example: SERVER PREINDEX XLOOKUPS: ON
Default: OFF
time as the main program. If you have just one processor, the main program and all
of its threads "round robin" where each of them get a small slice of CPU time
in their turn. If you have a multicore CPU or multiple CPUs, as many threads as you
have CPUs will all run at once. SERVER THREADS is ON by default if running in
client/server mode. It is OFF by default if running standalone. Valid settings are ON
and OFF.
There are two reasons to turn SERVER THREADS OFF on a multi-user client/server
setup. Turning it off will improve reliability. Multithreading is inherently complicated
and can lead to a condition known as memory contention, where two or more threads
are trying to read/write the same piece of memory at the same time. It is very
unlikely this will occur. The other reason is to preserve resources for other programs
you may want to run at the same time as Sesame. Keeping one or more CPUs
unoccupied will make the other programs appear to be more "snappy."
The main reason to leave this option ON is speed, especially if you have more than
one CPU or a multicore CPU. Sesame is an efficient multithreader. Sesame averages
close to a 1.8 speed increase and can exceed 1.95 with the right combination of
commands being executed.
Example: SERVER THREADS: OFF
Default: Depends on mode. See above.
SDesigner Commands
SNAP TO GRID: Sets the default state of Snap To Grid in Form Design Mode. Valid
settings are ON and OFF.
Example: SNAP TO GRID: ON
Default: OFF
GRID HEIGHT: Sets the default height in pixels of each snap-to-grid unit in Form
Design Mode.
Example: GRID HEIGHT: 10
Default: 0
GRID WIDTH: Sets the default width in pixels of each snap-to-grid unit in Form Design
Mode.
Example: GRID WIDTH: 10
Default: 0
HORIZONTAL SCOOTING: Sets the default state of Horizontal Scoot Mode in Form
Design Mode. Valid settings are ON and OFF.
Example: HORIZONTAL SCOOTING: ON
Default: OFF
VERTICAL SCOOTING: Sets the default state of Vertical Scoot Mode in Form Design
Mode. Valid settings are ON and OFF.
Example: VERTICAL SCOOTING: ON
549
APPENDIX 7 SESAME.INI FILE
Default: OFF
SCOOT MARGIN: Sets the default margin in pixels to trigger scooting in Form Design
Mode.
Example: SCOOT MARGIN: 8
Default: 4
Security Commands
PASSWORD MINIMUM LENGTH: Sets the minimum length in characters required for
newly added or changed passwords. Existing passwords are not affected.
Example: PASSWORD MINIMUM LENGTH: 8
No default
Mode Commands
SERVER DAEMON MODE: Sets whether Sesame Server runs as a daemon. Daemon
mode is for use when running Sesame as a service or daemon, in which case it would
usually be started as part of booting the server computer. Typically services cannot
have graphical user interfaces. Daemon mode removes the server's user interface.
Valid settings are ON and OFF. ON is the same as using the daemon startup switch.
Example: SERVER DAEMON MODE: ON
Default: OFF
KIOSK MODE: Kiosk mode forces Sesame to run full screen, removes all window
decorations, all pulldown menus, and toolbar buttons. Kiosk mode makes it impossible
for the user to shutdown Sesame, choose a new application, or in any way interfere
with Sesame being ready for the next user at the kiosk. This mode is not appropriate
for anything other than a true kiosk environment. Ordinary applications should never
be run in kiosk mode. Valid settings are ON and OFF. ON is the same as using the
kiosk startup switch.
Example: KIOSK MODE: ON
Default: OFF
DEFAULT MEMORY MENU LIMIT: Sets the default number of items that can appear on
any one Memory Menu.
Example: DEFAULT MEMORY MENU LIMIT: 20
Default: 10
Email Commands
A Sesame Client has the ability to poll a specified email account, retrieve emails sent
to that account, and automatically respond with information from an application. The
commands in this section control the behavior of this feature. It is best to use a
dedicated Sesame Client for automatic email polling.
EMAIL COMMANDS POP3 LOGIN: Login name for the email account to poll
Example: EMAIL COMMANDS POP3 LOGIN: queries
EMAIL COMMANDS POP3 PASSWORD: Password for the email account to poll
Example: EMAIL COMMANDS POP3 PASSWORD: abc/123
EMAIL COMMANDS DELETE READ: Sets whether collected emails are deleted from the
mail server. Valid settings are ON and OFF. ON deletes collected messages. OFF leaves
messages on the mail server.
Example: EMAIL COMMANDS DELETE READ: OFF
Default: OFF
EMAIL COMMANDS POLL INTERVAL: Interval at which to poll the specified email
account in number of seconds.
Example: EMAIL COMMANDS POLL INTERVAL: 600
Default: 30
EMAIL COMMANDS SMTP SERVER: Outgoing SMTP server to use for replies.
Example: EMAIL COMMANDS SMTP SERVER: outgoing.yourmailserver.net
EMAIL COMMANDS SMTP LOGIN: Login name for the outgoing server (not needed for
all outgoing mail servers).
Example: EMAIL COMMANDS SMTP LOGIN: replies
551
APPENDIX 7 SESAME.INI FILE
EMAIL COMMANDS SMTP PASSWORD: Password for the outgoing server (not needed
for all outgoing mail servers).
Example: EMAIL COMMANDS SMTP PASSWORD: 123/abc
... your client could send an email like the one below to queries@yourmailserver.net ...
SCommand Open: Customers.db
SCommand Database: Customers
SCommand Query: !Key=<1000
SCommand Report: MyReport
SCommand Reply To: client@thecustomer.com
SCommand Password: a12/3bc
... and within 60 seconds Sesame will collect the request and send a copy of MyReport
from the Customers database showing records with Key values of less than 1000 to
their email address of client@thecustomer.com.
SCommands included in an email, like the one shown above, must appear in the email
with one command per line in the following format:
SCommand: Value
SCommands
SCommand Open: The name of the application file including extension to open. This
file must be available to the Sesame Server.
Example: SCommand Open: Customers.db
552
APPENDIX 7 SESAME.INI FILE
SCommand Query: Criteria for which records should appear in the report. You can
include as many SCommand Query lines as needed. Each line represents what would
be typed in one field of a Retrieve Spec. Query values must be formatted as follows:
!FieldName=Criteria
Example: SCommand Query: !Key=<1000
SCommand Reply To: Email address where the report will be sent.
Example: SCommand Reply To: client@thecustomer.com
553
Appendix 8
Startup Switches
Sesame can be run from a command prompt or its shortcut can be changed to include
startup switches:
Syntax:
Syntax:
sesame [-macro <macro_file.mac>] [-server <server_name[:port1][:port2]>] [-client
<server_name[:port1][:port2]>] [-admin <server_name[:port1][:port2]>] [-command
<server_name[:port1][:port2]> <password> <SHUTDOWN | SUSPEND | CONTINUE>] [-
qa <qa_file.dtf>] [-closed] [-splash <image_file<.bmp|.jpg|.png|.gif>>] [-scheme
<scheme_name>] [-ini_file filename.ini] [-blink] [-novisualupdate] [-no_startup_program] [-
help] [-daemon] [-keep] [-start_form <form_name>] [-kiosk] [-warn_high] [-warn_none] [-
quick_start] [-raw_data] [-embed_dialogs] [-user_param <param>] [-web_server <port>] [-
system_id <id str>] [-reconcile | -reconcile_confirm <sesame_database.db> <options>
<sesame_designer_file.dsr>] [sesame_database.db] [sesame_design_file.dsr]
Items in "[ ... ]" are optional and may appear in any order. Items in "< ... >" are
required arguments and must immediately follow their command.
Usage:
-client server_name[:port_no1][:port_no2]
This command starts a Sesame client on the local machine and connects it to the
Sesame server already running on the remote machine using the ports specified. The
port numbers must match those used when starting the Sesame server, and must be
open ports not used by any other program on either machine.
-closed
The "-closed" command causes the command panel to be closed when the Sesame
client starts.
-help
Displays help on startup switches then starts Sesame.
-macro macro_file.mac
This command causes a macro file to be loaded and run during client startup.
-server server_name[:port_no1][:port_no2]
This command starts a Sesame server on the local machine using the ports specified.
The same port numbers will be used when starting Sesame clients, and must be open
ports not used by any other program.
555
APPENDIX 8 STARTUP SWITCHES
-splash image_file[.jpg|.bmp|.png]
This command replaces the usual splash screen with the image supplied in the image
file. The image file must be a jpeg, bmp, or png type image.
-scheme scheme_name
This command changes the look of sesame to the specified scheme.
-blink
This command turns on cursor blinking.
-warn_none
This command turns off all warnings, including restriction warnings, record deletion,
etc...
-warn_high
This command turns on additional warnings, including strict field conversion warnings.
-daemon
This command causes the server to run without a user interface (console window).
-kiosk
Kiosk mode forces Sesame to run full screen, removes all window decorations, all
pulldown menus, and toolbar buttons. Kiosk mode makes it impossible for the user to
shutdown Sesame, choose a new application, or in any way interfere with Sesame
being ready for the next user at the kiosk. This mode is not appropriate for anything
other than a true kiosk environment. Ordinary applications should never be run in
kiosk mode.
-admin server_name[:port1:[port2]
Brings up an Admin Client that does not use up a connection to the server. Only the
Server Administration window appears as the Client.
556
APPENDIX 8 STARTUP SWITCHES
-embed_dialogs
Causes most dialog boxes to appear in the main window instead of creating a popup
window. Same as EMBED_DIALOGS: ON in the sesame,ini file.
-keep
Keeps an application loaded on the server even after there are no more clients
accessing that application. This allows an administrator to preload a set of databases,
making subsequent loading unneeded, both for normal use and for X-Commands.
Same as DATABASE RETENTION: ON in the sesame,ini file.
-ini_file filepath
Tells Sesame to read settings from the specified ini file.
-quick_start
Starts Sesame with the Quick Start menu visible. Same as QUICK START: ON in the
sesame,ini file.
-raw_data
Diagnostic tool that turns off all data formatting. This causes the data to appear in a
raw unformatted state. For example, dates will appear as YYYY/MM/DD.
-scheme scheme_name
Sets the overall visual theme used by Sesame. The scheme affects the look of all
screen elements including those on user-defined Forms. Same as SCHEME:
scheme_name in the sesame,ini file. Available schemes are:
Plastic A highly stylized theme with rounded edges and softened colors.
Clean A crisp theme with minimal decoration.
Gradient All backgrounds are drawn as gradients of their background color.
Ghost Gradient theme that grades to lightened background colors.
Image Specifies an image to use as the background for all screen elements.
The path and filename of the image must be supplied.
image:\ImagePath\ImageName.jpg
-single_level
Shows only one level or "branch" of the Command Tree commands at a time. Same as
COMMAND TREE MODE: SINGLE in the sesame,ini file.
-start_form
Replaces the Sesame logo and content that appears beside the Application Menu with
the specified user-defined Form. The Start Form cannot be used to save or edit
records, but it can contain logos and application information. It can also run SBasic, so
it can be used as a custom menu for your Application. Same as START FORM:
FormName in the sesame,ini file.
557
APPENDIX 8 STARTUP SWITCHES
-user_param
Allows Sesame to collect custom information from the initialization file on startup
which can then be retrieved in SBasic using @UserParameter. This switch is followed
by text no longer than 1024 bytes. That is the text returned by @UserParameter. You
can have as many user_param switches as are needed. The indexes for
@UserParameter respect the order the switches appear on the command line. The first
user_param would be index 1, the second 2, etc. Same as USER PARAM: Value in the
sesame,ini file. See @UserParameter in the Sesame Programming Guide for examples
of using these values.
-visual_log
Causes Q&A Translation to show a progress log during the translation process. Same
as VISUAL LOG: ON in the sesame,ini file.
-web_server
Enables the built-in web server. Complete documentation for the built-in web server is
available in the Sesame User Guide.
Example:
sesame -reconcile Clients.db NYYNY Another.dsr
.. will reconcile Clients.db against Another.dsr, but will keep the @number value, the
global values, and the security that are in Clients.db.
-novisualupdate
Causes macro visibility to be set off as default
-no_startup_program
Allows bypass of the On Application Open event
558
APPENDIX 8 STARTUP SWITCHES
Examples:
------------
To start Sesame and automatically open an application named "client_list.db":
sesame client_list.db
To start a sesame client that connects to the server running on "SERV01", using the
ID "Hazel" on this client PC, and opening Countries.db (which is in the Data\Samples
folder) automatically:
sesame-clientSERV01-system_idHAZELData\Samples\Countries.db
559
Index
561
INDEX
Command Area - Open/Close, 36
B Command button element, defined, 84
Backtick (`), in searches, 269 Command button, adding, 89
Backup Application, 427, 428, 495 Command line options, 486
Binding, 125 Command line switches, 555
Blank field, searching for, 255 Command line utilities, 537
Blink, cursor, 35, 556 Commands panel, 110
Bookmark a Record, 217 Configurations, network, 483
Boolean elements, adding, 81 Connections, 488
Boolean field, entries permitted, 95 Constructs regex() and qanda(), 292
Boolean formatting, layout element, 121 Control Panels, 109
Bound to (layout element), 125 Converting Q&A databases, 30
Box element, defined, 84 Copy (Edit menu), 34
Boxes (static), 84 Copy a layout element, 99, 100
Boxes (text). See Text boxes Copy an application, 431
Buffer, 227 Copy and paste records, 227
Buffer (copying a record), 52 Copy dialog, 354
Copy form to buffer, 52, 227
C Copy Forms to Buffer, 52
Copy records (Results commands menu), 53
Calculate form, 51 Copy Spec, 229, 354
Calculate Programming (Autocalc), 127 Copying a database. See Merge Application
Cancelling a Mass Update, 301 Copying a Designer file, 432
Canvas (area off form), 105 Copying a form (Layout Manager), 164
Capitalization in searches, 252 Copying a layout (Layout Manager), 164
Case sensitivity in searches, 252 Copying a report (Layout Manager), 164
Case-sensitive searches, 269 Copying a single record, 52, 227
Change Log, 153 Copying fields and records, 226
Charts, creating, 235 Copying Layout elements, 99
Check box element, defined, 84 Copying LE formatting, 97
Check box, adding, 87 Copying Records, 227, 228, 352
Child records, 185 Difference Q&A, 353
Clearing a retrieve spec, 254 Match names, 355
Client, 486 Creating a New Sesame Application, 68, 73
Client-server, 483 Creating an applictation from an ASCII
Clipboard, using when editing, 225 Database, 68
Close (File menu), 34 Creating an applictation from an XML
Close Form Without Saving, 51 Database, 70
"-closed" startup switch, 43 Cross-platform, 21
Color CSV file, 348
Changing form color, 115 Ctrl-F10, 51
Color palettes, 115 Ctrl-F5, 53
Colors, changing, 115 Ctrl-F6, 51
Colors, custom, 115 Ctrl-F7, 52
Colors, setting, 115 Ctrl-F9, 51
Column width export files), 350 Currency elements, adding, 81
Combination Freeform/Columnar reports, Currency formatting, layout element, 122
409 Current date, inserting, 53
Combo box element, defined, 84 Current time, inserting, 53
Combo box, adding, 85 Cursor blink, 35, 556
Combo box, editing choices, 86 Custom colors, 115
Comma Separated Values, 348
562
INDEX
Custom Format, 119 Deleting a report (Layout Manager), 164
Custom help, 31 Deleting layout elements, 101
Custom help, adding, 147 Deleting static text, 78
Custom help, described, 146 Deleting tab pages, 182
Custom tooltips, 149 Delimit All Fields, 349
Customizing Forms, 133 Delimit Strings, 349
Cut (Edit menu), 34 Delimited file. See ASCII file
Cut/Copy/Paste, 225 Delimiter, exporting, 349
Delimiter, importing, 338
deny file, 500
D Derived columns, in reports, 423
.DAT (File extension), 23 Design New Application, 428
Data entry shortcut keys, 213 Designer, 23, 61
Data entry templates, 144 Copying a Designer file, 432
data source, 331, 332 Fields & layout elements defined, 65
Data types, 201 Starting as a standalone application, 61
Data typing, 139 Designer file, 62, 63, 168
"Database .. failed to open" message, 480 Delete All Data Records, 166
Database, defined, 23, 65 Previewing, 106
Database, deleting, 161 Designer, defined, 61
Database, merging another, 167 Designer, starting, 30, 61, 66
Database, new, 74 Directional Navigation, 35, 153
Database, Open on startup, 559 Disconnect, 491
Database, renaming, 127, 161 Ditto, 213
Database, Searching and Sorting, 247 Ditto Current Field, 52
Databases, opening recently used, 27 Ditto Current Form, 52
@Date (not valid as initial value), 126 Ditto Field/Record, 226
Date (current), inserting, 53 Documentation, 22, 24
Date elements, adding, 81 Drill-down search, 272
Date field, entries permitted, 95 .DB (File extension), 63, 64
Date formatting, layout element, 120 .DSR (File extension), 23, 62, 63
Date retrievals, 254, 255, 257 .DSR (File extension), 63
.DB (File extension), 23, 168 .DSR (File extension), 64
.DDT (File extension), 23 .DSR (File extension), 168
Default display format, 159 .DSR file, 169
default formats, 123 DSR file, defined, 67
default formats for an application, 124 Duplicate Me, 99
Default retrieve spec, 287 Duplicate Records, 218
Default sort spec, 296 Deleting, 218
Delete (Edit menu), 35 Notes on removing, 220
Delete a database (trim application), 429 Removing temporarily, 218
Delete All Data Records (from Designer file), Searching for, 221, 223
166 Duplicate records, deleting (Results
Delete duplicate records (Results commands commands menu), 54
menu), 54 Duplicate Selected Elements, 100
Delete Record, 51 Duplicates (removing from results), 221
Deleting a database (Field Manager), 161 Dynamic sort, 294
Deleting a field (Field Manager), 161
Deleting a form (Layout Manager), 164
Deleting a layout (Layout Manager), 164 E
Deleting a record, 217 Edit Window, 58
563
INDEX
Editing ASCII options, 347
Boolean elements, 203 carriage returns, 352
check box, 210 Custom Separator, 348
combo box, 209 Delimited ASCII file, 344
Cut/Copy/Paste, 225 Delimiter, 349
Data entry shortcut keys, 213 Export dialog, 346
Date elements, 202 F (Fixed width), 350
Deleting a record, 217 Field Name Header, 349
Ditto, 213 File format, 344
Expanded field editor, 208 Fixed, 350
Image editor, 212 Fixed ASCII & truncating values, 350
image field, 211 How to export, 344
Keyword elements, 203 Ignore Fixed/Max Lengths, 350
list box, 209 M (Max num characters), 350
Making Corrections, 232 Max, 350
Money (currency) elements, 202 \n (carriage return), 352
Multi-line text elements, 207 O (variable width), 350
Number elements, 202 Open, 350
radio button group, 211 quotes around text, 344
Saving a record, 216 separator, 347
special layout elements, 208 Sorting, 344
Table view, 233 Subform data, 372
Text elements, 202, 206 tab separator, 348
Time elements, 203 Exporting Data, 343
Undo, 231, 232 Exporting data from subforms, 352
Undo field, 232 Exporting multi-line text fields, 352
Undo form, 232 Extension, file, 23, 62, 64
Using Forms, 204
Yes/No elements, 203
Editing static text, 78
F
Element. See Layout Element(s) F (Exporting option), 350
Element Example Palette, 82 F1, 53
Email retrieval via Sesame Web Server, 472 F10, 262
Embedded Dialogs, 57 F10 key, 50, 214, 240, 245, 365, 540
Empty field, searching for, 255 F11, 52
Envelopes, 331 F3, 51
Environment Variables, 507 F5, 52
Error log, (on importing, 343 F5 (Current value), 133
Esc, 51 F6 (Field editor), 133
Escape, 51 F6 Edit Window, 58
Example Palette, 82 F6 expanded field editor, 208
Execution Order, Programming, 150 F7 key, 214, 271, 540
Exit (File menu), 34 F7 Key, 540
Expanded field editor, 208 F8 (Calculate), 51, 127
Export (for merge printing), 331 F9, 50
Export Application to XML, 430 "Failed to open" message, 480
Export Data (Results commands menu), 54 Field Manager, 161
Export Design to XML, 167, 359 Adding a new field, 161
Export Layouts to XML, 359 Changing a field type, 161
Export spec, 344 Deleting a database, 161
Exporting Deleting a field, 161
564
INDEX
Renaming a database, 161 Full-Feature Reports, 390
Renaming a field, 161 Function Key Menu, 36, 55
Field Name Header, 349
Field name, changing, 161
Field type, changing (Field Manager), 161
G
Field, adding a new, 161 Getting Started, 23
Field, defined, 24, 65 Global code, 303
Field, deleting, 161 Global Values List Manager, 167
File extension, 23, 62, 64 Global Values, replacing when reconciling,
File New (toolbar button), 36 173
File Open (toolbar button), 36 GoTo (use of deprecated), 152
File Save (toolbar button), 36 Grayed out (Read-only) elements, 137
Files, Sesame, 63, 64 Grid, in form design, 97
Find First Match, 251
Find on this Form, 283
Find on This Form, 35
H
First Record (go to), 36 Height, changing, for a form, 104
Fixed ASCII export and truncating values, Height, changing, for Layout Elements, 103
350 Help, 53
Fixed ASCII import, 339 Context-sensitive, 31
Focus, 49 Custom help, 31
Focus, defined, 41 Custom help appears automatically, 32
Fonts, changing, 116 Tooltips, 32
Form compilation, 505 Using, 31
Form customization, other, 150 Help Menu, 36
Form Design, Keystrokes, 83 Hidden layout elements, 138
form letter, 329 Hide macro results (view menu), 35
Form Navigation, 239 Hide menu tree, 36, 43
Form, startup, 156 Hierarchical import, 21, 373
Formatting layout elements, 114, 120 HTML (printing form(s) to), 323
Formatting report elements, 114 HTML files, 508
Forms HTML output files, 425
Canvas, 105 HTML, printing Form to, 52
Changing color of, 115
Changing the Appearance of, 109 I
Copying, 164
Icons (toolbar), 36
Creating a new form, 74
IGNORE COLUMN, 340
Customizing, 133
Ignore Fixed/Max Lengths, 350
Default Formats, 123
Image box, adding, 90
Deleting, 164
Image editor, 212
Improving appearance of, 133
Image elements, adding, 81
Laying out a form, 75
Image field element, defined, 84
Navigation, 212
Image field, entries permitted, 96
Opening a form, 28
Image files, path to, 159
Redesigning, 109
Image labels, 90
Renaming, 164
Image path, 159
Resizing, 104
Image searches, 277
Forms, relinking, 155
Image, as a LE label, 90
Forms, Resizing, 77
Import a database. See Merge Application
Forms, switch to alternate form, 155
Import Data (Results commands menu), 54
Freeform reports, 405
Import errors, 343
565
INDEX
Import Layouts from XML, 360 Bound to, 125
Import Q&A, 34, See Translate Q&A Defined, 24, 65, 78
Import spec, 339 Unbound, 66
Importing Layout Element Adder, 81
Blank fields, 338 Layout Elements
Fixed ASCII, 339 Adding a multi-line text box by typing on
How to import, 339 the form, 80
IGNORE COLUMN, 340 Adding by Typing on the Form, 78
Standard ASCII, 339 Adding data elements, 78
Subform data, 373 Adding multiple, 80
Importing Data, 337 Adding to a Tab Page, 177
Importing data into subforms, 373 Adding with the layout element adder, 81
Importing Q&A databases, 30 Adjusting position incrementally, 118
Importing subform data, 198 Adjusting size incrementally, 118
Indexed fields, 127 Advanced element selector, 131
Initial values, 126 Aligning to each other, 116
Initial values, programming alternative, Binding, 94, 126
126, 136 Boolean formatting, 121
Insert Current Date, 53 Border style, 116
Insert Current Time, 53 Box style, 116
Installation Guide, 25 Centering on form, 116
Installing Sesame, 25 Change label, 133
Internet, Sesame on the, 499 Change LE name, 134
Interrupting a Mass Update, 301 Changing Color, 115
Introducing Sesame, 21 Changing fonts, 116
Invalid LE names, 79, 135 Changing label alignment, 116
Inverted Search, 265 Changing text alignment, 116
Invisible layout elements, 138 Changing text size, 116
IP addresses, 500, 501 Copying, 99, 100
Allowing, 500 Currency formatting, 122
Restricting, 500 Custom help, adding, 147
Date formatting, 120
Deleting, 101
J Format settings, 119
Just in Time Compilation, 505 Formatting, 120
Formatting multiple elements, 123
K Grayed out, 137
Hidden, 138
Keyboard shortcuts, 539 Invalid names, 79, 135
Keystrokes (navigation), 239 Invisible, 138
Keyword elements, adding, 81 LE names & labels, 79
Keyword field, entries permitted, 95 LE names & programming, 79
Keyword searches, 267 lower case formatting, 120
Making same size, 118
L Money formatting, 122
Moving, 102
Label Alignment, 116
Multi-line text boxes, creating, 116
Label, changing an element's, 133
Naming rules, 79
Last Record (go to), 36
Number formatting, 122
Layout Element
Position of elements, 116
Auto-selection, 207
Position of labels, 116
Bound, 66
566
INDEX
Properties list, 165
Read-only, 137
M
Relabelling, 98 M (Exporting option), 350
Relative alignment, 116 Machine name, 486
Relative sizing, 116 Macro indicator, 378
Renaming, 134 Macro visibility (view menu), 35
Resizing, 103 Macros, 377
Restrictions, 139 Alerts, 378
Rubber-banding, 101, 102 Autoloading, 555
Rules for naming, 79 difference Q&A, 312, 377
'Secret formatting', 138 Human readable macro files, 381
Selecting multiple, 101, 102 Loading a macro, 380
Setting formats for, 120 Macro files, 381
Sizing, 103 Macro visibility, 379
Sizing to match, 118 Nested macros, 381
Spaces in LE names, 79 Playing back a macro, 379
Spacing of elements, 116 Recently-used Macro List, 383
Templates, 144 Recording a macro, 378
Time formatting, 121 Saving a macro, 380
Tooltips, adding custom, 149 Series Counter, 382
Types of, 77, 83 Macros vs. programming, 381
Unique, 138, 143 mailing labels, 331
UPPER CASE formatting, 120 Mailmerge, 329, See also Merge Printing
Using the different element types, 85 Main Advance Record, 51
Visibility, 138 Main Previous Record, 51
Working with multiple, 101, 118 Make Like Me, 97
Yes/No formatting, 121 Managing a Database, 161
Layout Manager, 163 Managing fields, 161
Copying a layout, 164 Managing Layouts, 163
Deleting a layout, 164 Mandatory restrictions, 126
Renaming a layout, 164 Mass Delete (Results commands menu), 53
Layout Settings, 119 Mass update, 297
Layout, copying, 164 Backup first, 298
Layout, defined, 23, 65 by other means, 314
Layout, deleting, 164 Continuous mode, 300
Layout, renaming, 164 Default mass update Spec, 311
Layouts, Managing, 163 Endurance of the mass update spec, 314
LE. See Layout Element(s) Global code, 303
License file, location of, 499 IF/THEN programming, 313
LICENSE_PATH, 499, 507 in a multi-user environment, 314
Line element, defined, 84 Interactive, 300
Linking, types of, 523 Invalid programming, 306
Linux, 21, 25 Mass Update Spec, 298
List box element, defined, 84 network considerations, 314
List box, adding, 86 Order in which records are updated, 313
List box, editing choices, 86 overview, 297
Load a macro, 35 Program editor, 302, 304, 305
Lock/Unlock an application, 502 programming execution order, 302
Locked, database, 480 Programming in just one element, 303
Log File, 502 programming statement, 299
Log(s), 493 Q&A and mass updates, 312
Saved mass update spec, using, 309
567
INDEX
Saving mass update specs, 307
Saving the programming, 306
N
security, 312 Name, changing an element's, 134
Skip record(s), 300 Naming Layout Elements, rules for, 79
Sort order of records, 313 Naming multiple elements, 126, 136
Spec Manager, 307 Natural vs. relational linking, 523
Testing your programming, 306 Navigating around a form, 212
Translated Q&A mass updates, 313 Navigation, 239
Mass Update (Results commands menu), 54 Arrow keys, 240
Mass update programming, 299 End, 239
Mass Update Spec, 298, 301 Enter key, 239
Mass Update, Interrupting, 301 Home, 239
Max and Min, in searches, 257 Moving between main form and subforms,
maximized window, 56 243
Memory Menu, 226 Multi-line text, 241
Menu Bar, 33 Tab key, 239
Menu button element, adding, 89 Table view, 244
Menu button element, defined, 85 Text Editor, 241
Menu Buttons, searching, 277 Navigation keys, 239
Menu Tree, 41 Navigation menu, 50
Menu tree - Open/Close, 36 Navigation Order, 152
Menu Tree, defined, 38 Navigation Order, resetting, 96, 153
Menu Trees, Single Level, 42 Navigation, Directional, 153
Merge Application, 167, 428 Nested macros, 381
Merge documents, 329 Network Administration, 483
Merge fields, 332 Network administration tips, 498
Merge File Print, 52, 54 Network Communications, 503
Merge Printing, 329 Network configurations, 483
Merge Printing, using WordMerge, 334 Network Setup, 485
Merging two applications, 429 New (File menu), 34
Merging via data export, 331 New Application, 66, 428
Message Log, 153 New database, 74
Microsoft Word, 331, 333 New form, 74
Migrating to Sesame, 21 Next Matching Record, 51
Mode indicator, 37 Next matching record in current results, 273
Money elements, adding, 81 Next Record (go to), 36
Money field, entries permitted, 95 NOT empty, searching for, 255
Money formatting, layout element, 122 NOT, in searches, 255
Mouse Notification tab, 491
Center button, 215 NotifyForm() programming (alternative to
Left button, 215 restrictions), 143
Right button, 215 @Number (not valid as initial value), 126
Using, 215 @Number, setting, 160
Moving around a form, 239 @Number, replacing when reconciling, 172
Moving around in table view, 244 Number field, entries permitted, 95
Moving Between Elements in Designer, 96 Number formatting, layout element, 122
Moving layout elements, 102 Number of Records (toolbar), 36
Moving Tab Groups, 184
Multi-line text element, setting, 116
Multiple Servers, 484
O
O (Exporting option), 350
Open (Exporting), 350
568
INDEX
Open (File menu), 34 Print Form, 51
Open a database, 26 Print Form to HTML, 52
Open a form to search, 205 Print Forms, 54
Open an application, 26 Appearance of the printed record, 322
Open an application automatically, 559 in Add mode, 322
Open an database automatically, 559 in update mode, 316
Open command area, 36 More ways to print, 327
Opening a form, 28 Multiple pages per record, 320
Opening a form to add data, 204 Multiple records per page, 319
Opening Sesame, 25 Printing table view, 324
Operational mode indicator, 37 Table View, 325
Optimization, 504, 505 to HTML, 323
Optional restrictions, 126 Print Forms Dialog Box, 317
OR, in searches, 255, 259 Printing an individual record, 317
Order (Navigation), 152 Printing commands, 51
Order (Program Execution), 150 Printing Commands (Menu), 54
Order of tab pages, changing, 181 Printing Forms, 315
Orphan records, 366 PrintString as alternative, 327
"Other" Tab (Property Editor), 125 Printing subforms, 368
Printing table view, 324, 325
Printing the result set, 317
P Printing, ways to print data, 315
Page Down, 240 Program Application, 159
Page marker, adding, 93 Program Editor, 150
Page marker, defined, 85 Program Execution Order, 150
Page Up, 240 Program form, 150
Parent records, 185 Program layout, 150
Password Controls, 446 Program Report, 150
Password, minimum length, 446 Programmed data entry restrictions, 142
Passwords, changing, 450 Programmed retrieves, 280
Passwords, Secret Input, 138 Programmed retrieves, speeding up, 282
Paste (Edit menu), 34 Programming Guide, Sesame, 22
Paste buffer to form, 52 Programming, mass update, 299
Paste buffer to forms, 52 Programs, Sesame, 23
Paste Form to Buffer, 228 Property Editor, 114
Paste records, 227 Alignment, changing, 116
Philosophy, 515 Apply all settings, 118
Picklists (alternatives to restrictions), 126 Autocalc, 127
Picture elements, adding, 81 Boolean element formatting, 121
Picture fields, editing, 211 Border style, 116
Picture searches, 277 Box style, 116
Pipe symbol, in searches, 282 Color palettes, 115
Playback macro, 35 Color tab, 115
Point size. See Fonts Currency element formatting, 122
Ports, 486 Current settings not shown, 114
Preloading applications, 498 Date formatting, 120
Preview mode, 105 Font & size, changing, 116
Previewing a report, 418 Format settings, 119
Previewing the application, 105 Format tab, 119
Previous Record, 50 Initial values, 126
Previous Record (go to), 36 Look tab, 116
569
INDEX
Money element formatting, 122 Quick-Start Tutorials, Sesame, 22
Multi-line text boxes, creating, 116
Number element formatting, 122
Other Tab, 125
R
Position of elements, 116 R button (in import spec), 341
Position of labels, 116 "R" setting, naming multiple elements, 126,
Position tab, 116 136
Relative alignment, 116 Radio button group element, defined, 84
Relative sizing of elements, 116 Radio button group, adding, 87
Rename Database, 127 Ranges, in searches, 256
Restrictions, 126, 140 Read-only elements, 137
Spacing of elements, 116 Recently Opened File list, 27
Text tab, 116 Reconcile, 62, 63, 170
Time element formatting, 121 Reconcile Options, 171
Yes/No element formatting, 121 Reconcile Options dialog, 173
Property Editor vs. Property Viewer, 112 Reconciling, 170
Property Viewer, 112 Record Macro, 35
Protected Application (Security), 445 Record Navigation (Toolbar), 36
Proxy, 528 Record set. See Result set
Record, bookmarking, 217
Record, defined, 24, 65
Q Record, Next matching Record, 273
Q&A Records
Converting database into Sesame, 34 Copying, 226, 228
Database defined, 63 Ditto record, 226
Differences in restrictions, 126 Records, Searching, 247
GoTo (use of deprecated), 152 Record-to-record navigation, 216
Mass updates, 312 Redesign Current Application, 66, 168, 428
Restrictions as picklists, 140 Regex, 288
Searching differences, 251 Regional Options, 203, 254
Speedy fields, 127 Regional settings, 120, 202
Time not stored with seconds, 53 Regular expressions, 288
Translated mass updates, 313 Relabel layout element, 98
Translation into Sesame, 34 Relational Linking, 523
Weaker data typing, 139, 202 Relational vs. natural linking, 523
Q&A (Translate) (File menu), 34 Relationships, 185
Q&A Database Translation Guide, 22 Relink Form, 155
Q&A drawing characters, removing, 105 Remove (records). See Mass Delete
Q&A line draw characters, removing, 105 Remove a database, 429
Q&A phonetic search, 270 Remove Duplicates from Results, 221
Q&A programmed retrieve differences, 281 Remove Duplicates from Results (Results
Q&A Translation, 70 commands menu), 54
Q&A Translation Errors, 477 Remove from results, 51, 274
Q&A Translation Options, 71 Removing. See Deleting
Q&A Translation, Managing Errors, 72, 477 Rename Application, 163
Q&A Translation, programming, 72 Renaming
Q&A Translation, Reports, 72 Database, 127
Quick Report Spec, 386 Layout Elements, 134
Quick Reports, 386 Renaming a database (Field Manager), 161
Quick Reports, saving, 388 Renaming a field (Field Manager), 161
Quick Start Menu, 36, 39, 41 Renaming a form (Layout Manager), 164
570
INDEX
Renaming a layout (Layout Manager), 164 Resizing layout elements, 103
Renaming a report (Layout Manager), 164 Resizing tab groups, 183
Renaming tab pages, 180 Resizing the form, 77, 104
Report Creation Wizard \b, 412 Restrict IP addresses, 500
Report Writer. See Reports Restrict network connections, 500
REPORT_PATH, 507, 509 Restrict values, 139
Reports, 385 Restrictions, 126, 139
Adding layout elements, 397 ! (make mandatory, 126
Advanced Report Features, 420 Allow blank field, 126
Attaching retrieve and sort specs, 416 Checked on saving record, 126
Columnar reports, 396 Different to Q&A, 126
Combination reports, 409 Do not use as picklists, 126
Combination reports, typical example, Mandatory, 126
411 Optional, 126
Copying, 164 Restrictions, applying, 140
Default Formats, 123 Restrictions, Mandatory, 141, 142
Deleting, 164 Restrictions, Optional, 141
Derived columns, 423 Restrictions, programmed, 142
Freeform reports, 405 Result set, 251
full-feature reports, 390 Result Set, moving through, 251
HTML output files, 425 Results Commands menu, 53
Ignore blank values, 404 Retrieve spec, 248
Introduction, 385 Retrieve spec programming, 280
Month and year breaks, 405 Retrieving. See Searching
Moving elements, 401 Reveal menu tree, 36
Multiple breaks, 404 Right Click Menu, 97
Naming reports, 391 ROOTDIRS.INI, 499
No repeat option, 405 Rubber-banding, 101, 102
Page Headers and Footers, 404 Rules for naming Layout Elements, 79
Preview mode, 403 Run macro, 35
Previewing a report, 418 Runtime, Sesame, 23
Printing options, 405
Property Editor & Viewer, 402
Quick Report spec, 386
S
Quick reports, 386 s_conf, 499
Reconciling a report, 420 Save (File menu), 34
Relocating HTML output files, 426 Save As (File menu), 34
Renaming, 164 Save As New Application, 169
Report Creation Wizard, 412 Save Global Settings, 541
report interface, 392 Save macro, 35
Report sections, 396 Save Record, 51
Running a report, 420 Save Record and Close Form, 51
Saving a report, 418 Saved Specs, replacing when reconciling,
Selecting elements, 401 173
Subreport, 394 Saving a record, 216
Summary totals and breaks, 421 Saving a report, 418
Typical report example, 392 Saving Searches for re-use, 284
Reports, location of, 508 Saving Your Design as a Sesame
Reports, running, 54 Application, 108
Reserved Word, 79 Scoot Mode, 96
Reset Navigation Order, 96, 153 Scroll region, adding, 91
571
INDEX
Scroll region, defined, 85 Field types, 254
sDesigner. See Designer, See Designer Find First Match, 251
Search Commands, 262 for images by filename, 279
Search criteria essentials, 254 for images graphically, 278
Search in Current Results, 272 for pictures, 277
search logic, 260 French braces, 281
Search, phonetic, 269 Image searches, 277
Search, soundex, 269 Inverted Search, 265
Search/Update menu, 44 Keyword searches, 267
Searching, 247 List boxes, 276
&, 269 Main records with no subrecords, 371
\ (literal), 268 Max and Min, 257
* (wildcard character). See .. Meet ALL restrictions, 260
.. (ranges), 256 Meet Any restriction, 260
.. (wildcard character), 258 Menu Buttons, 277
/, 255 Next matching Record, 273
/=, 255 NOT, 255
;, 255 NOT empty, 255
? (wildcard character), 258 Operators and ranges examples, 257
], 268 OR, 255
`, 269 OR across fields, 260
{}, 281 Performing a new search, 253
~, 269 Pipe symbol, 282
, 282 Programmed retrieves, 280
= (empty field), 255 Programmed retrieves, performance, 282
Add to Current Results, 271 Q&A - phonetic search, 270
Advanced searches, 259 Q&A v. similar, 252, 255
AND across fields, 260 Q&A, differences, 281
Arithmetic operator examples, 256 Radio button groups, 276
Autocomplete, 250 Ranges, 256
Backtick (`), 269 Refining the result set, 271
Basic search criteria examples, 256 Regex() and qanda(), 292
Basic searches, 247 Regular expressions, 288
Blank field, 255 Remove Duplicates from Results, 221
Browser-type Searches, 263 Remove from Current Results, 274
Case sensitivity, 252 Renaming a saved retrieve spec, 287
Case-sensitive searches, 269 Result set, 251
Check boxes, 275 Retrieve spec, 251
Clearing a retrieve spec, 254 Retrieve Spec, 248
Combo boxes, 276 return to retrieve spec, 253
Date fields, 254 Saving a search, 284
Dates, 254, 255, 257 Saving Searches for re-use, 284
Default retrieve spec, 287 Search Commands, 262
Deleting a saved retrieve spec, 287 Search criteria essentials, 254
differences Q&A, 251 Search in Current Results, 272
Differences Q&A, 251 search logic, 260
Drill-down search, 272 search mode, 261
Either/Or, 255 Searching a single field, 252
Empty field, 255 Searching multiple fields, 253
Examples of special search characters, Searching one record, 283
270 Simple Search and Sorting, 265
572
INDEX
Simple Searches, 263 Security, replacing when reconciling, 173
Sorting records, 250, 293 Select All (Edit menu), 35
Spec Manager, 284 Select All Elements on a tab page, 182
Special Layout Elements, 252, 275 Selecting all layout elements on a tab page,
Special search characters, 255 181
Special search characters (advanced), Selecting Position of Tab Labels, 184
268 Selection Layers, 128
Templates, 250 Selection layers, moving up/down, 98
unbound layout elements, 254 separator, exporting, 347
Universal search, 266 Server, 486
Upper or lower case, 252 Server administration, 447, 489
Using a previously-saved retrieve, 285 Server Administration
View Current Results, 274 Standalone administrative client, 498
When and how to sort, 294 Server Administration (File menu), 34
Wildcard characters, 258 Server Administration, starting, 477, 480
Wildcard search examples, 259 Server Console, 488
Searching and Sorting, 247 Server Status Window, 488
Searching for Duplicate Records, 221 Server, stopping, 482, 491
Searching Special Layout Elements, 275 Sesame application, defined, 63
Searching subforms, 368 Sesame Designer. See Designer
Secret Input, 138 Sesame Designer, starting, 30, 61
Securing Your Applications, 433 Sesame Initialization File, 541
Security, 433, See also Security Manager Sesame server, 487
Administrator, 435 Sesame, Opening, 25
attributes, 433 Sesame, Starting, 25, 30, 61
Changing passwords, 450 Sesame.ini file, 541
Data Entry user, 435 Setting formats for a layout element, 120
Disabling temporarily, 167 Setting up client-server, 485
Frequently-asked questions, 450 Shift-F10, 51
Login dialog, 446 Shift-F11, 52
Manager, 435 Shift-F5, 52
Mass updates, 312 Shift-F6, 53
password dialog, 445 Shift-F7, 52
preventing design changes, 446 Shortcut Keys, 539
Q&A compatibility, 433 Shut down Sesame Server, 482
Remove All Application Security, 443 Simple Searches, 263
Remove Security For Element, 442 Sizing. See Resizing
Remove Security For Layout, 442 Snap To Grid, 97
Server administration, 447 Sort (Results commands menu), 54
Summary, 449 Sort by Timestamp (Results commands
User levels, 434 menu), 54
User Management, 447 Sorting, 293
X Password, 443 Default sort spec, 296
XLookups, 443 Dynamic sort, 294
Security and Sesame Web Server, 471 Saving sort specs, 296
Security Manager, 437 Spec window, 293
Delete a user, 441 Using the spec window, 47
Element level access, 441 When and how to sort, 294
Element-level permissions, 442 Sorting records, 293
Groups, 438 Sounds-like Search, 269
Users, 439 Spaces in Layout Element names, 79
573
INDEX
Spec action bar, 46, 48, 293 Make Natural Child Records, 191
Spec Manager, 284, 307 Mass Delete, 366
Spec selector buttons, 46, 293 Mass Update, 367
Spec window, 46 Moving between main form & subforms,
Spec Window, defined, 38 363
Spec window, described, 293 Natural link, 186
Spec window, using, 47 Orphan records, 366
Special search characters (advanced), 268 Printing forms, 368
"Speedy fields", 127 Relational link, 186
splash screen, 556 Re-parenting, 366
Standalone administrative client, 498 Searching, 368
Standard ASCII, 339, 348 Searching for main records with no
Start macro recording, 35 subrecords, 371
Starting Sesame, 25 Select records to display, 191
Starting Sesame Designer, 30, 61 Select Subrecord type, 191
Startup Form, 156 Settings dialog, 190
Startup Switches, 555 Show Existing Natural Child Records, 191
Static Layout Elements, defined, 77 Subform properties, 192
Static picture element, defined, 84 Subrecord, 186
Static picture, adding, 90 Table view subform, 186
Static Scroll region, adding, 91 Terminology, 186
Static text element Subforms, creating, 200
Adding by typing on the form, 77 Subforms, importing data into, 198
Adding with layout element adder, 85 Subforms, Using, 361
Defined, 77, 84 Subrecord, 185, 186
Deleting, 78 Subreport, 394
Editing, 78 Summary totals and breaks, in reports, 421
Status line, 37 SUnlock, 537
Stop macro recording, 35 SVersion, 537
Stop This Server, 491 Switch to Add Data Mode, 51
Subform element, defined, 84 Switch to Alternate Form, 54, 155
Subform Settings dialog, 190 System Settings, 119, 120
Subform, adding, 91
Subform, form view, 361
Subform, table view, 362
T
Subform, types of, 361 Tab groups
Subforms, 361 Label position, 184
Adding and editing data, 364 Sizing, 183
Adding new subrecords, 365 Tab Groups, 175
Create a new Database with Shared Adding, 91, 176
Template, 192 Adding tab pages, 179
Creating a subform, 187 Changing order of tab pages, 181
Creating using relational linking, 195 Deleting tab pages, 182
Data source, 186 Label, 177
Deleting a parent record, 366 Moving, 184
Deleting subrecords, 366 Naming, 177
Exporting data, 372 Tab key (form navigation), 239
Form view subform, 186 "Tab Order". See Navigation Order
Hierarchical import, 373 Tab Pages, 175
import ASCII file, 375 Aligning layout elements, 181
Importing data, 373 Changing color of a tab page, 182
574
INDEX
Changing labels, 180 Trim Application, 429
Changing order, 181 Troubleshooting, 477
Deleting, 182 Tutorials, 24
Moving within group, 181
Renaming, 180
Select All layout elements, 181
U
Selecting all elements on a page, 182 Unbound layout elements, 66
Tab Pages, Adding layout elements to, 177 Undo, 101, 231, 232
tab separator, 348 Undo (Edit menu), 34
Tabbed Pages, 175 Undo Current Field, 52
Adding, 91 Undo Current Form, 52
Defined, 175 Undo Last Change, 101
Described, 175 Undo multiple actions (advanced), 153
Tabbed Pages, defined, 84 Unhide menu tree, 43
Table view Uninstalling Sesame, 32
Editing data in, 233 Unique fields, 138, 143
Navigating, 244 Universal search, 266
Table View Unload application, 493
Charts from, 235 Unlocking an application, 480, 492
Customizing, 234 UPPER or lower case when searching, 252
Functions from, 235 Use as Example, 99
Saving layout of, 235 User Guide, Sesame, 22
Sorting, 235 User levels (Security), 434
Table View (Other Commands menu), 53 User Management, 447, 497
Table View, printing, 325 @UserID (not valid as initial value), 126
Templates and searching, 250 Users, security, 439
Templates, data entry, 144 Utility Programs, 537
Temporarily Disable Security, 167, 449
Text box
Adding a multi-line text box element by
V
typing on the form, 80 View options, 39
Adding by typing on the form, 79
Text box element, defined, 84 W
Text Box, defined, 78
warnings, 556
Text editor element, adding, 88
Ways of working with Sesame, 49
Text Editor element, defined, 85
Web Capabilities, 451
Text field, entries permitted, 95
Web Server, 451
ThrowFocus navigation programming, 152
Adding a new record, 466
@Time (not valid as initial value), 126
Dynamic web page, 458
Time (current), inserting, 53
Email retrieval, 472
Time elements, adding, 81
Posting a new record to the database,
Time field, entries permitted, 95
468
Time formatting, layout element, 121
Posting updates to the database, 464
Toggle Attachment, 53
Start Create menu page, 453
Toolbar, 33
Start Searching a database, 454
Toolbar, described, 36
Start Sesame web server, 452
Tooltip, 26, 32
Updating data, 460
Tooltips, custom, 149
Web server security, 471
Translate Q&A (File menu), 34
Web Server Security, 471
Translating Q&A databases, 30, 34
Width, changing, for a form, 104
Translation Guide, Q&A (documentation), 22
Width, changing, for Layout Elements, 103
575
INDEX
Width, setting, for export file columns, 350
Wildcard characters, in searches, 258
X
Window Management, 56 XML Database, 34, 70, 359
Windows Clipboard, 225 XML Export can take a long time, 359
Windows, sizing, 39 XML Utilities, 359
Wittgenstein. See Philosophy XML, Export Application to XML, 430
Word (mailmerge with), 331, 333 XML, export design to, 167
WordMerge, 334
WordPerfect, 331, 333 Y
Yes/No elements, adding, 81
Yes/No formatting, layout element, 121
576
READER'S NOTES
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
577
READER'S NOTES
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
578
READER'S NOTES
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
____________________________________________________________________________
579