Portal Object
Username:  
Password:
  > Home
> User Guide
> Reference
v Portal Object
    o Page Menu Model
    o Action Menu Model
    o Object Reference
> Development Guide


Shortcuts
sys Class
debug Class
Intrinsic Conversions
>> Portal Object <=  =>      <  1  2  3  4  5  6  7  8  >  
EditTable BEE Portal Object Manual

For web sites that have database access, there is a tool for the administrator to edit individual tables.

Two types of scheme files need to be defined: scheme%editable&Table contains an array of all tables that allows editing, and scheme%{Table}& is a scheme file containing the editing specification of table {Table}.  The specification format in scheme%{Table}& is as following:

DBID For web sites with multiple databases, identify which database to use for the Table (Default is blank - the main database)
KeyField The Key Field of the Table (Default to be "ID")
OrderBy The "order by" clause in the listing (e.g. OrderBy=Name, Age desc)
SearchField:{field} The "help text" for the Search field {field}.  It is required even there is no help text.  Otherwise, it will not be searched.
Match:{search} The "match" specification for the "database" command.  (e.g. Match:Name=regexp:Name, or Match:FromAge=min:Age) (Default is blank - direct match.)
ListField:{column_head} The Field for column {column_head} (the caption at the first row of the list).  It is required for fields appearing on the search result list.
RecordsPerPage Records per page in the listing (Default is 10)
PagesPerBlock Pages per block in the page bar (Default is 10)
Caption:{field} The captions shown in the search form and edit form for Field {field}.  (Default is the field name.)
Decode:{field} The BEE Conversion for decoding Field {field} when reading records
Encode:{field} The BEE Conversion for encoding Field {field} when writing records
Quote:{field} The quotation mark around the Field {field}.  Default is single quotation mark.  (Some database platform like mSQL does not like numeric fields to be quoted.  In this case, define the Quote as blank, e.g. Quote:ID=)
Default:{field} The default value for new record (e.g. Default:Qty=0.0, or Default:UpdateAt={sys%time|strftime:%Y-%m-%d}
InputType:{field}

The input type (required for any fields appearing on any forms, search or edit).  The value is one of the followings:

  • "select" - Select box
  • "readonly" - Unchangable value from the table
  • "displayonly" - Same as "readonly" except that it is ignored when writing
  • "const" - Unchangable value from scheme%{Table}&Const_{field}
  • others (e.g. most commonly "text") - form field.  The value is used in <input ... type=...>
Select_{field}:{val} Options for "select" fields.  (e.g. Select_Payment:C=Cash)
Numeric {val} needs to be preceeded by "@" (e.g. Select_Active:@0=No)
Const_{field} Value for "const" fields.  (e.g. Const_Operator={sys%auth:username}
InputSize:{field} The value used in <input ... size=...>
InputMaxLength The value used in <input ... maxlength=...>

The index.htm page can be modified to incorporate the utility page (e.g. table.htm) to include the editable.htm utility from the "portal/" directory.  For example:

switch ('{pt%PPOriginal}') {
case '{pt%Subpath}/menuedit.htm':
 include "portal/menuedit.htm";
 break;
case '{pt%Subpath}/organizer.htm':
 include "portal/organizer.htm";
 break;
case '{pt%Subpath}/search.htm':
 include "portal/search.htm";
 break;
case '{pt%Subpath}/table.htm':
 include "portal/edittable.htm";
 break;
default:
 text {pt%SP}&PageBody
  leadpath='{pt%Subpath}'
  editprompt='Please click this sentence 3 times to enter the page content.'
  default='<span class="error"><font size="-1">Page not found or</font><br>Under construction</span>';
}

 

Previous Page       Next Page

Accsoft Computer Technology Pty Ltd     ABN: 98 065 617 549
PO Box 892, Epping NSW 1710         Level 1, Epping Office Park, 242 Beecroft Rd, Epping NSW 2121, Australia
Tel: Sydney - (02)98691668     National - 1300-881668         Fax: (02)98691866
© Copyright 2003 Accsoft Computer Technology Pty Ltd