OOQL language field


object or link field


define - create new field definition

  field define   AdminName type   Field_Type {Field_DefineOption} [force];

clone - duplicate a field and set the properties for the new instance

  field clone  AdminName define AdminName {Field_EditOption} [force];

edit - update the field properties [associated data for object/link instances will be converted if needed]

  field edit   AdminName {Field_EditOption} [force];

show - print the field properties

  field show   AdminName [Field_GetOption] [Program_ArgsOption] [Token_Option] [ExportFile_Option] ;

select - extract fields on the base of query filters

  field select AdminPatternList {Filter_Option} [Field_GetOption][Token_Option] [ExportFile_Option] ;

undefine - remove a field from the database [associated data for object/link instances will be lost]

  field undefine AdminName ;

Field_DefineOption
umtype UnitMeasure_Type
default GenericValue
default today
reset Field_Reset
description GenericValue
application AdminName
image  FileName
imagedata GenericString
unitmeasure   AdminName { AdminName }
Field_RangeList
program AdminName event  Field_Event   Event_Type [Program_ArgsOption]
workflow AdminName event  Field_Event   [Workflow_Parameters]
[! / not] multiple
[! / not] multiline
[! /not] hidden

Field_EditOption
name AdminName
type Field_Type
umtype UnitMeasure_Type
default GenericValue
default today
reset Field_Reset
description GenericValue
application AdminName
svnrev NUMBER
image  FileName
imagedata GenericString
unitmeasure Edit_Operator AdminName { Edit_Operator AdminName }
Field_RangeEditList
program Edit_Operator  AdminName event  Field_Event   Event_Type [Program_ArgsOption]
workflow Edit_Operator AdminName event  Field_Event   [Workflow_Parameters]
[! / not] multiple
[! / not] multiline
[! /not] hidden

Field_Type
date
datetime
integer
string
text
real
boolean

Field_Reset
none
oncreate
onrevise
onclone

Field_RangeList
range   Field_Range { Field_Range }
range program AdminName

Field_RangeEditList
range  Edit_Operator   Field_Range { Edit_Operator   Field_Range }
range program AdminName

Field_Range
=  GenericValue
!= GenericValue
<  GenericValue
>  GenericValue
<= GenericValue
>= GenericValue
in [ GenericValue , GenericValue ]
in ( GenericValue , GenericValue ]
in [ GenericValue , GenericValue )
in ( GenericValue , GenericValue )


Field_Event
edit

Field_GetOption
get [Field_GetBasicOption]
   
  Field_GetBasicOption
  { Field_GetBasicToken [as IDENTIFIER] { Field_GetBasicToken [as IDENTIFIER] } }
  Field_GetBasicToken [as IDENTIFIER]
     
    Field_GetBasicToken
    Common_GetBasicOption  
    type  
    umtype  
    default  
    reset  
    multiple  
    multiline  
    range  
    range[]  
    range[ NUMBER ]  
    range[ program ]  
    range[ value ]  
    range.program [. Program_GetBasicOption]
    range.value  
    program  
    program[ Field_Event   Event_Type ] [. Program_GetBasicOption]
    workflow  
    workflow[ Field_Event ] [. Workflow_GetBasicOption]
    unitmeasure [. UnitMeasure_GetBasicOption]
    unitmeasure[] [. UnitMeasure_GetBasicOption]
    unitmeasure[ AdminName ]  
    class [. Class_GetBasicOption]
    class[] [. Class_GetBasicOption]
    class[ AdminName ]  
    linktype [. LinkType_GetBasicOption]
    linktype[] [. LinkType_GetBasicOption]
    linktype[ AdminName ]  
    userunit  
    usermeasure  



KEYWORDs
application the associated application menu
class list of classes where the field is used
default the field default value (if changed, all field instances with old default value will assume the new default value)
description the field description
event event associated to a check or action trigger
force this flag allows to ignore errors during the creation/update (for example, the trigger programs not yet defined)
hidden administration hidden objects are not visible/usable
image local path for the field icon to upload
imagedata base64 code for the field icon
linktype list of linktypes where the field is used
moddate last modification date
multiline if set, the field value is showed as a textual box in the user interface instead of single line
multiple if set, the field value can assume one or more specific range values seperated by comma
name the field name
program trigger program associated to a specific event
range represents a specific value (=), an interval (open/closed/left-open/right-open) or a constraint (!=,<,>,<=,>=) for the field value. Constraints must be all satisfied.
range.program a program used to generate the specific range values
range[program] list of specific range values computed by the range.program
range.value returns "true" if the field has one or more range values (=) defined
range[value] list of range values (=) defined for this field
reset set if the field value must be resetted to the default when the object is revised, cloned or in both cases (oncreate)
svnrev SVN repository revision number
today if default is "today" for date / datetime type, the field will be initialized with current date / time when you create a new instance of object/link
type the field data type:
string A variable character array with maximum length equal to 255
text A Character Large Object (CLOB)
integer A signed integer value included between -231 and +231-1
real A signed double precision value
boolean The only permissible values for a boolean variable are "true" and "false" (or empty if not set)
date A date value in ISO format: "yyyy-MM-dd"
datetime A date-time value with format: "yyyy-MM-dd HH:mm"
or "yyyy-MM-dd HH:mm:ss" (time is related to default GMT TimeZone)
umtype the unit measure family type for values of real fields (length,area,volume,mass..)
the default unitmeasure is the SI unit for the family type (ex. area: square meter)
unitmeasure list of alternative unit measures associated to this field
usermeasure the unit measure for the user metric system
userunit the unit measure symbol for the user metric system
workflow workflow associated to a specific event (starts automatically)


SAMPLES

field define ATTR0 type string default "mydef" description "first attr" multiline range in ["maa";"opo"] = "dee"
= "gty" > "ata" multiple;

field define ATTR1 type date description "first date attr" range in ["2007-12-31";"2010-12-01") < "2020-01-01" default "2008-12-20" !hidden;

field define ATTR5 type datetime description "update timestamp" default today;

field define ATTR3 type real umtype area default "0.998" description "first real" range in [0;10] in [15.8;40] >100
program "PRG01" event edit action input "GET" 06 ;

field clone 'ATTR0' define "ATTR2" default "zty";

field clone ATTR3 define ATTR5 description "New Attr 5" default 1 ;

field edit ATTR2 !multiline default "zwq";

field edit ATTR3 program add 'Library' event edit check ;

field select ATTR* get { name multiline type range range[1]} token { "|" ";" };

field show ATTR2 token xml exportfile "c:/export/data.xml" append;

field show ATTR3 get { description program program[edit check] userunit } token { "|" ";" };

field show ATTR2 get { class.{name field} linktype.{name field} } token xml;

 

common syntax

Common_GetBasicOption
Common_GetBasicToken [ as IDENTIFIER ]

Common_GetBasicToken
id  
name  
origdate  
moddate  
moduser  
description  
svnrev  
hidden  
image  
imagedata  
feature[ AdminName ] [. Feature_GetBasicOption]
feature[] [. Feature_GetBasicOption]
feature [. Feature_GetBasicOption]
application [. Menu_GetBasicOption]
super  
admintype  

Edit_Operator
add
remove

Edit_RefOperator
addbefore AdminName set
addafter AdminName set
add
remove
movebefore
moveafter

Edit_AddOperator
addbefore AdminName define
addafter AdminName define
append

Edit_MoveOperator
movebefore
moveafter

Event_Type
action
check

AdminPatternList
AdminNamePattern {, AdminNamePattern}

AdminNamePattern
*
PATTERNIDENTIFIER
STRINGVAL
AdminName

GenericPatternList
GenericPattern {, GenericPattern}

GenericPattern
*
IDENTIFIER
PATTERNIDENTIFIER
GenericValue

AdminActor
user AdminName
team AdminName
assignment AdminName

AdminName
IDENTIFIER
QUOTED_STRING
SQUOTED_STRING

GenericValue
DATETIME
GenericNumber
GenericString
BOOLEANVAL

GenericString
STRINGVAL
QUOTED_STRING
SQUOTED_STRING

GenericNumber
NUMBER
REALNUMBER

Filter_Option
moddate Date_Range
application AdminNamePattern

Date_Range
=  DATETIME  
!= DATETIME
 
<  DATETIME
 
>  DATETIME
 
<= DATETIME
 
>= DATETIME
 
in [ DATETIME , DATETIME ]
 
in ( DATETIME , DATETIME ]
 
in [ DATETIME , DATETIME )
 
in ( DATETIME , DATETIME )  

Token_Option
token { Token_Separator { Token_Separator } }
token Token_Separator

Token_Separator
QUOTED_STRING
SQUOTED_STRING
IDENTIFIER
STRINGVAL
json
json-
json+
xml
xml-
xml+

ExportFile_Option
exportfile FileName [append] [xml | json ]

ImportFile_Option
importfile FileName [xml | json |emxxml]

LogFile_Option
logfile FileName [append]

FileName
QUOTED_STRING
SQUOTED_STRING

basic elements
grammar rules
[ ] = optional element - only one item is allowed : ( 0 or 1 )
{ } = optional element - more than one is allowed : ( 0 or N )
/ = alternative
= one of ...
   
  all bold texts represent keywords or command syntax

IDVAL
#<5 dec digits [ 0-9 ]>-<8 hex digits [ 0-9 A-F ]>
  example:
  #00020-34F2A80E

COMMENT
// <any character until the end of the line(\n \r)>
  example:
  // My single line comment

LONGCOMMENT
/* <any character> */
 

example:
  /* My multi line comment starts here
  continue here
  and finish here */


DATETIME
<year 4 digits>[ - /. ]<month 2 digits>[ - /. ]<day 2 digits>
  examples:
   2009-12-23    2009/03/19   2009.11.14
<year 4 digits>[ - /. ]<month 2 digits>[ - /. ]<day 2 digits> <hours>:<minutes>:[<seconds>]
  examples:
   2009-12-23 10:23   2009/03/19 16:03:34  2009.11.14 00:20:04

NUMBER
[+-]<decimal digits [ 0-9 ]>
  examples:
   -1203   +276   25

BOOLEANVAL
true / false

REALNUMBER
[+-]<decimal digits [ 0-9 ]>.<decimal digits [ 0-9 ]>[E(+-)<esponent [0-9]>]
  example:
   -37.837   +2.3874   13.887   1.4862E-04

QUOTED_STRING
"<any character>"
  example:
   "my quoted string"

SQUOTED_STRING
'<any character>'
  example:
   'my single quoted string'

IDENTIFIER
<one or more of [ a-z A-Z ]><zero or more of [ a-z A-Z 0-9 _ ]>
  example:
   Var1    object_Name_02

VARIABLE
$<one o more of [ a-z A-Z 0-9 ]><zero or more of [ a-z A-Z 0-9 _ ]>
 

example:
   $1   $var_02    $1b


STRINGVAL
<one or more of [ a-z A-Z 0-9 -_ $ ? @ | ~ % & / = : + \ # ' ]>
  a string not recognized as identifier

PATTERNIDENTIFIER
<a string with * (match 0 or more characters) and ? (match 1 character) wildcards>
  example:
   mypa*er?_ide?ti*

© 2008-2015 MS Enterprise Solutions | Website Templates by IceTemplates.com
Please Read: Privacy Policy and Terms of Use