Field Setup

After loading the database, the database objects (tables, views, custom views and reports) will be shown in the left pane (the database pane). Click on any table to go to the Field Setup Page for that table at any time.

Note: For simplicity, we use "table" in the following description to refer to any of database object in the project. A database object can be either a table, a view, a custom view or a report.

ASPMaker support all commonly used ADO data type. If ASPMaker finds any unsupported fields in a table, an [Unsupported Fields] tab will appear. You can click on the tab to view the list of fields that are not supported.

The Field Setup pages consists of two section. The upper section is a grid showing available options of all fields. The lower section contain two panels, the [Edit tag] panel and the [View tag] panel for the selected field.

 

The grid consists of the following sections:

 

General

Properties

Field Name Field Name (read only)
Data Type Data Type (read only)
Size Maximum field length (read only)
Caption Caption to be displayed
Primary Key

Primary Key of the table

Important Note:

  1. You should never change this field unless you are absolutely sure that this field is unique. Otherwise a particular record cannot be located and unexpected results may occur.
  2. From v4.1, Composite key is supported, and primary key is uneditable in the edit page.
Page No.

Page number of the field. By default all the fields are in page 1 and multi-page is disabled.

From v5.0+, multi-page Add/Edit is supported. If you set any page number to larger than 1, multi-page feature will be enabled automatically.

Auto-Update Value

A dynamic value to update the field function automatically in Add/Edit pages.

The dropdown list for this setting is preloaded with a few functions for your selection. For exmaple, you may want to record the last modified date of a record, then you can select "ew_CurrentDate". Do not select a function that return values of unmatching data type, for example, you should not select a function that return a non-numeric string for a numeric field.

Notes:

  1. This setting will make the field hidden automatically and it overrides the default value in Add page and custom value for Hidden Edit tag in Edit page. (see section below)

  2. You can add your own VBScript functions, the function must accept no argument and return a value. You can add your function names (comma separated) in the following registry key:

    HKEY_CURRENT_USER\Software\ASPMaker\<Version>\Settings\General
    Value: AutoUpdateValues

    e.g. You can enter "MyAutoValueFunction1,MyAutoValueFunction2". Of course, you also need to include your VBScript functions in the generated scripts or in the template so it is available for use.

Custom field display order by drag-and-drop

You can change the field order defined in the database by simple drag-and-drop. Simply click the Field Name column to select the field, then drag it to where you want. ASPMaker will generate ASP and display records according to this order.

Custom field order by drag-and-drop

 

List Page

Properties

List Show field in list page
Aggregate Enable Field Aggregation. Aggregated values will be shown at Page Footer. Not applicable in multi-column view. Aggregate options include:
- TOTAL (sum of all field values in current page)
- COUNT (count of records in current page)
- AVERAGE (average field value in current page)
Width

Specify field column width

e.g. If you enter "200px" (without quotes), the output will be style="width: 200px"

Wrap Enable/Disable wrapping of field value
Quick Search

Include this field when performing Quick(Basic) Search in the List page.
Note: Only text fields and numeric fields are supported in Quick Search. By default only text fields are enabled.

Ext. Search

Use this field in Extended Quick Search (ASPMaker 5+)

Extended Quick Search is enhancement of Quick Search. It is sort of a combination of Quick Search and Advanced Search. If a field is checked for Ext. Search, a form element for the field will be shown in the Quick(Basic) Search form and the user input criteria for this field will be included when performing Quick(Basic) Search.

Extended Quick Search will use the same search operators specified under the "Advanced Search Page" section (see below).

 

View Page

Properties

View Show field in view page
View Tag HTML tag to display the field. Used in List/View pages.

You can either click the [View Tag] column and select a View Tag from the drop down box or click the icon on the View Tag panel toolbar to select. After selecting the View Tag, you can further setup its properties in the View tag panel.

View As tags

There are two types of View tag, Formatted Text and Image.

Formatted Text - View Tag to display the field value as formatted text using <div> tag with optional hyperlink. Properties:

Format
None No formatting
Currency Display in currency format (VBScript FormatCurrency function)
Date/Time Display in date format (ASPMaker formatdatetime function)
Number Display in number format (VBScript FormatNumber function)
Percent Display in percent format (VBScript FormatPercent function)
String Format the field value with specified VBScript string function or custom function
Max Length (List page)

Truncate the field value at specified max. length and append "..." to the end. (4.1+)

Note: This setting only applied to memo fields in list page and must be larger than 0 to take effect.

DIV Tag attributes
Style

Bold - Display as Bold
Italic - Display as Italic
Align - Left/Center/Right/Justify. Align the data.

Custom Attributes Other custom attributes for the <div> tag. For example, you can enter "onmouseover='myjsfunction();'".
Hyperlink
HREF field Display the field as hyperlink with the href attribute set to the value of this field. Can be the field itself.
Target _top/_parent/_self/_blank
Prefix

- None (no prefix, relative path of url)
- http:// (prefix http:// added, absolute path of url)
- mailto: (prefix mailto: added, email link)
- ftp:// (prefix ftp:// added, ftp link)
- file:// (prefix file:// added, file link)
- news:// (prefix news:// added, newsgroup link)

Suffix Append the input string to the URL

 

Image - View Tag to display as Image using <img> tag. The field should be a BLOB field or a field storing the path of the image.

IMG Tag attributes
Width Specify the width of the image
Height Specify the height of the image
Alt Specify the alt attribute of the image tag
Custom Attributes Other custom attributes for the <div> tag. For example, you can enter "onmouseover='myjsfunction();'".
Resize

Resize the image to above width and/or height on displaying the image.

Note: This features requires AspJpeg on your server and the template extension for AspJpeg enabled. (click Tools->Extension to enable) AspJpeg is a third-party commercial server side component. It is not developed by the author of ASPMaker and are not part of ASPMaker. The extension does NOT contain the component and is provided for registered user as an example of extension only. See Third-Party Tools.

Hyperlink (same as above)

 

 

Edit Page

Properties

Edit Show field in edit page
Title Title to be placed in title attribute of Edit Tag. (see section below)
Read Only Make the field read only in edit page
Edit Tag Form element for the field. Use in Add/Copy/Edit/Search pages. (See below for details)

You can either click the [Edit Tag] column and select a Edit Tag from the drop down box or click the icon on the [Edit Tag] panel toolbar to select. After selecting the Edit Tag, you can further setup its properties in the Edit Tag panel:

    

Edit Tags

Edit Tags are HTML forms elements for the field in Add/Copy/Edit/Search pages. All HTML form elements are supported:

Text

<input type="text"> tag

Display the field as a textbox.

Size - size of the textbox

MaxLength - maximum input length of the textbox

Custom attributes - Other custom attributes for the tag

Validation - see section below

Use Lookup Table - enable Auto-Suggest and/or Auto-Fill feature by Ajax.

Auto-Suggest - With a lookup table, when the user type in the textbox, a dynamic dropdown list populated with data from the lookup table matching the user input will appear for user to select. If the data already exists, the user can easily select without typing the full text. If not, the user can still input as usual. To enable this feature, check [Use Lookup Table] and enter the lookup table info in the [Lookup Table] panel next to the [Edit Tag] panel. (See section below)

Auto-Fill - This is an extended version of Auto-Suggest, in which the Ajax script does not only "auto-suggest", it actually fill in the field for your automatically. For example, when you select a product number, it will fill in the product name and product price textbox for you. The required conditions are:

  1. the current field has a [Parent field] in the lookup table settings
  2. the parent field is setup as a combobox (That is, one selection only, or in other words, the parent field uses Select Edit tag with [Multiple] option DISABLED, see description for Select Edit tag below.)
  3. the parent field uses the same lookup table as the current field

If these conditions are met, when the user changes the parent combobox, the Ajax script will try to lookup another field value (specified by [Display field #1] of the lookup table for the current field) from the record found according to the selected option of the combobox, and the value will be filled into the textbox automatically.

For instance, when you select a product number from combobox, the script know the product ID from the option value, so it can use the ID to locate the product from the same lookup table (your product table) and retrieve another field value such as product name or product price and fill the textbox for the current field.

Note: Before using Auto-Fill, consider database normalization, in many cases you do not need to copy the values at all. You can view the other field values by creating a query/view joining the current table with the lookup table using the parent field as linked field.

 

Password

<input type="password"> tag

Display the field as a masked textbox.

Size - size of the textbox

MaxLength -= maximum input length of the textbox

Custom attributes - Other custom attributes for the tag

Validation - see section below

Radio

<input type="radio"> tag

Display the field as an option of a radio button list. You can enter the options manually in the [User Value] panel next to the [Edit Tag] panel.

Custom attributes - Other custom attributes for the tag

Use lookup table - use an existing lookup table instead of user input value/label pairs for the radio buttons. To enable this feature, check this option and enter the lookup table info in the [Lookup Table] panel next to the [Edit Tag] panel. (See section below)

Repeat columns - specifies the no. of radio buttons per row

Validation - see section below

Checkbox

<input type="checkbox"> tag

Display the field as one or more option(s) of a checkbox list. You can enter the options manually in the [User Value] panel next to the [Edit Tag] panel.

Custom attributes - Other custom attributes for the tag

Use lookup table - use an existing lookup table instead of user input value/label pairs for the checkboxes. To enable this feature, check this option and enter the lookup table info in the [Lookup Table] panel next to the [Edit Tag] panel. (See section below)

Repeat columns - specifies the no. of checkboxes per row

Validation - see section below

Note: The submitted values of the multi-selected checkboxes is a comma-separated string. Therefore you must use a string field for checkbox list.

Select

<select> tag

Display the field as a combobox (one selection) or a listbox (multiple selection). You can enter the options manually in the [User Value] panel next to the [Edit Tag] panel.

Size - no. of options to show. If more that 1, the selection list is shown as a listbox, otherwise it is shown as a combobox.

Multiple: Check to enable multiple selection (listbox)

Note: The submitted values of the multi-selected listbox is a comma-separated string. Therefore you must use a string field for listbox.

Custom attributes - Other custom attributes for the tag

Use lookup table - use an existing lookup table instead of user input value/label pairs for the checkboxes. To enable this feature, check this option and enter the lookup table info in the [Lookup Table] panel next to the [Edit Tag] panel. (See section below)

Use Ajax - specifies if Ajax is used to update the combobox.

Note: "Use Ajax" option does not support multiple selection.

Validation - see section below

TextArea

<textarea> tag

Display the field as a textarea.

Cols - no. of columns of the textarea

Rows - no. of rows of the textarea

Custom attributes - Other custom attributes for the tag

Use DHTML Editor - replace the textarea with a DHTML editor for editing the data as HTML.

Note: The DHTML Editor(s) requires newer version of browsers such as IE6+, NS7+ or FF1+. It is not developed by the author of ASPMaker and no technical support will be provided. (See Third-party Tools.)

Validation - see section below

File

<input type="file"> tag

Display the field as a file upload control. For BLOB fields or string fields only.

Size - size of the input tag (NOT file size)

Custom attributes - Other custom attributes for the tag

If the field is of BLOB (binary) data type, file is uploaded to the database. You can also store the information of the uploaded file in the following fields:

File type field - Recommended. Useful when you want to response to user browser the exact content type of the data.

File name field - Optional. Useful if you want to use the original filename.

Note: Do not specify file name field if you want IE to open the file automatically. (IE may fail to open non-image files retrieved from database properly.) Use file name field if you want IE to popup a File Download dialog for user to save the file with the filename specified in the file name field.

File size field - Optional. Stores the uploaded file size.

Image width field - Optional. For use with images only. Stores the width of the uploaded image.

Image height field - Optional. For use with images only. Stores the height of the uploaded image.

If the field of string type, file is uploaded to a subfolder relative to the application root.

Upload folder - the folder where the uploaded file will reside. If you do not enter a specific folder, all the uploaded files will be put in the global upload folder specified in the ASP tab (see ASP Setup).

Notes:

  1. Make sure that the Web server user have read/write access to the folder. You can right-click the folder in Windows Explorer and add read/write access for IUSR_<MachineName> on the Security tab.

  2. The path is relative to application root. Use slashes "/" as path delimiter, no leading slash. e.g. If the application root of your website is C:\Inetpub\wwwroot\demo and you enter "uploads/folder1" in this textbox, the folder for the uploaded files will be C:\Inetpub\wwwroot\demo\uploads\folder1. If you are not sure which folder is application root, please read Creating Virtual Directories in IIS.

Resize image - Optionally resize the image to resize width and/or height.

Resize width - the width of the resized image

Resize height - the height of the resized image

Note: This features requires AspJpeg on your server and the template extension for AspJpeg enabled. (click Tools->Extension to enable) AspJpeg is a third-party commercial server side component. It is not developed by the author of ASPMaker and are not part of ASPMaker. The extension does NOT contain the component and is provided for registered user as an example of extension only. See Third-Party Tools.

Validation - see section below

Hidden

<input type="hidden"> tag

Hide the field with a hidden form element.

Note: This is different from de-selecting the field in the [Edit] column. If a field is de-selected, no code will be generated for the field in the Edit page and the field will not be updated. With a hidden form element the field is not seen but it may still get updated.

Custom value - by default the 'value' attribute contains the field value, custom value is used to update the field with an other value, for example, "Date()", when a record is updated using the Edit page.

Custom attributes - Other custom attributes for the tag

Notes:

  1. Custom value is used in Edit page only. It cannot be used with Read-only fields, User ID fields and Detail fields(Foreign key fields)

  2. In Add page, if a default value is specified (see section below), hidden form element will also be used but the 'value' attribute will contain the default value. If default value is not specified, the field will be displayed as a normal textbox.

 

Using User Values for Edit Tag (Radio/Checkbox/Select)

For Radio/Checkbox/Select Edit Tags, the default option values are user input values, you can enter as many value/label pairs as you want in the [User Values] panel next to the [Edit Tag] panel.

Note: For boolean fields, if you use Radio Edit Tag with User Values, the first value/label should be for True and the second for False.

Using Lookup Table for Edit Tag (Text/Radio/Checkbox/Select)

In real world applications, the option values usually come from a (lookup) table in the database. ASPMaker make it very simple to use lookup values for key field values, simple click [Use Table], the [Lookup Table] panel will replace the [User Values] panel, select the following properties:

Lookup Table tag setup

Table name The lookup table to be linked to
Link field The field to be used as the value of an option (for Radio/Checkbox/Select only). This field is usually the primary key of the lookup table.
Display field #1 The field in lookup table to be used as the label of an option. (If auto suggest textbox, only string fields will be selectable.)
Display field #2 Optional. Another field in lookup table to be included in the label of an option. (If auto suggest textbox, only string fields will be selectable.)
Order By Optional. Used to sort the options.
Asc/Desc Optional. Sorting order.
Distinct Optional. Unique records only. (for Radio/Checkbox/Select only)
Filter WHERE clause to filter options from the table.
Parent field

Optional. Available for Select or Text Edit tag only. Specify the parent selection list for current selection list or textbox. When the parent selection list is changed, the available options in current selection list or the value of the current textbox will be changed accordingly.

Note: For used with the Dynamic Selection List and Auto-Fill feature only. NOT used in Auto-Suggest feature .

Filter Field

Optional. Available for Select tag only. When the parent selection list changes, only records with a Filter Field value matching the selected value of the parent selection list will be shown.

Note: For used with the Dynamic Selection List feature only. NOT used in Auto-Suggest or Auto-Fill feature.

Allow Add

Optional. If enabled, the user will be allowed to add an option to the selection list.

Notes:

  1. Review your lookup table design before using this option. The option works best if you there is only one display field and the link field (primary key) is an autoincrement field. In that case the user only need to fill in a textbox and the option is added. But if the link field (primary key) is not an auto-increment field, the user will need to enter the link field value which the user may not know.

  2. The user will be asked to enter the link field and the display field(s) only. If the lookup table has other NOT NULL fields other than the link field and display field(s), the new option cannot be added. However, you can define default values for these fields in the database (not in ASPMaker).

  3. From ASPMaker 6+, this feature also work with child selection list Dynamic Selection List. The filter field value also be added according to the selected option of the parent selection list.

  4. This feature is implemented using Ajax, IE6+/NS7+/FF1+ is required.

 

Validation (for add/copy/edit/search pages)

The data input for each field can be validated using client-side JavaScript.

Validate

Supported validation formats are:
Integer, Float, Range, Date(yyyy/mm/dd), Date(mm/dd/yyyy), Date(dd/mm/yyyy), Time(hh:mm:ss), Email, Credit card, GUID, US phone numner, US zip code, US social security number

Notes:

  1. Other than "/", the date separator of the validation format can also be "-" or ".", depending on the default date format setting in ASP Setup page.

  2. From ASPMaker 6+, you can add your own JavaScript functions for validation. The JavaScript function must accept one argument (the value) and return true (valid value) or false (invalid value). You can add your function names (comma separated) in the following registry key:

    HKEY_CURRENT_USER\Software\ASPMaker\<Version>\Settings\General
    Value: CustomValidationFunctions

    e.g. You can enter "myValidateFunction1,myValidateFunction2". Of course, you also need to include your JavaScript functions in the generated header or in the template so it is available for use.
Use popup calendar

Check this option to use a visual date picker instead of manual input.

Notes:

  1. This option is only available for the date validation formats: Date(yyyy/mm/dd), Date(mm/dd/yyyy), Date(dd/mm/yyyy).

  2. The popup calendar requires IE 5+ or Netscape 7+. It is not developed by the author of ASPMaker and no technical support will be provided. (See Third-party Tools.)
Required Check this checkbox if the field is mandatory
Error Message Enter the error message to popup if error occurs
Check Duplicate

Specify whether to check duplicated values for the field.

If the field is an unique indexed field, ASPMaker will generate server side codes to check duplicate values automatically even this option is not selected. This option is useful when you want to check a non unique indexed fields for duplicated values.

Note: In ASPMaker 5, the validation is done on server side in Add page only. From ASPMaker 6+, the validation is done on both Add and Edit pages.

 

 

Add Page

Properties

Add Show field in add page
Default Value Default value for field (for adding new record only) . Must be a valid VBScript expression. (If it is a string, must be double quoted.)

 

Multi-Update Page

Properties

Multi-Update

Show field in Multi-Update page

Note: If a field is selected, it will be included in the Multi-Update page. In the generated Multi-Update page, there is a checkbox for each field, the field will only be updated if the checkbox is checked so users can update only the checked fields without affecting values of the other unchecked fields.

Advanced Search Page

Properties

Search Show field in Advanced Search page (Note: NOT related to Quick Search)
Search Opr 1 Search operator #1 for the field. Used in Advanced Search or Extended Quick Search.
Search Opr 2

Search operator #2 for the field. Used in Advanced Search or Extended Quick Search.

Notes:

  1. This second search operators will be useful when you may have 2 criteria for the field when searching. You can also select AND/OR to relate the 2 criteria.
  2. ASPMaker (5+) supports "BETWEEN" search operator. If you want to use it, select "BETWEEN" as the first search operator. Since "BETWEEN" requires 2 search criteria, when it is used, the second search operator will be ignored.
  3. If the first search operator is "USER SELECT" and you want to allow "BETWEEN" operator, enable the second search operator so the user can enter 2 search criteria, but again, the second search operator will be ignored if the user selects the "BETWEEN" as the first search operator to search. If the second search operator is disabled, "USER SELECT" does not include "BETWEEN" operator.

 

 

 

 
 ©2001-2007 e.World Technology Ltd. All rights reserved.