|
A display fields definition is, in effect, an ordered list of fields which is assigned a user-visible name, such as 'Basic Details', 'All Details', etc., and which appears in the display-fields pull-down selector in search results, pedigree and other pages. By selecting an entry from this list, the user can control which fields are shown.
Multiple display fields definitions can (and usually are) defined for each table suffix. You can also add your own custom display fields definitions by calling pdsSetDisplayFldsDef() (or, pdsSetAuxDisplayFldsDef() for a user-defined record type). See Setup Script for an example.
The definition is given as a string containing name=value entries, separated by semicolons, where each name may be any of the following:
| Name |
Description |
| label |
The user-visible name for this display fields definition, to go in the display-fields selector. E.g. 'Basic Fields', etc.
|
fields1 and fields2 |
These are comma-separated lists of field names. Internally the lists are concatenated together and define the fields to be displayed, and their order of display (e.g. the column order in search result screens etc.). The fields1 entry should contain the more important fields. The intention of specifying the fields in 2 groups is that, should Pedserve need to add in other fields for display for any reason, then it should add them after the fields1 fields, but before the fields2 fields.
Example:
fields1=A_NAME,A_SEX,A_DOB;
You may use chained field names here; this is useful e.g. when adding the display fields definitions for a user-defined record type, because it lets you include fields from the animal records with which each user-defined record is associated. E.g. if you have added show records as a user-defined record type with table suffix 'XSR', and your animal records include a field for the name of the breeder (say called A_BREEDERNAME), you could include the breeder in a show records display fields definition, by using a definition of the form fields1=XSR_SHOWNAME,XSR_SHOWDATE,XSR_AID.A_BREEDERNAME,... etc.
|
Here is some sample code that adds a new display fields definition for the animals table (table suffix 'A'):
&pdsSetDisplayFldsDef('A_mydispflds',
'label=My Display Fields;fields1=;fields2=A_NAME,A_SEX,A_DOB,A_IMG');
The name of the definition, 'A_mydispflds', must be a unique definition name, and must start with the table suffix of the table to which it applies, then followed by an underscore (i.e., the 'A_' bit).
|

Search Results Showing Display Fields Selector
|
USEFUL LINKS:
EULA
Pedserve Editions
Sample City
Consultancy
Data Preparation
Installation
Regular Expressions
Similarity Searching
Configuration File
Setup Script
Stylesheet
Database Design
Hooks
Date/Time
User Defined Fields
User Defined Records
Display Fields Definitions
Ordering Fields Definitions
Highlighting
Page Layout
Field Definitions
Field Formatting
Shortcut Query Buttons
Plates
Command Buttons
Connecting to the Database
Warning Footer Message
|