Skip to content

!!! warning "Legacy Documentation" This page contains documentation for the original RoboFlow application. Some features described here may not exist in the new Damtoolkit WAP interface.

Scripting

Introduction

Placeholders or inline-scripting are instructions that you can add to the Parameter setup
and to the Action scripts. They represent a certain function of which the result is
put in place of this inline-scripting.

Every inline-scripting starts and ends with either #, $. Inline-scripting starting and ending
with # are processed immediately.

When used in Parameters, it is evaluated at the start of the workflow. When used in Parameters and needs to be evaluated in the action-script, use $ instead of #

When used in the action-script directly, # should be used.

When used in an action-script it is evaluated for every workflow-item (record, file,...).

e.g. #DATE# in the Parameters returns the current date 2008-04-12 when starting the workflow

e.g. #DATE# in an action script returns the current date 2008-04-12 for every workflow-item

$DATE$ in the Parameters returns #DATE# when starting the workflow and is re-evaluted
in every action-script that uses that parameter of the workflow returning e.g. 2008-04-12

NOTE: For the workflows based on one of the 6 workflow-templates from RoboFlow 9 which offer action-scripts, most of these inline-scripting exists an Action script action. Easier to use and to maintain. So only use these inline-scripting if not available as action.

Syntax

TAG(atag[;default value])

e.g. #TAG(mytesttag)#

or advanced syntax available for all placeholders used for nesting placeholders

TAG(atag[;default value])TAG

e.g. #TAG(mytesttag)TAG#

[] refers to the parts of the instruction that is optional

{} refers to a list of choices

Multiple Placeholders or Scripting-Tags

When using multiple placeholders in one parameter, always use the advanced syntax. Which means that you repeat the instruction at the end.

Because it can be important in which order the instructions of the same level (#,$) are processed, you can determine the order as follows

e.g. #UPPER(#SUBSTRING(#RECORDFIELD(hot;Record Name)RECORDFIELD#;0;5)SUBSTRING#)UPPER#

this returns the uppercase of the first 5 characters of the field Record Name of the current record

But this instruction might fail because the process might evaluate the placeholders in a different order

e.g. @@#@@UPPER(@#@SUBSTRING(#RECORDFIELD(hot;Record Name)RECORDFIELD#;0;5)SUBSTRING@#@)UPPER@@#@@

this will work fine. By adding a number of '@' around the level (#,$).

In this example it will process first #RECORDFIELD then @#@SUBSTRING and finally @@#@@UPPER

General Functions

TAG(atag[;default value])

The workflows store their results internally with tags. This way these results can be accessed for reuse. Every type of workflow that handles files, records or categories will store these with the tag 'hot'. So in a hotfolder workflow the current file that is being processed is accessible via the 'hot' tag. #TAG(hot)# will get the name (or text-value) of that stored object.

e.g. #FILENAME(hot)# while return the name of that file... #TAG(hot)# will do that too...

e.g. #TAG(sometag)# will return the value of a stored object called sometag. If not existing will return error-text

e.g. #TAG(sometag;myvalue)# will return the value of a stored object called sometag, but if not existing will return the text “myvalue”

e.g. #TAG(sometag;:blank:myvalue)# will return the value of a stored object called sometag, but if not existing or empty string-value will return the text “myvalue”

The workflow-process has 2 places to store results internally with tags. Results from the Global Parameters or Parameters of a workflow or stored in the GLOBAL section while results create by the individual item (like the current record) and the results of an action from the action-script are stored in the LOCAL section.

By default the #TAG()# instruction looks first in the LOCAL section and if not found then looks in the GLOBAL section. But if the TAG is prefixed with #GLOBAL#, the TAG instruction will only look in the GLOBAL section. Actions in which you specify for the Output Variable (= tag) store by default their result in the LOCAL section, so these values are only available during it’s execution for that 1 item (e.g. record). If the Output Variable (= tag) is prefixed with #GLOBAL#, the result will be stored in the GLOBAL section, making it available through-out the whole process of the workflow. Can e.g. be usefull for a summary …

e.g. #TAG(#GLOBAL#sometag)# will return the value of a stored object in the GLOBAL section called sometag.

Stored objects like arrays,array,tables (could be result of split-text) can also be used

e.g. #TAG(somearraytag[1])# will return the value of the first element of the stored object (array) called somearraytag

CR#, #LF#, #CRLF#, #TAB#,#EMPTYSTRING

Returns carriage return, line feed, carriage return and line feed, tab-character, an empty string

PARAMFOLDER

Returns the parameter-folder of this workflow

e.g. /Applications/Cumulus Java Classes Runtime/RoboFlow/workflows/hotfolder

WATCHFOLDER

Returns the watch or hot-folder of this workflow

e.g. /Volumes/myImages

AUTOCATALOG-SERIAL

Returns serialnumber

e.g. acw20090405

AUTOCATALOG-SERIAL

Returns serialnumber

e.g. acw20090405

AUTOCATALOG-VERSION

Returns version

e.g. 8.0.1

AUTOCATALOG-CJCVERSION

Returns Cumulus Java Classes version

e.g. 8.0

AUTOCATALOG-SYSTEMPROPERTIES

Returns java system properties

AUTOCATALOG-FOLDER

Returns rootfolder

e.g. /Applications/Cumulus Java Classes Runtime/RoboFlow

AUTOCATALOG-FLOWFOLDER

Returns #PARAMFOLDER#

AUTOCATALOG-FLOWWATCHFOLDER

Returns #WATCHFOLDER#

AUTOCATALOG-FLOWNAME

Returns name of the workflow

AUTOCATALOG-FLOWTYPE

Returns type of workflow

e.g. hotfolder-import-xml

AUTOCATALOG-CUMULUSERROR

Returns the stored cumuluserror if any

STORETAG(tag;value)

Stores a text with a certain tag = variable and returns nothing

e.g. #STORETAG(mytag;my text to store)# it stores text under mytag

e.g. #STORETAG(mytagboolean;true)# it stores a boolean

e.g. #STORETAG(mytaginteger;123)# it stores an integer

e.g. #STORETAG(mytagstring;my text to store)# it store a string = text (default)

e.g. #STORETAG(mytagfile;/Volumes/mydata/myfile.jpg)# it stores a file

e.g. #STORETAG(mytagfolder;/Volumes/mydata/myfolder)# it stores a folder

e.g. #STORETAG(mytagarray;peter;pol;piet)# it stores (and adds) an array = String[] with 3 values

e.g. #STORETAG(mytagvector;peter;pol;piet)# it stores (and adds) a vector with 3 values

e.g. #STORETAG(mytag##mytablehashtable;a value)# it stores a value with tag mytag in a stored hashtable called mytable

e.g. #STORETAG(#GLOBAL#mytag;my text to store)# it stores text under mytag in the GLOBAL section

IF-TEST(tag;some-text#TAB#some-condition#TAB#some-text;true-text;false-text)

Stores the true-text under the tag if the condition was true else it stores the false-text

If the tag ends with integer the value will be stored as integer object

Date-Time Functions

DATE

Returns date formated yyyy-MM-dd

e.g. 2009-08-13

MONTH

Returns the current month in 2 digits

e.g. 08

TIME

Returns time formated HH.mm.ss

e.g. 13.45.33

DATETIME

Returns date formated yyyy-MM-ddHH.mm.ss

e.g. 2009-08-13 13.45.33

DATEFORMAT(date-format;value;type)

Returns the current date in certain format

e.g. #DATEFORMAT(yyyy)# returns 2009

DATEFORMAT(yyyy,-3;YEAR)# returns 2006

DATEFORMAT(yyyyMM;+1;MONTH)# returns 200909

DATEFORMAT-FILE(tag;format)

Returns the current date in certain format

e.g. #DATEFORMAT-FILE(hot;yyyy)# returns 2009 if the hotfile 's date is 2009...

Syntax format:

G Era designator TextAD

y Year Year 1996; 96

M Month in year Month July; Jul; 07

w Week in year Number 27

W Week in month Number 2

D Day in year Number 189

d Day in month Number 10

F Day of week in month Number 2

E Day in week Text Tuesday; Tue

a Am/pm marker Text PM

H Hour in day (0-23) Number 0

k Hour in day (1-24) Number 24

K Hour in am/pm (0-11) Number 0

h Hour in am/pm (1-12) Number 12

Text Functions

UPPER(a text)

Returns an uppercase of a text

e.g. #UPPER(My text)#returns 'MY TEXT'

LOWER(a text)

Returns an lowercase of a text

e.g. #UPPER(My text)#returns 'my text'

LENGTH(a text)

Returns the length of the text

e.g. #LENGTH(My Text)# returns '7'

LENGTH()# returns '0'

COUNT(tag[;sometext])

Returns the length an object or number occurences of a string

e.g. #COUNT(mytexttag)# returns '10' if the content of the mytexttag is ‘abcdefghil’

COUNT(mytexttag;e)# returns '2' if the content of the mytexttag is ‘peter’

COUNT(myarraytag;e)# returns '3' if the content is an array or table containing 3 elements

INDEXOF(a text;search[;default])

Returns the index of the search-text in the text (zero-based)

e.g. #INDEXOF(My-Text;-)# returns '2'

INDEXOF(My Text;-)# returns '-1'

INDEXOF(My Text;-;length)# returns '7'

INDEXOF(My Text;-;0)# returns '0'

INDEXOF(My_Longer_Text;_;length)# returns '2'

LASTINDEXOF(a text;search[;default])

Returns the LAST index of the search-text in the text (zero-based)

e.g. #LASTINDEXOF(My-Text;-)# returns '2'

LASTINDEXOF(My Text;-)# returns '-1'

LASTINDEXOF(My Text;-;length)# returns '7'

LASTINDEXOF(My Text;-;0)# returns '0'

LASTINDEXOF(My_Longer_Text;_;length)# returns '2'

LASTINDEXOF(My_Longer_Text;ex;length)# returns '11'

LEFT(a text;search[;default])

Returns the LEFT part of text upto the search-text

e.g. #LEFT(My-Text;-)# returns 'My'

LEFT(My Text;-)# returns ''

LEFT(My Text;-;My Text)# returns 'My Text'

LEFT(My_Longer_Text;_)# returns 'My'

LEFT(My_Longer_Text;ex)# returns 'My_Longer_T'

LASTLEFT(a text;search[;default])

Returns the LEFT part of text upto the last occurrence of search-text

e.g. #LASTLEFT(My-Text;-)# returns 'My'

LASTLEFT(My Text;-)# returns ''

LASTLEFT(My Text;-;My Text)# returns 'My Text'

LASTLEFT(My_Longer_Text;_)# returns 'My_Longer'

LASTLEFT(My_Longer_Text;ex)# returns 'My_Longer_T'

RIGHT(a text;search[;default])

Returns the RIGHT part of text after the search-text

e.g. #RIGHT(My-Text;-)# returns 'Text'

RIGHT(My Text;-)# returns ''

RIGHT(My Text;-;My Text)# returns 'My Text'

RIGHT(My_Longer_Text;_)# returns 'Longer_Text'

RIGHT(My_Longer_Text;ex)# returns 't'

LASTRIGHT(a text;search[;default])

Returns the RIGHT part of text after the last occurrence of search-text

e.g. #LASTRIGHT(My-Text;-)# returns 'Text'

LASTRIGHT(My Text;-)# returns ''

LASTRIGHT(My Text;-;My Text)# returns 'My Text'

LASTRIGHT(My_Longer_Text;_)# returns 'Text'

LASTRIGHT(My_Longer_Text;ex)# returns 't'

REPEAT(seperator;newseperator;prefix;suffix;stringtosplit)

REPEAT(seperator;null;null;null;stringtosplit)

Repeat

e.g. #REPEAT(,;#CR#;-value-;-/value-;bike,car)# returns '-value-bike-/value-#CR#-value-car-/value-'

REPEAT(,;semi;-value-;-/value-;bike,car)# returns '-value-bike-/value-;value>car'

REPEAT(semi;semi;;;bike;car)# returns 'bike;car'

REPEAT(semi;semi;value=;null;bike;car)# returns 'value=bike;value=car'

REPEAT(semi;,;null;null;bike;car)# returns 'bike,car'

Repeat clean name (cfr ASCIINAME)

e.g. #REPEAT(+semi;,;null;null;drive/bike;drive:car)# returns 'drive_bike,drive_car'

SPLIT(tag_to_store_result_stringlist;seperator;stringtosplit)

Split a text and store the result as a stringlist, accessable via #tag(sometag[1..n])#

e.g.

SPLIT(test;-;2012-01-25)# will store a stringlist

and can be accessed with#tag(test[1])# = 2012#tag(test[2])# = 01 #tag(test[3])# = 25

INSERT(seperator;newseperator;template;stringtosplit)

Insert (and repeat optionally - same syntax)

e.g.#INSERT(semi;null;;label1##value1;label2##value2)#

INSERT(semi;null;;value1;value2)

SUBSTRING(a text;from[;upto])

Returns a part of the text

e.g. #SUBSTRING(My Text;1)# returns 'y text'

SUBSTRING(My Text;0;5)# returns 'My te'

SUBSTRING(My Text;0;5)# returns 'My te'

SUBSTRING(My Text;-3)# returns 'ext'

SUBSTRING(My Text;-4;6)# returns ' tex'

REPLACE(tag;a text 1,a text 2;replace text1,replace text2)

Returns a stored text (tag) with some characters replaced

e.g if the hot-tag has a file stored called 'myfeetcc.jpg'

REPLACE(hot;ee,bb,cc;0,1,2)# returns 'myf0t2.jpg'

addition placeholders for this instruction: #COMMA,#SEMI-COLON#,#QUOTE#,#SINGLEQUOTE,#DOUBLEQUOTE#

e.g if the hot-tag has a file stored called 'my,feetcc.jpg'

REPLACE(hot;ee,#COMMA#,cc;0,_,2)# returns 'my_f0t2.jpg'

UNESCAPE(a text)

Returns an javascript unescaped text

e.g. #UNESCAPE(my%20text)# returns 'my text'

ASCIINAME(a text;default[;minimum-char;maximum-char])

Returns an ascii-file-name of a text (only a..z 0..9 . - _)

e.g. #ASCIINAME(un % en français;_)# returns 'un _ en fran_ais'

TRIM([;text])

Trims leading and trailing spaces, cr and tabs if no "text" is defined

e.g. #TRIM(this is a text)# returns 'this is a text'

Trims leading and trailing "text" if"text" is defined

e.g. #TRIM(this is a text,;,)# returns 'this is a text'

ENCODECHAR(CHARSET;stringtoconvert)

and #DECODECHAR(CHARSET;stringtoconvert)#

java works internally in Unicode (UTF-16), but it reads and writes (except for XML)

from the outside according to its "file.encoding" standard

which is MacRoman for mac and Latin-1 for windows, but you convert this is this different from the standard

e.g. WRITE to UTF-8: #ENCODECHAR(UTF-8;mystringtoconvert)#

READ from UTF-8 #DECODECHAR(UTF-8;mystringtoconvert)#"

Calculation Functions

MULTIPLY(value;value;...)

Returns the multiplication of the values

e.g. #MULTIPLY(2,0;3,0)# returns 6,0

MULTIPLY(2,0;3,0;0,5)# returns 3,0

DIVIDE(value;divide-by)

Returns the division of the values

e.g. #DIVIDE(6,0;3,0)# returns 2,0

DIVIDE(3,0;0,5)# returns 6,0

ROUND(value;number-of-decimals)

Returns the round of the value

e.g. #ROUND(6,5;0)# returns 7

ROUND(6,49;1)# returns 6,5

SUM(value;value;...)

Returns the sum of the values

e.g. #SUM(6,5;2)# returns 8,5

SUBSTRACT(value;by)

Returns the subtraction of the values

e.g. #SUBSTRACT(6,5;0,4)# returns 6,1

Read-Write Files Functions

LOOKUP(Filename of FilePath;search-value;result-column;search-column;default-value)

Returns a value from a tab-delimited-txt-file (or a default value if not found)

e.g. assuming that there is a param.txt in the paramfolder that looks as follows:

.jpg/Volumes/Images

.indd/Volumes/Layouts

.pdf /Volumes/Docs

LOOKUP(#PARAMFOLDER#/param.txt;#FILE-EXTENSION(hot)FILE-EXTENSION#;2;1;/Volumes/Other)LOOKUP# returns '/Volumes/Images' if the hot-files is 'myImage.jpg'

GETCOUNTER(Filename or FilePath;Length[;Prefix;Suffix])

Returns a value from a parameter-file

e.g. assuming that there is a param.txt in the paramfolder:

GETCOUNTER(#PARAMFOLDER#/param.txt;5)# returns 00001 if the parameterfile does not exist

GETCOUNTER(#PARAMFOLDER#/param.txt;5)# returns 00033 if the parameterfile contains 33

GETCOUNTER(#PARAMFOLDER#/param.txt;5;pre;suf)# returns pre00033suf if the parameterfile contains 33

ADDCOUNTER(Filename or FilePath;Length;Prefix;Suffix)

Returns a value from a parameter-file and add 1

e.g. assuming that there is a param.txt in the paramfolder:

ADDCOUNTER(#PARAMFOLDER#/param.txt;5)# returns 00001 if the parameterfile does not exist

ADDCOUNTER(#PARAMFOLDER#/param.txt;5)# returns 00034 if the parameterfile contains 33

ADDCOUNTER(#PARAMFOLDER#/param.txt;5;pre;suf)# returns pre00034suf if the parameterfile contains 33

SETCOUNTER(Filename or FilePath;Value)

Save a value in a parameter-file

e.g. assuming that there is a param.txt in the paramfolder (if not it creates the parameter):

SETCOUNTER(#PARAMFOLDER#/param.txt;5)# saves 5 in the parameterfile

SETFILEPARAM(Filename or FilePath;text)

Save a text in a parameter-file

e.g. assuming that there is a param.txt in the paramfolder (if not it creates the parameter):

SETFILEPARAM(#PARAMFOLDER#/param.txt;abc)# saves 'abc' in the parameterfile

GETFILEPARAM(Filename or FilePath;default)

Returns a text from first line of a parameter-file or the default-text if the file does not exist

e.g. assuming that there is a param.txt in the paramfolder:

GETFILEPARAM(#PARAMFOLDER#/param.txt;def)# returns 'def' if the parameterfile does not exist

GETFILEPARAM(#PARAMFOLDER#/param.txt;def)# returns 'abc' if the parameterfile does exist and contains 'abc'

UPDATEFILEPARAM(Filename or FilePath;param;default)

Returns a text from a parameter-file or the default-text if the file does not exist and stores a new text

e.g. assuming that there is a param.txt in the paramfolder:

UPDATEFILEPARAM(#PARAMFOLDER#/param.txt;new;def)# returns 'def' if the parameterfile does not exist and stores 'new'

UPDATEFILEPARAM(#PARAMFOLDER#/param.txt;def)# returns 'abc' if the parameterfile does exist and contains 'abc' and stores 'new'

GETFILEPARAM(Filename or FilePath;default)

Returns a text from a parameter-file or the default-text if the file does not exist (multiple lines)

e.g. assuming that there is a param.txt in the paramfolder:

GETFILEPARAM(#PARAMFOLDER#/param.txt;def)# returns 'def' if the parameterfile does not exist

SQL Functions

SQLLOOKUP(tag;connectstring;driver;query{;field})

Stores the result of an sql query with the tag, all rows in vector and result of last row in hashtable

e.g. #SQLLOOKUP(myResult;jdbc:MySQL://localhost/test?user=aUser&password=aPassword;org.gjt.mm.mysql.Driver;select name,price from mytable where (id='#TAG(sometag)TAG#))SQLLOOKUP)# stores array of name and price

SQLLOOKUP(myResult;jdbc:MySQL://localhost/test?user=aUser&password=aPassword;org.gjt.mm.mysql.Driver;select name,price from mytable where (id='#TAG(sometag)TAG#);price)SQLLOOKUP)# stores price

HASHTABLEFIELD(atag;afield)

Stores the result of lookup in a stored hashtable

SQLFIELD(atag;afield)

Stores the result of lookup in a stored hashtable of an sql query (in sql-workflows)

SQLROWASTAG(vectortag;tagfieldname;valuefieldname)

Processes the result of an SQLLookup(vector) and stores the value of a field under the value of the tagfield

Cumulus Record Functions

RECORDFIELD(atag;afield[;default])

Returns the text of record field

e.g.#RECORDFIELD(hot;Status)# returns 'new' if the status 'new' for the current record

special fields:

asset reference{folder}{win,max,unix}{:fromfolder}

e.g.asset reference /Volumes/myFolder/mySubFolder/myFile.jpg

asset reference:1 /myFolder/mySubFolder/myFile.jpg

asset referencefoldermac:2 /mySubFolder

recordid, recid, id

colid, collectionid, catalogid, catid

colname, collectionname, catalogname, catname

categories

e.g. water,bike,sun

categoryids

categoryparentids

categorypaths

e.g. /#Categories/bike,/#Keywords/mountain

category, #category, #keyword, #sourcereturns first category name of that type

category2, #category2, #keyword2, #source2returns first categoryname and its parents name of that type

category(from{,to}), #category(from{,to}), #keyword(from{,to}), #source({,to})

e.g. #category(4) #category(0,3) #category(1,-1)

categories, #keywords, #sources {:llevel} start-withreturns catergory-name at a certain level (comma-separated)

/#Categories, /#Keywords, /#Sources {:llevel} idem

e.g. /#categories/productionreturns Prod123,link,Prod345,link

/#Categories:path, /#Keywords:path, /#Sources:path {:llevel} idem but path

e.g. /#Categories/production:pathreturns /#categories/production/Prod123,/#categories/production/Prod123/link,/#categories/production/Prod345,/#categories/production/Prod345/link

/#Categories:subpath, /#Keywords:subpath, /#Sources:subpath {:llevel} idem but subpath

e.g. /#Categories/production:subpathreturns /Prod123,/Prod123/link,/Prod345,/Prod345/link

MASTERRECORDFIELD(atag;afield)

Looks for the first master-record of this record and processes #RECORDFIELD(master;afield)# with the master-record

SLAVERECORDFIELD(atag;afield)

Looks for the first slave-record of this record and processes #RECORDFIELD(slave;afield)# with the slave-record

Cumulus Category Functions

CATEGORYFIELD(atag;afield{;level})

CATEGORYFIELD(atag;afield;0)

CATEGORYFIELD(atag;afield;-2)#2 parents higher

CATEGORYFIELD(atag;afield;2)#2 children deeper

Returns field value of a category

special fields:

catid, categoryid

colid, collectionid, catalogid

colname, collectionname, catalogname

categoryfolderpathuses the watch-folder

categoryparentid,

categorypath{+x}{-y}{!z}

Record Modification Date(dateformat) e.g. Record Modification Date(YYYY)1998

Miscellaneous Functions

SENDMAIL(smtp-mail-server;username;password;mailfrom;mailto1,mailto2,...;title;message)

Send e-mail

FTPUPLOAD(atag;connectstring;username;password;sourcefilepath;targetftppathtofile;protocol[delete])

Upload file via FTP

protocol:0:ftp,1:sftp,2:ftp-ssl,3:ftp-tls,-1:ftp-passive delete: delete file after upload

FTPDOWNLOAD(atag;connectstring;username;password;pathtofile;targetfilepath;[ignore]protocol[delete])

Download file via FTP

protocol:0:ftp,1:sftp,2:ftp-ssl,3:ftp-tls,-1:ftp-passive ignore : ignore case delete: delete ftp-file after download

FTPDELETE(atag;connectstring;username;password;pathtofile;targetfilepath;[ignore]protocol)

Delete file on FTP

protocol:0:ftp,1:sftp,2:ftp-ssl,3:ftp-tls,-1:ftp-passive ignore : ignore case

SETWATCHFOLDER(PathOfWatchFolder)

Sets the current watchfolder for this workflow while it is running

SETWAITRECORDSTABLE(milliseconds-to-wait)

Sets the current wait-record-stable parameter for this workflow while it is running

SETWAITFILESTABLE(milliseconds-to-wait)

Sets the current wait-file-stable parameter for this workflow while it is running

SCRIPT(AutoStore.xml)

Run a script file

WORKFLOW(hotfolder;aresulttag)

Start another workflow that is a sleep

RUNTIMECOMMAND(atag;acommand;;aparameter;;aparameter;;...)

Launch a commandline instruction and store its text-result under the tag as a string

CAUTION! you need to use #TAB# to seperate the parameters in the command

e.g. #RUNTIMECOMMAND(result;ls#TAB#-al)#

RUNTIMECOMMAND(result;/usr/local/Cumulus_8_WPP/apache-tomcat/bin/startup.sh)

RUNTIMECOMMAND(result;C:\scripts\call_ffmpeg#TAB##TAG(sourcefiletag)TAG##TAB##TAG(targetfiletag)TAG#) RUNTIMECOMMAND

PARSE(something)

force a part of text being parsed now.(evaluation of the inline-scripts)

LOG(texttolog)LOG

This logs the text and returns the same text

LOADXMLASTAG(filepath)

This loads an xml file as tag (usable in placeholders)

CREATEPDF(fileresulttag;printsetname;filepath{;catalogtag;recordids})

Creates a pdf using the a predefined Cumulus Print Template (must be visible for the RoboFlow Cumulus User)

result is a file (filepath) stored under the fileresulttag-name that you specify.

if you omitted the reccordids, it uses the current hot-record, if you omit the catalogtag, it takes the hot-(current)catalog.

e.g. #CREATEPDF(mypdf;Default;/Volumes/disk/myfolder/myreport.pdf)#

e.g. #CREATEPDF(mypdf;Default;/Volumes/disk/myfolder/myreport.pdf;hot;10,12,15)# report of records with id 10,12 and 15

Record-query-syntax

2 possibilities:

1) Create a Query in Cumulus Client via Find - Advanced and Copy & Paste it here

e.g. ("Status" !*) || ("Status" != "offline")

2) Use the old-query-syntax of Cumulus explained here below:

fieldname#TAB#condition

e.g. Notes#TAB#has no value

fieldname#TAB#condition#TAB#value

e.g. Status#TAB#contains#TAB#to correct

fieldname#TAB#condition#TAB#value#LF#and/or#TAB#fieldname#TAB#condition#TAB#value

e.g. Status#TAB#is#TAB#to correct#LF#or#TAB#Status#TAB#is not#TAB#approved

conditions

has value; has no value; is; is not; contains; does not contain;starts with;

date: prior to; up to; from; after

number: under; up to; from; over

or; and

Sort-Record-query-syntax

Append order by

Sort on Record Name ascending

e.g. ("Status" !*) || ("Status" != "offline") order by Record Name

Status#TAB#contains#TAB#to correctorder by Record Name

("Status" !*) || ("Status" != "offline") order by +Record Name

Status#TAB#contains#TAB#to correctorder by +Record Name

Sort on Record Name descending

e.g. ("Status" !*) || ("Status" != "offline") order by -Record Name

Status#TAB#contains#TAB#to correctorder by -Record Name

Category-query-syntax

2 possibilities:

1) Create a Query in Cumulus Client via Category Find - Advanced and Copy & Paste it here

e.g. ("Status" !*) || ("Status" != "offline")

2) Use the old-query-syntax of Cumulus explained here below:

fieldname#TAB#condition

e.g. Notes#TAB#has no value

fieldname#TAB#condition#TAB#value

e.g. Status#TAB#contains#TAB#to correct

fieldname#TAB#condition#TAB#value#LF#and#TAB#fieldname#TAB#condition#TAB#value

e.g. Status#TAB#is#TAB#to correct#LF#and#TAB#Status#TAB#is not#TAB#approved

conditions

has value; has no value; is; is not; contains; does not contain;starts with;ends with;does not end with

<;>;<=;>=

and

Special Category-fields

name: Category Name

path or categorypath: Complete Path of the category without the rootcategory

e.g.for Category MySubProducts /MyCompany/MyProducts/MySubProducts

path or #categorypath: Complete Path of the category WITH the rootcategory

e.g.for Category MySubProducts /#Categories/MyCompany/MyProducts/MySubProducts

root or rootcategory: root-category

e.g. #Category

level: level of the category

e.g. for Category MySubProducts3

id: internal category-ID

countchilderen: number of sub-categories at the next level

countrecords: number of records attached to this category

countrecordsbelow: number of records attached to this category and its categories below

Special Category-values

To compare in the category-search-query the value of 2 fields, surround the fieldname in the value-part with #

e.g. Status#TAB#is#TAB##Old-Status#

In this query the value of category-field Status is compared with the value of the value of category-field Old-Status

This syntax is only possible for the Category-Query in Autocatalog-WatchCategories

Advanced placeholder syntax

when nesting placeholders in one parameter it is best to start and end the placeholder with the instruction

e.g. #FILENAME-EXT(#RECORDFIELD(hot;Record Name)RECORDFIELD#)FILENAME-EXT#.jpg

but the example above will still won't work correctly because some instructions are executed before others like in this case FILENAME-EXT is execute before RECORDFIELD

e.g. @#@FILENAME-EXT(#RECORDFIELD(hot;Record Name)RECORDFIELD#)FILENAME-EXT@#@.jpg

now, the RECORDFIELD will get first the name of the record and then the FILENAME-EXT will remove the extension of the file