Commands
abort stops the execution of the error-handling method and returns |
abortProcessByID ( uniqueID : integer ) stops a specific process on the Qodly Server |
abs ( number : number ) : number returns the absolute (unsigned, positive) value of number |
addToDate ( aDate : date , years : integer , months : integer , days : integer) : date adds years, months, and days to the date you pass in aDate, then returns the result |
arctan ( number : number ) : number returns the angle, expressed in radians, of the tangent number |
assert( boolExpression : boolean ) assert( boolExpression : boolean, msg : string ) evaluates the boolExpression assertion passed in parameter and, if it returns false , stops the code execution with an error message |
asserted( boolExpression : boolean ) : boolean asserted( boolExpression : boolean, msg : string ) : boolean returns the result of the evaluation of the boolExpression parameter. If boolExpression is false and if assertions are enabled, the error -10518 is generated |
base64Encode ( toEncode : blob, string , encoded : blob, string {, *} ) encodes the string or blob value passed in the toEncode parameter in Base64 or Base64URL format |
base64Decode ( toEncode : blob, string , encoded : blob, string {, *} ) decodes the string or blob value coded in Base64 or Base64URL format passed in the toDecode parameter |
blobToPicture ( pictureBlob : blob , aPicture : picture , codec : string ) inserts a picture stored in a blob into a Qodly picture variable, regardless of its original format |
bool ( expression : any ) : boolean returns the boolean form of the expression you passed in expression |
callChain : collection returns a collection of objects describing each step of the method call chain within the current process |
callWorker( process : string , formula : 4D.Function {, param {, ...paramN } : integer } ) callWorker ( process : string , formula : string {, param {, ...paramN } : integer } ) callWorker ( process : integer , formula : 4D.Function {, param {, ...paramN } : integer } ) callWorker ( process : integer , formula : string {, param {, ...paramN } : integer } ) creates or calls the worker process whose name or ID you passed in process and requests the execution of the code designated by formula in its context with the optional param parameter(s) |
changeString ( source : string , newChars : string , where : integer ) : string changes a group of characters in source and returns the resulting string |
char ( charCode : integer ) : string returns the UTF-16 character whose code is charCode |
characterCode ( character : string ) : integer returns the Unicode UTF-16 code (included between 1 and 65535) of character |
clearSemaphore( semaphore : string ) erases semaphore previously set by the semaphore command |
compareStrings ( aString : string , bString : string { , options : integer } ) : integer returns a negative, zero, or positive value depending on if aString is evaluated as lower, equal, or higher than bString. |
convertFromString ( aString : string , charSetString : string ) : blob convertFromString ( aString : string , charSetInt : integer ) : blob can be used to convert a string expressed in the current character set to a string expressed in another character set |
convertPicture ( aPicture : picture , codec : string ) convertPicture ( aPicture : picture , codec : string , compression : number ) converts aPicture into a new type |
convertToString ( aBlob : blob , charSetString : string ) : string convertToString ( aBlob : blob , charSetInt : integer ) : string converts the text contained in the aBlob parameter and returns it in text expressed in the character set of Qodly |
cos ( number : number ) : number returns the cosine of number, where number is expressed in radians |
createThumbnail ( source : picture , dest : picture , width : integer , height : integer , mode : integer , depth : integer ) returns a thumbnail from a given source picture |
currentDate : date returns the current date from the server |
currentMethodName : string returns the method name where it has been invoked |
currentProcess : integer returns the process ID of the process within which this command is called |
currentProcessName : string returns the name of the process within which this command is called |
currentTime : time returns the current time from the server (GMT) |
date ( exprString : string ) : date date ( exprDate : date ) : date evaluates exprString or exprDate and returns a date |
dayNumber ( aDate : date ) : integer returns a number representing the weekday on which aDate falls |
dayOf ( aDate : date ) : integer returns the day of the month of aDate |
dec ( number : number ) : number returns the decimal (fractional) portion of number |
delayProcess ( process : integer , duration : number ) delays the execution of process for a duration expressed in number of ticks (1 tick = 1/60th of a second) |
deleteString ( source : string , where : integer , numChars : integer ) : string deletes numChars from source, starting at where, and returns the resulting string |
ds : cs.DataStore returns a reference to the datastore matching the current Qodly database |
exp ( number : number ) : number raises the natural log base (e = 2.71828...) by the power of number |
false : boolean returns the boolean value false |
file ( path : string ) : 4D.File creates and returns a new object of the 4D.File type |
folder ( path : string ) : 4D.Folder creates and returns a new object of the 4D.Folder type |
formula ( formulaExp : expression ) : 4D.Function creates a 4D Function object based upon the formulaExp expression |
formulaFromString( formulaString : string ) : 4D.Function creates a 4D.Function object based upon formulaString |
generateUUID : string returns a new 32-character UUID identifier in non-canonical form |
generateDigest ( param : any , algorithm : integer {, *}) : string returns the digest key of a blob or string after application of an encryption algorithm |
generatePasswordHash ( password : string , options : object ) : string returns a secure password hash generated by a cryptographic hash algorithm |
getAssertEnabled : boolean returns true or false according to whether or not assertions are enabled in the current process |
getPictureFileName ( aPicture : picture) : string returns the current default name of the picture passed as parameter |
getPictureMetadata ( aPicture : picture , metaName : string , metaContents : variable ) can be used to read the contents of the metadata (or meta-tags) found in aPicture (picture variable) |
getProcessActivity: object returns a snapshot of running processes at a given time |
highestProcessNumber : integer returns the highest alive process number in the Qodly Server |
insertString ( source : string , what : string , where : integer ) : string inserts a string into source and returns the resulting string |
instanceOf ( object : object , class : object ) : boolean returns true if object belongs to class or to one of its child classes, and false otherwise |
int ( number : number ) : number returns the integer portion of number |
jsonResolvePointers ( aObject : object , options : object) : object resolves all the JSON pointers found in the aObject, with regards to options settings (if any) |
jsonStringify ( value : any {, *} ) : string converts the value parameter into a JSON string |
jsonValidate ( vJson : object , vSchema : object) : object checks the compliance of the vJson JSON contents with the rules defined in the vSchema JSON schema |
killWorker() killWorker( process : string ) killWorker( process : integer ) posts a message to the worker process whose name or number you passed in process, asking it to ignore any pending messages and to terminate its execution as soon as the current task ends |
lastErrors : collection returns the current stack of errors of the Qodly application as a collection of error objects, or null if no error occurred |
length ( aString : string ) : integer returns the number of characters that are in a aString. |
log ( number : number ) : number returns the natural (Napierian) log of number |
lowercase ( aString : string {, *} ) : string takes aString and returns the string with all alphabetic characters in lowercase |
mailConvertFromMIME( mimeblob : blob ) : object mailConvertFromMIME( mimestring : string ) : object converts a MIME document into a valid email object |
mailConvertToMIME( mail : object { , options : object } ) : string converts an email object into MIME string |
matchRegex ( pattern : string , aString : string ) : boolean matchRegex ( pattern : string , aString : string , start : integer {, *} ) : boolean matchRegex ( pattern : string , aString : string , start : integer , pos_found : integer , length_found : integer {, *} ) : boolean searches for the regular expression pattern in aString |
methodCalledOnError( { scope : integer } ) : string returns the name of the method installed by onErrCall for the current process or the defined scope |
milliseconds : integer returns the number of milliseconds (1000th of a second) elapsed since the server was started |
mod ( number1 : integer, number2 : integer) : number returns the remainder of the integer division of number1 by number2 |
monthOf ( aDate : date ) : integer returns the month number of aDate |
newCollection {( ...value : any )} : collection creates a new empty or prefilled collection |
newObject {( property : string , value : any {, ...property : string , ...value : any} ) } : object creates a new empty or prefilled object and returns its reference |
newSharedCollection {( ...value : any )} : collection creates a new empty or prefilled shared collection |
newSharedObject {( property : string , value : any {, ...property : string , ...value : any} ) } : object creates a new empty or prefilled shared object and returns its reference |
newSignal { ( description : string ) } : 4D.Signal creates a 4D.Signal object |
not ( aBoolean : boolean ) : boolean returns the negation of aBoolean, changing true to false or false to true |
num ( expression : string {, separator : string } ) : number num ( expression : number ) : number num ( expression : boolean ) : number returns the numeric form of the string, boolean or numeric expression you pass in expression |
objectClass ( object : object ) : object returns the class of the object passed in parameter |
objectCopy ( object : object ) : object objectCopy ( object : object , option : integer ) : object objectCopy ( object : object , option : integer , groupWith : object ) : object objectCopy ( object : object , option : integer , groupWith : collection ) : object returns an object containing a complete (deep) copy of the properties, sub-objects and values for the object |
objectEntries ( object : object ) : collection returns a collection of objects containing the contents of the object as key / value property pairs |
objectIsDefined ( object : object {, property : string } ) : boolean returns true if object or property is defined, and false otherwise |
objectIsEmpty ( object : object ) : boolean returns true if object is undefined or empty, and false if object is defined (initialized) and contains at least one property |
objectIsShared ( object : object ) : boolean objectIsShared ( collection : collection ) : boolean returns true if object or collection is shareable, and false if it is alterable |
objectKeys ( object : object ) : collection returns a collection of strings containing all of the enumerable property names of the object |
objectRemove ( object : object , property : string ) removes property from the object |
objectValues ( object : object ) : collection returns a collection of variants containing all of the enumerable property values of the object |
onErrCall( errorMethod : string ) onErrCall( errorMethod : string , scope : integer ) installs the project method, whose name you pass in errorMethod, as the method for catching (trapping) errors for the defined execution context in the current project |
pictureProperties ( aPicture : picture , width : number , height : number , hOffset : integer , vOffset : integer , mode : integer ) returns information about the picture you pass in aPicture |
pictureSize ( aPicture : picture) : integer returns the size of aPicture in bytes |
pictureToBlob ( aPicture : picture , pictureBlob : blob , codec : string ) converts a picture stored in a variable to another format and places the resulting picture in a blob |
position ( find : string , aString : string , start : integer {, *} ) : integer position ( find : string , aString : string , start : integer , lengthFound : integer {, *} ) : integer position ( find : string , aString : string , start : integer , lengthFound : integer , options : integer ) : integer returns the position of the first occurrence of find in aString |
processNumber ( name : string ) : integer processNumber ( id : string ) : integer returns the number of the process whose name or id you pass in the first parameter |
processInfo ( processNumber : integer ) : object returns an object providing detailed information about process whose number you pass in processNumber |
processState ( process : integer ) : integer returns the state of the process whose number you pass in process |
random: integer returns a random integer value between 0 and 32,767 (inclusive) |
replaceString ( source : string , oldString : string , newString : string , howMany : integer {, *}) : string replaces howMany occurrences of oldString in source with newString |
round ( round : number, places : integer) : number returns number rounded to the number of decimal places specified by places |
semaphore ( semaphore : string { , tickCount : integer } ) : boolean returns true and does nothing if semaphore already exists, or creates semaphore and returns false if it does not exist |
session : 4D.Session returns the Session object corresponding to the current scalable user web session |
setAssertEnabled(assertions : boolean { , /* } ) can be used to disable or re-enable any assertions inserted into the Qodly code of the application |
setPictureFileName ( aPicture : picture , fileName : string) sets or changes the default file name for the picture passed as parameter |
setPictureMetadata ( aPicture : picture , metaName : string , metaContents : variable ) lets you set or modify the contents of the metadata (or meta-tags) found in the picture (Qodly picture variable), when they are modifiable |
setRealComparisonLevel ( epsilon : number ) sets the epsilon value used by Qodly to compare real values and expressions for equality |
sin ( number : number ) : number returns the sine of number, where number is expressed in radians |
splitString ( stringToSplit : string , separator : string {, options : integer }) : collection returns a collection of strings, created by splitting stringToSplit into substrings at the boundaries specified by the separator parameter |
squareRoot ( number : number) : number returns the square root of number |
storage : object returns the catalog of shared objects or shared collections that you have registered in the storage object on the current application |
string ( expression : number { , format : string } ) : string string ( expression : any { , format : integer { , addTime : time }} ) : string returns the string form of the numeric, date, time, string or boolean expression you pass in expression |
substring ( source : string , firstChar : integer , numChars : integer ) : string returns the portion of source defined by firstChar and numChars |
tan ( number : number ) : number returns the tangent of number, where number is expressed in radians |
testSemaphore ( semaphore : string ) : boolean tests for the existence of semaphore |
throw( errorCode : integer {, description : string } ) throw( errorObj : object ) throw() creates an error that will be thrown immediately or when the calling code returns to its caller (deferred mode) |
time ( timeString : string ) : time time ( timeValue : integer ) : time returns a time expression equivalent to the time specified in the timeString or timeValue parameter |
timeString ( secondsTime : time ) : string timeString ( secondsValue : integer ) : string returns the string form of the time expression you pass in secondsTime or secondsValue |
timestamp : string returns the current UTC time in ISO format with milliseconds, i.e. yyyy-MM-ddTHH:mm:ss.SSSZ |
trace to debug your code during the development of an application |
true : boolean returns the boolean value true |
trunc ( number : number, places : integer) : number returns number with its decimal part truncated to the number of decimal places specified by places |
uppercase ( aString : string {, *} ) : string takes aString and returns the string with all alphabetic characters in uppercase. |
verifyPasswordHash ( password : string , hash : string ) : boolean verifies that the given hash matches the given password |
webEvent : object returns an object with information on a triggered event linked to a Page component |
webForm : 4D.WebForm returns a 4D.WebForm proxy object, providing a means to work with and effectively emulates the Page's properties and functions |
webServer : 4D.WebServer returns a Web server object |
webServerList : collection returns a collection of all Web server objects available in the Qodly application |
yearOf ( aDate : date ) : integer returns the year of aDate |
zipCreateArchive ( fileToZip : 4D.File , destinationFile : 4D.File ) : object zipCreateArchive ( folderToZip : 4D.Folder , destinationFile : 4D.File { , options : integer }) : object zipCreateArchive ( zipStructure : object , destinationFile : 4D.File ) : object creates a compressed ZIP archive object and returns the status of the operation |
zipReadArchive ( zipFile : 4D.File { , password : string }) : 4D.ZipArchive retrieves the contents of zipFile and returns it as a 4D.ZipArchive object |