When you are viewing field descriptors in Field Descriptor Manager, by default the ID, Field Name, External Name, Required, and Field Class columns are the only columns displayed (these columns are explained in greater detail at the beginning of this chapter). Although you can always choose to view the details of a Field Descriptor to see all of its settings, there are times when you will want to view different columns of multiple field descriptors. There are eight different views or filters that can be used within Field Descriptor Manager to control the columns that are displayed in the table of field descriptors. These views are found on the drop down menus of the Field Descriptor Manager and are described below in the next five sections.
Auto Trim - Displays the Auto Trim On Write and Auto Trim On Read columns for all the field descriptors in the current table and library.
Default Value - Displays the Default Value field of all the field descriptors in the current table and library.
Display Properties - Displays the Field Set, Display Order, Display Rule, and Display Components fields of all the field descriptors in the specified table and library.
Table FD's - Shows all field descriptors for the current table that are shared. Shared field descriptors will not be shown for a table and library by simply clicking the View FD’s button. This is because shared field descriptors do not correspond to any specific library. You must use the Table FD’s option to view the field descriptors for a table that have been shared.
All FD's - Displays the shared field descriptors for all tables for the current system alias.
Table FDs - Shows the Usage ID field for all the field descriptors for the current table and library.
Table FDs w/UsageId - Shows the Usage ID field for all the field descriptors for the current table and library which have a Usage ID.
All FDs w/UsageId - Shows the Usage ID field for all the field descriptors for the current system alias which have a Usage ID.
Multiple Fields - This search option provides a means to display a subset of field descriptors based on one or more of the following search fields: Library Name, Table Name, Field Name, External Name, Id, Usage ID, Field Descriptor Type.
The quick edit feature lets you display a subset of field descriptors and edit specific fields from the table view. Each of the views below shows a different set of fields:
Default Value and Required - Shows an editable table that includes the Default Value and Required fields.
Display Properties - Shows the following field descriptor fields: Field Set, Display Order, Display Rule, Display Component, Id, Field Name, and External Name.
Key Position - Shows the following field descriptor fields: Key Position, Id, Field Name, External Name.
When an SQL operation that has a question mark in its code (e.g. SELECT * FROM PLANETJ.CUSTOMER WHERE BALANCE > ?) is run, the Field Descriptor for the BALANCE field is used to generate an input where the user can provide a value for the query at run-time. If the Field Descriptor indicated that the maximum value for this field was 9,999,999 then the HTML input would not allow the user to enter a larger value. If the Field Descriptor indicated that the field should be displayed with an HTML text area component (instead of a text field), then the generated input would be a text area.
You can override this behavior and use a different Field Descriptor for generating the user prompt. To do so, append the ID of the Field Descriptor you want to use to the question mark. For example, the query SELECT * FROM PLANETJ.CUSTOMER WHERE BALANCE > ?307 would use Field Descriptor 307 for generating the prompt input shown to the user. This enables you to present a prompt for the same field in different way in different queries.
TAGS: user selection