System Functions

 

Global functions

USAGE: <FunctionName>

Function Name Description
getTblObj(tablename) Return table object from table name
Parms
 tablename - table name
getTblFields(tablename) Return table fields object from table name
Parms
 tablename - table name
getFldObj(fieldname, table) Return field object from field name
Parms
 fieldname - field name
 table - table name or table object
getFldVar(fieldname, table) Return field variable from field name
Parms
 fieldname - field name
 table - table name or table object
getCtrlObj(id) Return control object from id
Parms
 id - control id
getSettingObj(id) Return setting object from id
Parms
 id - setting id

 

Methods of dbam Object

dbam is a global object with methods for code generation.

USAGE: dbam.<FunctionName>

Function Name Description
quotedName(obj) Return quoted name for object specified
Parms
 obj - object name
varName(str) Return variable name
Parms
 str - object name
fieldSqlName(f) Return field SQL name
Parms
 f - field object
folderPath(id) Return folder path from control id
Parms
 id - control id
getFileNameByCtrlID(id) Return file name from control id
Parms
 id - control id
getCustomScript(typ, codetyp, name, ctrlid, l1key, l2key) Return client scripts / template
Parms
 typ - script type (Client / Template)
 codetyp - code type (Global / Table / Other)
 name - script name
 ctrlid - control id
 l1key - level 1 key (table)
 l2key - level 2 key (field)
isFldList(f) Return if list field
Parms
 f - field object
isFldView(f) Return if view field
Parms
 f - field object
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
 8 - Memo
fldFormat(f) Return field format string
Parms
 f - field object
fldTemplate(f, pageid) Return field template for page id
Parms
 f - field object
 pageid - page id (list/view)
parseJson(str) Parse string and return JSON
Parms
 str - string in JSON format
renderCustomAttributes(sAttrs) Parse string and return HTML attributes
Parms
 sAttrs - string in HTML or JSON format
getScript(ScriptType, CodeType, ScriptName) Return client scripts / template
Parms
 ScriptType - script type (Client / Template)
 CodeType - code type (Global / Table / Other)
 ScriptName - script name
getClientScript(CodeType, ScriptName) Return client scripts
Parms
 CodeType - code type (Global / Table / Other)
 ScriptName - script name
getTemplateScript(CodeType, ScriptName) Return template
Parms
 CodeType - code type (Global / Table / Other)
 ScriptName - script name
getEvent(TableName, ScriptName, CtrlID) Return event
Parms
 TableName - table name
 ScriptName - script name
 CtrlID - control id
htmlEncode(t) HTML encode (replace &, ", <, >)
Parms
 t - source string
htmlAttributes(attrs) Return HTML attributes
Parms
 attrs - string or JSON

 

 ©2017 e.World Technology Ltd. All rights reserved.