Field Properties
There are nearly two dozen field properties that you can customize. Most of these can be set in the Field Properties Panel, though a few are only accessible using the Field Blueprint Dialog.

#### Common Field Properties

In addition to setting up individual field properties as described below, you can also use the Common Fields menu to set all of the properties at once for common fields like Name, Address, Date, Price, etc. To access this menu, click on the star next to the field name:

When you choose a name from this menu, Panorama sets up all of the attributes, including the type, alignment, output pattern, automatic capitalization and other data entry options.

The Common Fields menu normally changes the attributes of the current field, but if you right click on the star (or double tab on the trackpad, or hold down the Control key) Panorama will add a new field with the specified name and attributes. If you right click and hold down the Shift key, a new field will be inserted.

#### Field Name

Each field in a Panorama database is identified by a field name. Field names serve several purposes: they remind you what the field is for (i.e. the Dates field probably contains dates, the Name field probably contains names, etc.), they appear at the top of each column in the data sheet (unless a Field Title has been defined, see below), and they are used to identify fields in formulas and procedures (for example `Amount=Qty*Price`).

Panorama doesn’t place any restrictions on the field names you choose. Field names may be as long as you want, and they may contain any character that can be typed from the keyboard. You can even have two or more fields with the same name (but we recommend that you avoid this, see the next paragraph).

However, if you are planning to use a field in a formula or procedure, you may want to avoid some of these unusual possibilities. If you have two or more fields with the same name, only the first field will be accessible to a formula. Field names containing blanks or punctuation (for instance `P/E Ratio`) are more difficult to use in a formula. To use such a field in a formula, you must surround the field name with `«` and `»` (for example `«P/E Ratio»`. (If you left out the «», Panorama would think you were trying to divide P by E, with Ratio left over.) You may want to avoid field names like Date, Seconds, And, Or, and Sum. These names can be confusing when used in a formula because Panorama has functions with the same names.

#### Field Title

In addition to a name, a field can also have a title. If it does, that title will be displayed at the top of the column in the data sheet.

Using a field title can avoid the need for «» characters when accessing a field in a formula or program. For example, you could give a field the name peRatio, but a title of P/E Ratio. This would allow you to refer to the field in a formula or program simply as `peRatio`, with no chevron characters needed.

#### Data Type

This pop-up menu specifies the type of data stored in each field: text, number (integer or float), date, choices or binary.

See Data Types for more information about the types of data that can be stored in a field.

#### Align

By default, most fields are left aligned except for numbers, which are right aligned. But you can choose Left, Center or Right for any field.

#### Output Pattern

The output pattern allows you to specify the display format for numbers or dates. See Numeric Patterns and Date Patterns for more information. You can either type in the pattern manually, or you can click the pop-up icon to the right for menu of common patterns.

#### Auto Caps

Use this pop-up menu to tell Panorama to automatically capitalize data entry in a field. Panorama can automatically capitalize everything, or just the first letter of each word or sentence.

#### Clairvoyance™

Many databases contain fields where the same information is repeated over and over. For instance, a checkbook will contain the same bills month after month — rent, phone, utilities, charge cards. Another example is an inventory database that contains many items from each vendor, with the vendor name repeated over and over. Panorama’s Clairvoyance feature anticipates when you are about to enter data that has been entered before, and completes the entry for you. This can save you a lot of typing, and helps improve consistency as well.

How can Panorama anticipate what you are about to type? The secret lies in Panorama’s ability to scan the database in a fraction of a second. When you are using Clairvoyance, Panorama scans the entire database each time you enter a character. As it scans the database, it checks the characters you have typed against the data already in the database. When there is only one possible match, Clairvoyance guesses that you are about to repeat yourself and completes the word or phrase for you.

Of course, Clairvoyance can only be helpful when you are repeating a word or phrase that is already in the database. If you are entering a new word or phrase, Clairvoyance cannot help you — but it won’t get in your way, either. As you type in a new word or phrase Clairvoyance may guess that you are entering an old word or phrase. Just keep typing, and Clairvoyance will automatically erase its guess when it no longer matches what you have typed.

Clairvoyance™ Helps Insure Data Consistency – One problem when building large databases is making sure that information always gets entered the same way, especially when more than one person is keying in the data. For example, a single company could be entered in your inventory database many ways—

    Fuji
    Fuji, Inc
    Fuji USA
    Fuji Photo, Inc
    Fuji Photo Film USA
    Fuji USA, Inc.

Clairvoyance helps solve this problem by accurately repeating the information time after time. You may find that Clairvoyance’s ability to insure data consistency is more important than the keystroke savings.

#### Editable

This option controls whether a field’s contents can be edited in the data sheet. If this option is unchecked, Panorama will just beep if you try to edit data in this field.

This option only affects the data sheet, it does not prevent the field’s contents from being edited with a form or via program code.

#### Space Bar Tab

Using the Tab key is a great timesaver when entering lots of data, but it sure is tough on your left pinky. You can use Panorama’s Space Bar Tab option to give your pinky a rest. When you are using this option, pressing the Space Bar key once or twice tells Panorama to skip to the next cell, just like the Tab key.

The Space Bar Tab option can be configured separately for each field in the database.

If a field never contains a space (for example state, zip code, or price) you can use the 1 Space option. This option makes pressing the Space Bar skip to the next cell. If a field sometimes contains blanks (for example name, address, or description) you can use the 2 Space option. When this option is active, you can press the Space Bar twice in a row to skip to the next cell. (This option does not usually work well with Clairvoyance.)

The Space Bar Tab option may not sound very exciting on paper. You may wonder if it is worth the bother. This option really does make it easier to enter lots of data without cramping your fingers, especially the left pinky. Give it a shot!

#### Default Value

When a new record is added to a database, it is usually completely empty. You can, however, set up a default value for each field. In this example the default value of the Binding field is set to Paperback. So when new records are added, this field is automatically filled in with the value Paperback.

The simplest default is a fixed value, as shown in the example above. For example you might want the Country field to default to your home country, a shipping field to default to your preferred shipper. Once defaults are set up, they are automatically entered whenever a new record is created. Of course these are just defaults, there is nothing to prevent a user from manually typing in a different value now or later.

Ditto Default – Instead of being fixed, a default value can be based on the data in the previous record. You can produce this type of “ditto” default by using the default value `"`. This is the quote character, which is produced by holding down the Shift key and pressing the " key (just to the right of the semicolon key). (Some people mistakenly call this the double-quote character. When you create a new record, the fields using the ditto default will contain the same values as the record above. In this example there are four fields using a ditto default: Author, Publisher, Binding, Category and Sub Category. So when a new book is added these fields will be pre-filled with the same value that appeared in the currently selected record.

Fixed Date Default – To default to today’s date use the default value today. (At the time this was written, the date was 1/12/17).

In addition to today, the default can be set to yesterday or tomorrow, or any day of the week, or any day of the week prefixed by next or last, for example next tuesday or last mon.

Numeric Increment Default – For a numeric field you can specify a default that is created by adding to the previous value in the field. To do this, use a default of `+nn`, where nn is the amount to add to the previous value. For example `+1` causes the value to increment by one for each new record.

You can use any number, even a negative number like +–5. (Note, you must include the plus symbol first, then the minus sign.) This default would cause Panorama to add negative 5 (same as subtracting 5) to the value each time a new record is created. If the numeric type allows it, you can even use non-integer values like 2.5 or 0.1.

Be sure to keep in mind that an incrementing default like +1 is based on the previous record, not on the largest value in the entire database. So if you insert a record in the middle of the database, the incremented value will be based on the value just above it, not on the value at the end of the database. This can result in repeated values being inserted into the data.

Creating a Unique Record Number – Many databases applications require that each record contain a unique number that can be used to identify the record. Common examples include invoice numbers, batch ID’s, employee numbers, etc. Panorama can automatically assign a unique number to each new record as it is created, even if several people are using the database simultaneously over a network. The field containing the record number must be a numeric field. To specify that this field should contain a unique record number, the default should be + . Do not specify any increment value, just use a single + character.

Each database contains a counter for keeping track of the next record number. Every time a new record is created the counter is incremented by one. Even if the record is later deleted, the number will never be re-used (unless you Quit Panorama or close the database without saving your changes, or unless you reset the counter manually as described below).

You can manually change the record number counter using the Database Options Dialog (in the File menu). Simply type in any integer value for the Next Record ID# option.

#### Input Pattern

Sometimes you may wish to force the data being entered into a specific pattern. For instance in the United States and Canada long distance phone numbers almost always use the pattern (999) 999–9999. A field’s Input Pattern can take care of entering the pattern for you. Once the pattern is set up, you only type the actual data (in this case the digits of the phone number). Panorama combines the data you enter with the pattern to produce the actual data. For example, if the input pattern is:

    (___) ___-____

then keying in 3124562468 produces the data (312) 456–2468.

An input pattern consists of a string of characters with an underscore in each spot where actual data will be entered. The input pattern is just like fill in the blanks, but instead of filling in the blanks you fill in the underscores. (Press Shift-Dash to enter the underscore character. The dash key is in the top row of the keyboard, just to the right of the 0 key.)

#### Input Range (Restricting Input Character Types)

Panorama normally allows you to enter any character that can be typed from the keyboard. If necessary you can restrict the kinds of characters that can be entered into each field, for example, to just allow numbers or only letters.

The actual characters allowed are defined by one or more pairs of characters. Each pair specifies a range of characters that are allowed. For example the pair shown above,

    09

would allow all characters in the range 0…9 (numeric digits), while the pair

    az

would allow all lower case letters. You can combine several pairs to create a more complex range, for example

    az09

for all lower case letters or numbers. A pair may specify a single character as both the beginning and end of the range, for instance

%%

only the percent symbol allowed, or

    09%%

numerals and the percent symbol allowed, but not the decimal point). If you wish to allow spaces, one of the pairs should be a pair of spaces, for instance

    AZ az09

#### Editor Mode

Some types of data, for example Choices, have special editors. If available, Panorama automatically uses any special editor available. If you don’t want this, you can change the Editor Mode to Text Editor to force Panorama to always use standard text editing for this field.

#### Automatic Field Calculations & Code

Panorama can automatically perform a calculation whenever data is changed, or even run a program.

To learn the details, see Automatic Field Calculations and Automatic Field Code.

#### Choices

Panorama allows you to specify a limited list of values that can be used in a field.

See Choices to learn how to set up and use choices.

#### Notes

Use the Notes area for notes to yourself about this field. Panorama doesn’t do anything with these notes.

See Also

- addfield -- adds a new field to the current database (on the end).
- Adding New Fields -- adding one or more fields to a database.
- autoallfieldwidths -- automatically sets the width of all fields based on the data in each field.
- autofieldwidth -- automatically sets the width of the current field based on the data in it.
- Automatic Field Calculations -- performing formulas automatically when data is entered into a field.
- Automatic Field Code -- running a short program when data is entered into a field.
- automaticfieldchoices -- updates the current field's Choice list with actual data in the database.
- automaticfieldname( -- returns an available field name.
- cell -- enters a value into the currently active field (i.e. cell).
- checkdesignlock -- checks if field structure can be changed, if not, returns an error.
- commonfieldspopup -- pops up a list of common fields, and changes the current field specifications when a field is chosen from this menu.
- Construct Multiple Fields -- using a template to quickly add multiple fields to a database.
- constructfields -- creates one or more new fields based on a template.
- databaseconsoledump -- dumps the raw contents of the specified database to the console in comma delimited format.
- Date Patterns -- control how dates are displayed or converted to text.
- Dates -- working with dates.
- dbinfo( -- gets information about a database: what forms it contains, what fields, what flash art pictures, etc.
- deletefield -- deletes the current field from the database.
- Deleting Fields -- deleting fields from the database.
- editfield -- begins editing of the specified field.
- editfieldname -- opens the data sheet window's field properties inspector and selects the field name.
- Field Blueprint Dialog -- examining and modifying the raw specification of a field.
- Field Properties Panel -- examining and modifying field attributes.
- Field Width -- adjusting the width of a field in the data sheet.
- fieldalignment( -- returns the alignment of a database field.
- fieldformula( -- returns the formula associated with a database field.
- fieldname -- changes the name of the current field.
- fieldnumber( -- returns the number of a database field (starting with 1).
- fieldpattern( -- returns the output pattern associated with a database field.
- Fields -- introduction to database fields.
- fieldtype -- changes the data type of the current field.
- fieldtypes -- returns a carriage return delimited array with list of fields and field data types.
- fieldtypes( -- returns a carriage return delimited array with a list of the fields and field data types.
- fieldwidth( -- returns the width (in the data sheet) of a database field.
- findreplacedialog -- opens the Find & Replace dialog.
- firstcolumn -- moves to the first column in the data sheet (leftmost column).
- getfieldproperties( -- returns a dictionary containing all of the properties of the specified field. (See the setfieldproperties statement if you want to change one or more field properties.)
- hiddenfields( -- returns a list of hidden fields in the curent data sheet window
- hidecurrentfield -- hides the current field in the data sheet.
- hidefieldsbetween -- shows all fields except those in between specified numbers.
- hidelineitemfields -- hides all line item fields.
- hidethesefields -- hides specific fields in the data sheet, making all others visible.
- Hiding and Showing Fields -- temporarily hiding fields in the data sheet.
- info("datatype") -- returns the data type of the current field.
- insertfield -- inserts a new field into the database in front of the current field.
- lastcolumn -- move to the last column in the data sheet (rightmost column).
- Limiting the Maximum Number of Data Sheet Columns -- adjusting the maximum number of columns displayed in data sheet windows.
- Line Item Fields -- are used for repeating items within a record
- mergefieldsdialog -- opens the standard *Merge Fields* dialog.
- Merging Adjacent Fields -- merging two fields into one.
- movefieldbefore -- moves the current field to a new position.
- newdatabasewithfields -- creates a new database with one or more fields.
- newdatabasewithtemplate -- creates a new database with a template.
- Numeric Data -- numeric data (fixed and floating point).
- Numeric Patterns -- control how a number is displayed or converted to text.
- Rearranging Field Order -- rearranging the order of fields in the data sheet.
- reorderfieldsdialog -- opens the Reorder Fields dialog.
- serverdatabaseconsoledump -- dumps the raw contents of the specified database on the server to the console in comma delimited format.
- setfieldnames -- changes the names of all database fields at once.
- setfieldproperties -- modifies one or more properties (name, data type, formula, etc.) of the current field.
- showallfields -- makes every field in the data sheet visible.
- showcolumns -- forces Panorama to display specified fields.
- showfields -- forces Panorama to display specified fields.
- showfieldsbetween -- hides all fields except those in between specified numbers.
- showhidefieldsdialog -- opens the standard Show/Hide Fields dialog (in the Fields menu).
- showthesefields -- makes specific fields in the data sheet visible, hiding all others.
- Smart Dates -- keyboard entry of dates.
- splitfielddialog -- opens the standard *Split Field* dialog.
- Splitting a Field -- splitting a field into two fields.
- tokenname( -- returns the name of a field or variable (instead of the value contained in the field or variables).
- visiblefieldnumbers( -- returns a data array of visible fields (by number) in the data sheet.
- visiblefields( -- returns a list of visible fields in the data sheet.

History

Version | Status | Notes
10.0 | Updated | Carried over from Panorama 6.0, but with new options for field title, editing options, formulas and code.