1. System Functions (Common utility functions)

USAGE: SYSTEMFUNCTIONS.<FunctionName>

Function Name Description
ew_CssInherit(val) Return "inherit" if no value. Otherwise return original value.
Parms
 val - Css Value
ew_RowCntVar(v) (v8.0+) Return row object name (using lRowCnt)
Parms
 v - object name
ew_RowVar(v) Return row object name (using lRowIndex)
Parms
 v - object name
ew_RowVarQuoted(v) Return row object name (usinjg lRowIndex with quote)
Parms
 v - object name
ew_PageObj Return page object
ew_GetPageObjByCtrlId(ctlid) (v9.0+) Return page object name based on control id
Parms
 ctlid - control id
ew_GetCtrlById(id) (v9.0+) Return control object based on control id
Parms
 ctlid - control id
ew_BtnCaption(name) Return button caption name
Parms
 name - original caption name
ew_SecurityCheck(sId, bSecurity, bAnonymous, bUserlevel) Return Security Checking codes
Parms
 sId - control id
 bSecurity - security is enabled
 sAnonymous - page is anonymous
 bUserLevel - user level is enabled
ew_AspCode(asp, typ) Return codes in ASP.NET tags (i.e. <% ... %>)
Parms
 ASP.NET - original ASP.NET codes
 typ - return codes in ASP.NET tags if = 0
ew_JsVal(v) (v8.0+) Return javascript boolean ("true"/"false")
Parms
 v - value
ew_Val(v) (v8.0+) Return ASP.NET boolean ("True"/"False")
Parms
 v - value
ew_RandomKey Return random key
ew_FieldName Return sql field name
ew_FolderPath(id) Return folder path based on control id
Parms
 id - control id
ew_GetFileNameByCtrlID(id) Return file name based on control id
Parms
 id - control id
ew_RelFolder(f) Return relative folder to current output folder
Parms
 f - folder path
ew_RelPath(f1, f2) Return relative folder of f1 to f2
Parms
 f1 - folder path 1
 f2 - folder path 2
ew_EscapeString(sSrc, sEsc) Return escaped string
Parms
 sSrc - source string
 sEsc - escape type (double quote for VB, back slash for js)
ew_DoubleQuote(str, cnt) Return string with correct number of double quotes
Parms
 str - source string
 cnt - number of double quotes (0,1)
ew_Quote(str) Escape double quote in string with two double quotes
Parms
 str - source string
ew_Dequote(str) Replace embracing double quote or single quote
Parms
 str - source string
ew_UnformatName(name) Unformat "=" and "," in name
Parms
 name - name to be unformatted
ew_HtmlValue(str) Return value for proper display in html
Parms
 str - source string
ew_JsEncode(val) Encode value properly for js
Parms
 val - source value
ew_HtmlEncode(str) Encode value properly for html
Parms
 str - source string
ew_AspValue(str) Encode value properly for ASP.NET Parms
 str - source string
ew_GetFieldType(ftype) Return FIELD type based on ADO field type
Parms
 ftype - ADO Field Type
Output
 1 - Numeric
 2 - Date
 3 - String
 4 - Boolean
 5 - GUID
 6 - Others
 7 - Time
ew_SetDefaultValue(ftype, defvalue) Return default value
Parms
 ftype - ADO Field Type
 defvalue - default value
ew_BoolFieldTagValues(ftype, tagvalues) Return tag values for Boolean field
Parms
 ftype - ADO Field Type
 tagvalues - original tag values
ew_SQLPart(sSQL, sId) Return part of the SQL
Parms
 sSQL - original SQL
 sId - token for different part of SQL
(SELECT,FROM,WHERE,GROUP BY,HAVING,ORDER BY)
ew_RecPerPageList(sList, iRec) Return record per page list (comma separated)
Parms
 sList - original record per page list
 iRec - default record per page
ew_IsFldVirtualLookup(fld) (v8.0+) Return if field is a virtual lookup field
Parms
 fld - field object
ew_VirtualLookupFldSql(fld) (v8.0+) Return the SQL for the virtual lookup field
Parms
 fld - field object
ew_VirtualLookupFldName(fld) (v8.0+) Return the field name for the virtual lookup field
Parms
 fld - field object
ew_QuotedName(name) (v8.0+) Return the properly quoted sql name
Parms
 name - table/field name
ew_SqlConcatName(name1, name2) (v8.0+) Return the concat sql name
Parms
 name1 - field name 1
 name2 - field name 2
ew_FieldSqlName(fld) (v8.0+) Return the sql name for the field
Parms
 fld - field object
ew_HasTagValue(Field, Val) (v9.0+) Return if the field tag value exists
Parms
 Field - field object
 Val - field tag value
ew_FldTagValues(Field) (v9.0+) Return the field tag values in comma separated format
Parms
 Field - field object

 

2. System Functions (Overridable)

USAGE: SYSTEMFUNCTIONS.<FunctionName>

Function Name Description
CharSet Return <meta> tag for charset specified
FavIcon (v8.0+) Return <link> tags for favicon specified
CssFile Return <link> tag for css file specified
GetScript(ScriptType, CodeType, ScriptName) Return Server/Client Scripts
Parms
 ScriptType - script type (Server / Client)
 CodeType - code type (Global / Table / Other)
 ScriptName - script name
GetServerScript(CodeType, ScriptName) Return Server Scripts
GetClientScript(CodeType, ScriptName) Return Client Scripts
ScriptExist(ScriptType, CodeType, ScriptName) Return if Script Exists
Parms
 ScriptType - script type (Server / Client)
 CodeType - code type (Global / Table / Other)
 ScriptName - script name
ServerScriptExist(CodeType, ScriptName) Return if Server Script Exists
ClientScriptExist(CodeType, ScriptName) Return if Client Script Exists
ScriptTimeout Return ASP.NET script timeout codes
ASPDirective Return ASP.NET Directives (CodePage, LCID)
SessionTimeout Return ASP.NET Session Timeout codes
NoCache Return ASP.NET No Cache codes
IncludeFile(fn, parm) Return ASP.NET Include file statement
Parms
 fn - file control id
 parm - extra parameter
ConnectionString Return Database Connection String
Security Return ASP.NET Security checking codes
ScriptInsert Return ASP.NET codes for inserting a record
ScriptUpdate Return ASP.NET codes for updating a record
Script(ctlid) Return ASP.NET codes for inserting/updating a record
Parms
 ctlid - "insert" / "update"
ScriptUpdateFile Return ASP.NET codes for file upload to folder
ScriptUpdateDetailKey Return ASP.NET codes for updating detail key field
ScriptCommon Return ASP.NET codes for rendering field (common)
ScriptViewRefer Return ASP.NET codes for rendering field for VIEW (HREF)
ScriptEditRefer Return ASP.NET codes for rendering field for EDIT (HREF)
ScriptView Return ASP.NET codes for rendering field for VIEW
ScriptViewCall(cv, vv) Return ASP.NET codes for rendering field for VIEW
Parms
 cv - Current Value
 vv - View Value
ScriptViewNo(cv, vv) Return ASP.NET codes for rendering field for VIEW (AutoNumber field)
ScriptViewText(cv, vv) Return ASP.NET codes for rendering field for VIEW (TEXT field)
ScriptViewHighlightSearch(cv, vv) Return ASP.NET codes for rendering field for search highlight
ScriptViewFormat(parm) Return ASP.NET codes for field View Tag format
Parms
 parm - Field to be formatted
ScriptViewPassword(cv, vv) Return ASP.NET codes for rendering field for VIEW (PASSWORD field)
ScriptViewRadio(cv, vv) Return ASP.NET codes for rendering field for VIEW (RADIO field)
ScriptViewTable(cv, vv) Return ASP.NET codes for rendering field for VIEW (Link to Table field)
ScriptViewValues(cv, vv) Return ASP.NET codes for rendering field for VIEW (Lookup Value field)
ScriptViewCheckbox(cv, vv) Return ASP.NET codes for rendering field for VIEW (CHECKBOX field)
ScriptViewSelect(cv, vv) Return ASP.NET codes for rendering field for VIEW (SELECT field)
ScriptViewTextarea(cv, vv) Return ASP.NET codes for rendering field for VIEW (TEXTAREA field)
ScriptViewHidden(cv, vv) Return ASP.NET codes for rendering field for VIEW (HIDDEN field)
ScriptViewFile(cv, vv) Return ASP.NET codes for rendering field for VIEW (FILE field)
ScriptViewHref(cv, vv) Return ASP.NET codes for rendering field for VIEW (HREF field)
ScriptAdd Return ASP.NET codes for rendering field for ADD
ScriptEdit Return ASP.NET codes for rendering field for EDIT
ScriptEditCall(cv, ev, ctlid) Return ASP.NET codes for rendering field for ADD/EDIT/SEARCH
Parms
 cv - Current Value
 ev - Edit Value
 ctlid - Control ID
ScriptSearch Return ASP.NET codes for rendering field for SEARCH (Search Field 1)
ScriptSearch2 Return ASP.NET codes for rendering field for SEARCH (Search Field 2)
ScriptEditDefaultValue Return ASP.NET codes for rendering field for Default Value
ScriptEditNo(cv, ev, ctlid) Return ASP.NET codes for rendering field for EDIT (AutoNumber field)
ScriptEditText(cv, ev, ctlid) Return ASP.NET codes for rendering field for EDIT (TEXT field)
ScriptEditPassword(cv, ev, ctlid) Return ASP.NET codes for rendering field for EDIT (PASSWORD field)
ScriptEditRadio(cv, ev, ctlid) Return ASP.NET codes for rendering field for EDIT (RADIO field)
ScriptEditTable(cv, ev, ctlid) Return ASP.NET codes for rendering field for EDIT (Link to Table field)
ScriptEditUserID(cv, ev, ctlid) Return ASP.NET codes for rendering field for EDIT (User ID field)
ScriptEditValues(cv, ev, ctlid) Return ASP.NET codes for rendering field for EDIT (Lookup Value field)
ScriptEditCheckbox(cv, ev, ctlid) Return ASP.NET codes for rendering field for EDIT (CHECKBOX field)
ScriptEditSelect(cv, ev, ctlid) Return ASP.NET codes for rendering field for EDIT (SELECT field)
ScriptEditTextarea(cv, ev, ctlid) Return ASP.NET codes for rendering field for EDIT (TEXTAREA field)
ScriptEditHidden(cv, ev, ctlid) Return ASP.NET codes for rendering field for EDIT (HIDDEN field)
ScriptEditFile(cv, ev, ctlid) Return ASP.NET codes for rendering field for EDIT (FILE field)
ScriptAggregate Return ASP.NET codes for rendering field for Aggregation
FieldList Return field control for LIST
FieldAggregate Return field control for AGGREGATE
FieldView Return field control for VIEW
FieldViewCall(cv, vv) Return field control for VIEW
Parms
 cv - Current Value
 vv - View Value
FieldViewCheckbox(cv, vv) Return field control for VIEW (CHECKBOX field)
FieldViewFile(cv, vv) Return field control for VIEW (FILE field)
FieldViewFileConfirm(cv, vv) Return field control for VIEW (FILE field confirm page)
FieldViewText(cv, vv) Return field control for VIEW (TEXT field)
FieldViewHref(ctl) Return field control for VIEW (HREF field)
Parms
 ctl - Control to be HREF
FieldUpdate Return field control for UPDATE
FieldEdit Return field control for EDIT
FieldEditPrimaryKey Return field control for EDIT (Primary Key field)
FieldEditDetailKey Return field control for EDIT (Detail Key field)
FieldAdd Return field control for ADD
FieldSearch Return field control for SEARCH (Search field 1)
FieldSearch2 Return field control for SEARCH (Search field 2)
FieldEditCall(ctl, cv, ev, ctlid) Return field control for EDIT
Parms
 ctl - Control
 cv - Current Value
 ev - Edit Value
 ctlid - Control ID
FieldEditNo(ctl, cv, ev, ctlid) Return field control for EDIT (AutoNumber field)
FieldEditHidden(ctl, cv, ev, ctlid) Return field control for EDIT (HIDDEN field)
FieldEditRadio(ctl, cv, ev, ctlid) Return field control for EDIT (RADIO field)
FieldEditCheckbox(ctl, cv, ev, ctlid) Return field control for EDIT (CHECKBOX field)
FieldEditPassword(ctl, cv, ev, ctlid) Return field control for EDIT (PASSWORD field)
FieldEditSelect(ctl, cv, ev, ctlid) Return field control for EDIT (SELECT field)
FieldEditDynamicSelect(ctl, cv, ev, ctlid) Return field control for EDIT (Dynamic SELECT field)
FieldEditAjaxSelect(ctl, cv, ev, ctlid) Return field control for EDIT (Ajax SELECT field)
FieldEditAutofill(ctl, cv, ev, ctlid) Return field control for EDIT (Auto Fill field)
FieldEditFile(ctl, cv, ev, ctlid) Return field control for EDIT (FILE field)
FieldEditText(ctl, cv, ev, ctlid) Return field control for EDIT (TEXT field)
FieldEditTextarea(ctl, cv, ev, ctlid) Return field control for EDIT (TEXTAREA field)
FieldOperator Return field control for Search operator 1
FieldOperator2 Return field control for Search operator 2
FieldOperatorCall(ctl, val, opr) Return field control for Search operator
Parms
 ctl - Control
 val - Search Value
 opr - Operator
FieldSearchCondition Return field control for Search Condition (BETWEEN or 2nd Opr enabled)
GroupByFieldCount Return Group By Field count
GroupByFields Return Group By Field (comma separated)
GroupByFieldNames Return Group By Field names (comma separated)
GroupByFieldSources Return Group By Field sources (comma separated)
OrderByFieldCount Return Order By Field count
OrderByFields Return Order By Field (comma separated)
OrderByFieldNames Return Order By Field names (comma separated)
OrderByFieldSources Return Order By Field sources (comma separated)
UpdateComboJS(ctlid) Return js to update dynamic selection list
Parms
 ctlid - Control ID
UpdateSearchJS Return js to update dynamic selection list (search)
JsReqValidator Return js validator for required field
JsReqErrMsg Return js error message for required field
JsReqDefaultMsg Return default js error message for required field
JsValidator Return js validator
JsFileTypeValidator Return js validator for file type
JsErrMsg Return js error message
JsDefaultMsg Return default js error message
AspReqValidator Return ASP.NET validator for required field
AspSearchValidator Return ASP.NET validator for search field
AspValidator Return ASP.NET validator
AspFileValidator Return ASP.NET validator for file type
AspValidatorCommon(fld, msg) Return ASP.NET validator
Parms
 fld - field
 msg - message
AspErrMsg Return ASP.NET error message
IsAggregate Return if Aggregate is enabled
HasFileField Return if Has File Field
IsExport Return if Export enabled
IsMultiPage Return if MultiPage is enabled
HasAutoSuggest Return if Has Auto Suggest Field
IsAutofillMasterField(ctlid) Return if field is auto fill master field
Parms
 ctlid - control id
IsFileRelatedField(fldname) Return if field is file related field
Parms
 fldname - field name

 

 ©2004-2011 e.World Technology Ltd. All rights reserved.