Soop Script Command Library Version 4.1

Table of Contents

Aggregate
average data in collection ........................................................................ 2
concatenate ........................................................................ 2
count objects in collection ........................................................................ 2
maximum value of data in collection ........................................................................ 2
minimum value of data in collection ........................................................................ 3
sum data in collection ........................................................................ 3
Assignments
assign value ........................................................................ 3
evaluate expression ........................................................................ 4
random ........................................................................ 5

Collections
add ... to collection ........................................................................ 5
clone collection ........................................................................ 5
delete collection ........................................................................ 6
empty collection ........................................................................ 6
filter collection ........................................................................ 6
flush collection ........................................................................ 6
getfrom collection ........................................................................ 7
morph collection ........................................................................ 7
object in collection ........................................................................ 8
queue collection ........................................................................ 8
remove ... from collection ........................................................................ 8
removefrom collection ........................................................................ 9
set collection ........................................................................ 9
sort collection ........................................................................ 9
stack collection ........................................................................ 10
Comparison
equal to ........................................................................ 10
logical and ........................................................................ 10
logical or ........................................................................ 10
not equal to ........................................................................ 11

Date System Variables
#DATE# ........................................................................ 20
#DAY# ........................................................................ 20
#MONTH# ........................................................................ 20
#YEAR# ........................................................................ 21
Methods
define method ........................................................................ 11
method call ........................................................................ 12

Object Creation/Deletion
clone object ........................................................................ 12
create object ........................................................................ 13
delete object ........................................................................ 13
morph object ........................................................................ 13
set owner ........................................................................ 13
Program Flow
execute line ........................................................................ 14
exit ........................................................................ 14
if then else ........................................................................ 14
repeat n times ........................................................................ 14
return ........................................................................ 15
while do ........................................................................ 15

Queries/Reports/Documents
run document ........................................................................ 15
run query ........................................................................ 16
run report ........................................................................ 16
Scripts
include script ........................................................................ 16

System Variables
#CLASS# ........................................................................ 19
#OBID# ........................................................................ 19
#INDEX# ........................................................................ 19
#OWNER# ........................................................................ 19
#USER# ........................................................................ 20
? ........................................................................ 18
Time System Variables
#HOUR# ........................................................................ 21
#MINUTE# ........................................................................ 21
#SECOND# ........................................................................ 22
#TIME# ........................................................................ 21

User Interaction
confirm ........................................................................ 16
deny ........................................................................ 17
echo to screen ........................................................................ 17
get link ........................................................................ 17
input object ........................................................................ 17
input value ........................................................................ 18
log off ........................................................................ 18
sendmail ........................................................................ 18
Variables
%... ........................................................................ 22



average data in collection
Command CategoryAggregate
Command Nameaverage data in collection
Syntax(Collection Name) (Field Name) ave << (Data)
Exampleemployees{} age ave
UsageAverage the non-null values in the specified data field (age) of the objects in the specified collection (employees{}), and return the result. Can also average the results of calling a method on the collection objects (employees{} getAge ave).
Contents
concatenate
Command CategoryAggregate
Command Nameconcatenate
Syntax(Collection Name) (Field Name) concat (String) (String) << (String)
Exampleproducts{} name concat ":" "????"
UsageConstructs an infixed composite of data field values for all objects in a collection e.g. if you needed to email a group of EMPLOYEES, the To: address could be constructed with the following: employees{} emailAddress concat ";" >> jdoe@example.com;fbloggs@example.com The concat command will also work with method results for all objects in a collection
Contents
count objects in collection
Command CategoryAggregate
Command Namecount objects in collection
Syntax(Collection Name) count << (Data)
Exampleemployees{} count
UsageCount the number of objects in the specified collection, and return the result.
Contents
maximum value of data in collection
Command CategoryAggregate
Command Namemaximum value of data in collection
Syntax(Collection Name) (Field Name) max << (Data)
Exampleemployees{} age max
UsageFind the maximum of the values in the specified data field (age) of the objects in the specified collection (employees{}), and return the result. Can also find the maximum result of calling a method on the collection objects (employees{} getAge max).
Contents
minimum value of data in collection
Command CategoryAggregate
Command Nameminimum value of data in collection
Syntax(Collection Name) (Field Name) min << (Data)
Exampleemployees{} age min
UsageFind the minimum of the values in the specified data field (age) of the objects in the specified collection (employees{}), and return the result. Can also find the minimum result of calling a method on the collection objects (employees{} getAge min).
Contents
sum data in collection
Command CategoryAggregate
Command Namesum data in collection
Syntax(Collection Name) (Field Name) sum << (Data)
Exampleemployees{} age sum
UsageSum the values in the specified data field (age) of the objects in the specified collection (employees{}), and return the result. Can also sum the results from calling a method on the collection objects.
Contents
assign value
Command CategoryAssignments
Command Nameassign value
Syntax(String) = (Data) << (Collection Name)
ExampleaG1_theTgts = aG1theTgts{}
UsageSets the value of the specified object's (aG1) datafield (theTgts) to the value following the equals sign (aG1theTgts{}).
Contents
assign value
Command CategoryAssignments
Command Nameassign value
Syntax(Field Name) = (Data) << (Data)
ExampleaG1_age = 7
UsageSets the value of the specified object's (aG1) datafield (age) to the value following the equals sign (7). The assignment command will also work on collections, assigning the value to the datafield for all objects in the collection e.g. employees{} annualLeave = 0
Contents
evaluate expression
Command CategoryAssignments
Command Nameevaluate expression
Syntax(Integer) << (Data)
Example3 * 3, 3 + 3, 3 - 1, 4 / 2, 2 ^ 3, #DATE# + 2, #DATE# - 7, '01/12/10' - #DATE#, #TIME# + 3600, #TIME# - 600, '12:00:00' - #TIME#
UsageEvaluate an expression.
Contents
evaluate expression
Command CategoryAssignments
Command Nameevaluate expression
Syntax(Field Name) << (Data)
ExampleaG1_age
UsageReturn the value of the datafield (age) of the specified object (aG1).
Contents
random
Command CategoryAssignments
Command Namerandom
Short Formr
Syntaxrand (Integer) (Integer) << (Integer)
Exampler 1 100
UsageReturn random number between 1 and 100
Contents
random
Command CategoryAssignments
Command Namerandom
Short Formr
Syntaxrand << (Integer)
Examplerand
UsageReturn random number between 1 and 10 or between previous limits
Contents
random
Command CategoryAssignments
Command Namerandom
Short Formr
Syntaxrand (Integer) << (Integer)
Exampler 100
UsageReturn random number between 1 and 100
Contents
add ... to collection
Command CategoryCollections
Command Nameadd ... to collection
Syntaxadd (Collection Name) to (Collection Name) << (Collection Name)
Examplecreate 2 employees; add ? to (newEmployees)
UsageAdd the objects in the specified collection to the pre-existing collection referenced by the newEmployees relation if they do not already exist, returning the destination collection.
Contents
add ... to collection
Command CategoryCollections
Command Nameadd ... to collection
Syntaxadd (Object Name) to (Collection Name) << (Collection Name)
Examplecreate a customer; add ? to (theBuyers)
UsageAdd the specified object to the pre-existing collection referenced by the relation (theBuyers) if it does not already exist.
Contents
clone collection
Command CategoryCollections
Command Nameclone collection
Syntaxclone (Collection Name) (Class Name) (Collection Name) << (Collection Name)
Exampleclone orders{} INVOICE billsToSend{}
UsageClone all objects in a specified collection into another collection of objects of a different specified class. Matching data fields and relationships will be intelligently copied into the cloned objects, and the target collection will be returned.
Contents
delete collection
Command CategoryCollections
Command Namedelete collection
Short Formdel
Syntaxdelete (Collection Name) << (null)
Exampledelete aG1{}
UsageDelete the specified collection AND all the objects it contains.
Contents
empty collection
Command CategoryCollections
Command Nameempty collection
Syntaxempty (Collection Name) << (Collection Name)
Exampleempty aG1{}
UsageEmpty the specified collection of all of its objects without deleting them or the collection. Should not be used on contained relationships.
Contents
filter collection
Command CategoryCollections
Command Namefilter collection
Syntaxfilter (Collection Name) ([ code or expression ]) (Collection Name) << (Collection Name)
Examplefilter markets{} [growth > 10] emergents{}
UsageFilter the specified collection (markets{}) based on a WHERE condition [growth > 10] and place the objects meeting the condition into an existing collection (emergents{}).
Contents
flush collection
Command CategoryCollections
Command Nameflush collection
Syntaxflush (Collection Name) << (Collection Name)
Exampleflush aG1{}
UsageDelete all objects in the specified collection without deleting the collection.
Contents
getfrom collection
Command CategoryCollections
Command Namegetfrom collection
Syntaxgetfrom (Collection Name) << (Object Name)
Examplegetfrom (theTgts)
UsageReads and returns an object from a collection, without removing it. Stacks return the 'top' object, Queues return the 'first' object and Sets return a random object.
Contents
getfrom collection
Command CategoryCollections
Command Namegetfrom collection
Syntaxgetfrom (Collection Name) (Integer) << (Object Name)
Examplegetfrom (theTgts) 3
UsageReads and returns an object from a specified position (3) in an 'ordered' collection, without removing it from the collection. If the position specified is out of bounds, then the 'first' or 'last' object is returned. Sets always return random elements.
Contents
getfrom collection
Command CategoryCollections
Command Namegetfrom collection
Syntaxgetfrom (Collection Name) ([ code or expression ]) << (Object Name)
Examplegetfrom (theTgts) [t1 == 4]
UsageReads and returns the first object from a collection where the bracketed expression evaluates to true, without removing it from the collection.
Contents
morph collection
Command CategoryCollections
Command Namemorph collection
Syntaxmorph (Collection Name) (Class Name) (Collection Name) << (Collection Name)
Examplemorph players{} ENTRANT all_entrants{}
UsageMorph all objects in a specified collection into another collection of objects of a different specified class. Matching data fields and relationships will be intelligently copied into the morphed object, returning the target collection. Unlike cloning, with morphing the original collection and objects are deleted.
Contents
object in collection
Command CategoryCollections
Command Nameobject in collection
Syntax(Object Name) in (Collection Name) << (True/False)
Exampleif [#OBID# in employees{}] [echo "Found"]
UsageChecks for the existence of an object in a collection and returns true if it exists and false otherwise.
Contents
queue collection
Command CategoryCollections
Command Namequeue collection
Syntax(Collection Name) queue << (Collection Name)
Exampleemployees{} queue
UsageConvert the specified collection (employees{}) into a Queue collection and return it. Objects added to a queue are placed at the 'end' and objects removed from a queue are taken from the 'start'. All new internal Sooplet collections are created as Queues.
Contents
remove ... from collection
Command CategoryCollections
Command Nameremove ... from collection
Syntaxremove (Object Name) from (Collection Name) << (Object Name)
Exampleremove aG1 from (theTgts)
UsageRemove and return the specified object (aG1) from the specified relationship collection (theTgts).
Contents
removefrom collection
Command CategoryCollections
Command Nameremovefrom collection
Syntaxremovefrom (Collection Name) << (Object Name)
Exampleremovefrom (theTgts)
UsageRemoves and returns an object from a collection. Stacks return the 'top' object, Queues return the 'first' object and Sets return a random object. Empty collections return 'null'.
Contents
removefrom collection
Command CategoryCollections
Command Nameremovefrom collection
Syntaxremovefrom (Collection Name) (Integer) << (Object Name)
Exampleremovefrom (theTgts) 3
UsageRemoves and returns an object from a specified position (3) in an 'ordered' collection. If the position specified is out of bounds, then the 'first' or 'last' object is returned. Sets always remove random elements.
Contents
removefrom collection
Command CategoryCollections
Command Nameremovefrom collection
Syntaxremovefrom (Collection Name) ([ code or expression ]) << (Object Name)
Exampleremovefrom (theTgts) [t1 == 4]
UsageRemoves all objects from a collection where the bracketed expression evaluates to true. Returns the last object removed.
Contents
set collection
Command CategoryCollections
Command Nameset collection
Syntax(Collection Name) set << (Collection Name)
Examplecolours{} set
UsageConvert the specified collection (colours{}) into a Set collection and return it. Note that this will remove all duplicates from the collection, as sets cannot contain duplicates. All new internal Sooplet collections are created as Queues.
Contents
sort collection
Command CategoryCollections
Command Namesort collection
Syntaxsort (Collection Name) (Field Name) (asc | desc) << (null)
Examplesort employees{} age desc
UsageSort the specified collection (employees{}) based on the specified field (age) in the specified order (descending).
Contents
stack collection
Command CategoryCollections
Command Namestack collection
Syntax(Collection Name) stack << (Collection Name)
Examplecrisps{} stack
UsageConvert the specified collection (crisps{}) into a Stack collection and return it. Objects added to a stack are placed on the 'top', and objects removed from a stack are taken from the 'top'. All new internal Sooplet collections are created as Queues.
Contents
equal to
Command CategoryComparison
Command Nameequal to
Syntax(Anything) == (Anything) << (True/False)
ExampleaG1_age = 3; aG2_age = 3; aG1_age == aG2_age
UsageReturn 'true' if the item on the left of the == sign is the same as the item on the right, otherwise return 'false'. If the items are data fields, then their data values are compared, otherwise the items are compared.
Contents
logical and
Command CategoryComparison
Command Namelogical and
Short Form&&
Syntax(True/False) and (True/False) << (True/False)
ExampleaG1_retired and aG1_male
Usagereturn the logical and of the specified items. If either item is not true or false, returns null.
Contents
logical or
Command CategoryComparison
Command Namelogical or
Short Form||
Syntax(True/False) or (True/False) << (True/False)
ExampleaG1_retired or aG1_male
Usagereturn the logical or of the specified items. If either item is not true or false, returns null.
Contents
not equal to
Command CategoryComparison
Command Namenot equal to
Syntax(Anything) != (Anything) << (True/False)
ExampleaG1_age = 3;aG2_age = 6; aG1_age != aG2_age
UsageReturn 'true' if the item on the left of the != sign is not the same as the item on the right, otherwise return 'false'. If the items are data fields, then their data values are compared, otherwise the items are compared.
Contents
define method
Command CategoryMethods
Command Namedefine method
Syntax(Class Name) (Method Name) ([ code or expression ]) (onCreate, onDataEdit, onDataOk, form, table, hidden, private, pulse) << (Class Name)
ExampleORDER issueInvoice [invoice = true] table
UsageDefine the issueInvoice Table Button method in the ORDER class. Returns the class name. onCreate, onDataEdit and onDataOK methods must be named exactly as shown, in which case the Method Type can be omitted. Form Button (Type form), Table Button (Type table), Hidden (Type hidden), Private (Type private) and Pulse (Type pulse) methods can take any legal name.
Contents
method call
Command CategoryMethods
Command Namemethod call
Syntax(Method Call) (Anything) (Anything) << (Anything)
ExampleaG1_addToBasket
UsageCall the addToBasket method of the specified object (aG1). Returns the method's response.
Contents
method call
Command CategoryMethods
Command Namemethod call
Syntax(Collection Name) (Method Name) (Anything) (Anything) << (Anything)
Exampleemployees{} pay
UsageCall the pay method on all the objects in the specified collection (employees{}). Returns the method's response from calling the final object. If the collection contains objects that have no pay method they will be ignored.
Contents
method call
Command CategoryMethods
Command Namemethod call
Syntax(Object Name) (Method Name) (Anything) (Anything) << (Anything)
ExampleaG1 addToBasket
UsageCall the addToBasket method of the specified object (aG1). Returns the method's response. This is the alternative syntax to the aG1_addToBasket form.
Contents
clone object
Command CategoryObject Creation/Deletion
Command Nameclone object
Syntaxclone (Object Name) (Class Name) << (Object Name)
Exampleclone aG1 INVOICE
UsageClone an object into an object of a different class. Matching data fields and relationships will be intelligently copied into the cloned object, and the new object will be returned.
Contents
create object
Command CategoryObject Creation/Deletion
Command Namecreate object
Short Formc
Syntaxcreate (Integer) (Class Name) ([ code or expression ]) << (Collection Name)
Examplecreate 2 employees
UsageCreate multiple objects of the specified class, returning the collection created to hold the new objects. Classes can be specified as plural (dogs) or singular (dog). Optional parameters [param1,param2,...] can be passed to the object constructor.
Contents
create object
Command CategoryObject Creation/Deletion
Command Namecreate object
Short Formc
Syntaxcreate (Class Name) ([ code or expression ]) << (Object Name)
Examplecreate employee [param1,param2]
UsageCreate a single object of the specified class, returning the object name. Should the specified class not exist, it will be created. Optional parameters [param1,param2,...] can be passed to any object constructor.
Contents
create object
Command CategoryObject Creation/Deletion
Command Namecreate object
Short Formc
Syntaxcreate (Class Name) with ([ code or expression ]) ([ code or expression ]) << (Object Name)
Examplecreate sce with [1,test] [param1,param2]
UsageCreate an object of the specified class, populating data fields with supplied data, returning the object name. Should the specified class not exist, it will be created. Optional parameters [param1,param2,...] can be passed to the object constructor.
Contents
delete object
Command CategoryObject Creation/Deletion
Command Namedelete object
Short Formdel
Syntaxdelete (Object Name) << (null)
Exampledelete aG1
UsageDelete the specified object and remove it from all collections.
Contents
morph object
Command CategoryObject Creation/Deletion
Command Namemorph object
Syntaxmorph (Object Name) (Class Name) << (Object Name)
Examplemorph aG1 INVOICE
UsageMorph an object into an object of a different class. Matching data fields and relationships will be intelligently copied into the morphed object, and the new object will be returned. Unlike cloning, with morphing the original object is deleted.
Contents
set owner
Command CategoryObject Creation/Deletion
Command Nameset owner
Syntaxsetowner (Object Name) (Username) << (Username)
Examplesetowner aG1 fred.bloggs
UsageSet fred.bloggs as the owner of the aG1 object. For secure sooplets, if fred.bloggs doesn't exist as a user, then the object will be assigned to the administrator (if the value of the UnknownOwnerAction property is 'admin'), or fred.bloggs will be created otherwise. In an unsecure sooplet, objects without owners will be assigned to 'Everyone'.
Contents
execute line
Command CategoryProgram Flow
Command Nameexecute line
Short Formex
Syntaxexecute ([ code or expression ]) << (Anything)
Exampleexecute [create an employee]
UsageExecute the command line enclosed in square brackets. Returns the response of the command line.
Contents
exit
Command CategoryProgram Flow
Command Nameexit
Syntaxexit
Exampleif [aG1_age < 60] [exit]
UsageIf the specified condition [aG1_age < 60] evaluates to true, exit the method.
Contents
if then else
Command CategoryProgram Flow
Command Nameif then else
Syntaxif ([ code or expression ]) ([ code or expression ]) ([ code or expression ]) << (Anything)
Exampleif [aG1_age < 33] [echo under] [echo over]
UsageIf the specified condition [aG1_age < 33] evaluates to true, execute the first command fragment [echo under] else execute the optional second command fragment [echo over]
Contents
repeat n times
Command CategoryProgram Flow
Command Namerepeat n times
Syntaxrepeat (Integer) ([ code or expression ]) << (Anything)
Examplerepeat 3 [echo "found"]
UsageRepeat the command fragment ([echo "found"]) a fixed number of times (3).
Contents
return
Command CategoryProgram Flow
Command Namereturn
Syntaxreturn (Anything) << (Anything)
Examplereturn "true"
UsageReturns the specified item from a method as the response.
Contents
while do
Command CategoryProgram Flow
Command Namewhile do
Syntaxwhile ([ code or expression ]) ([ code or expression ])
Examplewhile [aG1_age < 60] [aG1_age = (aG1_age + 1)]
UsageWhile the specified condition [aG1_age < 10] evaluates to true, execute the specified command fragment [aG1_age = (aG1_age + 1)]
Contents
run document
Command CategoryQueries/Reports/Documents
Command Namerun document
Syntaxrundocument (Document Name) (Object Name) << (File Path)
Examplerundocument myDocument #OBID#
UsageCreates a document from the pre-saved document template (myDocument) merged with data from the specified object (#OBID#). The response is a file path that can be used as an argument to the sendmail command, to send an email attachment e.g. sendmail "me@example.com" "you@example.com" "Email Document from Sooplet" "Please find attached" (rundocument "Welcome Letter" #OBID#)
Note that this command only works with Public Documents.
Contents
run query
Command CategoryQueries/Reports/Documents
Command Namerun query
Syntaxrunquery (Query Name) ([ xml | html | csv | txt ]) << (String)
Examplerunquery myQuery xml
UsageExecutes a pre-saved query (myQuery), complete with row and column filtering, sorting and summary calculations. The query output can be formatted as xml, txt, csv or html. The response is a character string that can be displayed to the user e.g. echo (runquery "New Starters" html) or sent in the body of an email e.g. sendmail "me@example.com" "you@example.com" "Email Query from Sooplet" (runquery "New Starters" html)
Contents
run query
Command CategoryQueries/Reports/Documents
Command Namerun query
Syntaxrunquery (Query Name) (String)
Examplerunquery "New Starters" myHTMLSoopletQueryStyle.xsl
UsageExecutes a pre-saved query (New Starters), complete with row and column filtering, sorting and summary calculations. The query is formatted as xml and styled with the referenced stylesheet (myHTMLSoopletQueryStyle.xsl). The output is a character string that can be displayed to the user e.g. echo (runquery "New Starters" myHTMLSoopletQueryStyle.xsl) or sent as an email e.g. sendmail "me@example.com" "you@example.com" "Email Query from Sooplet" (runquery "New Starters" myHTMLSoopletQueryStyle.xsl). Custom stylesheets should be saved in the stylesheets folder under the default installation folder. The default templates HTMLSoopletQueryStyle.xsl, CSVSoopletQueryStyle.xsl and TxtSoopletQueryStyle.xsl can be copied and modified to provide the output you require.
Contents
run report
Command CategoryQueries/Reports/Documents
Command Namerun report
Syntaxrunreport (Report Name) ([ xml | html | csv | txt ]) << (String)
Examplerunreport [EMPLOYEE] html
UsageExecutes a report based on a Class [EMPLOYEE]. The report can be formatted as xml, txt, csv or html. The response is a character string that can be displayed to the user e.g. echo (runreport [EMPLOYEE] txt) or sent as an email e.g. sendmail "me@example.com" "you@example.com" "Email Report from Sooplet" (runreport [EMPLOYEE] html). The report can be a Relations report [EMPLOYEE.*] or a Routed report [EMPLOYEE], [POST reportsTo PRINCIPAL] e.g. runreport [EMPLOYEE thePost PRINCIPAL] html.
Contents
include script
Command CategoryScripts
Command Nameinclude script
Syntaxinclude (String) << (Anything)
Exampleinclude employee.ssp
UsageInclude the specified SOOPSCRIPT file which can contain library definitions. If a full path is specified the script will be loaded from there, otherwise the default script folder will be searched for the script.
Contents
confirm
Command CategoryUser Interaction
Command Nameconfirm
Syntaxconfirm (String) << (True/False)
Exampleconfirm "Are you 21 ?"
UsagePrompt for confirmation with a pop-up dialog using the literal string supplied. Return True or False.
Contents
deny
Command CategoryUser Interaction
Command Namedeny
Syntaxdeny (String) << (True/False)
Exampledeny "Are you 21 ?"
UsagePrompt for denial with a pop-up dialog using the literal string supplied. Return True or False. This command is the opposite of confirm.
Contents
echo to screen
Command CategoryUser Interaction
Command Nameecho to screen
Syntaxecho (Anything) (Anything) (Anything) (Anything) << (String)
Exampleecho hello
UsageEcho the specified string literal, or data field to a message box. Long text will be displayed in message pane, and html will be displayed in a browser window.
Contents
get link
Command CategoryUser Interaction
Command Nameget link
Syntaxgetlink (Object Name) (String) (Hostname:Port) << (String)
Examplegetlink #OBID# "Click here..." "host:port"
UsageThe getlink command assembles a link to the SoopletServer page for a named object. When executed within the sooplet server, the getlink command returns an html anchor tag that contains a valid URL pointing to the object on the SoopletServer. When executed in Instant Soop the link text will include a warning message 'Dummy Link For Testing Only". If the host: port details are ommitted, then the link will reference the soopletServer instance from which the link was generated.
Contents
input object
Command CategoryUser Interaction
Command Nameinput object
Syntaxinput (String) (Collection Name) << (Object Name)
Exampleinput "Select Object ?" tgts{}
UsagePrompt for an object in the named collection, from a dropdown list of badges. Return the object chosen.
Contents
input value
Command CategoryUser Interaction
Command Nameinput value
Syntaxinput (String) (String) << (String)
Exampleinput "What is your Age ?" 21
UsagePrompt for input with a pop-up dialog using the literal string supplied. Offer the default value supplied. Return the value entered.
Contents
log off
Command CategoryUser Interaction
Command Namelog off
Syntaxlogoff
Exampleif [job == done] [logoff]
UsageThe logoff command can be useful in workflow applications hosted on the SoopletServer. The getlink command can generate links to object editing forms. If the onDataOk method for the Class contains the logoff command then the user can just securely edit a single object and be logged out automatically.
Contents
sendmail
Command CategoryUser Interaction
Command Namesendmail
Syntaxsendmail FromAddress ToAddress Subject Message Attachment << (null)
Examplesendmail "me@example.com" "you@example.com" "Email from Sooplet" "Please check this!" "C:\report.rtf"
UsageSends an email from the 'From' address, to the 'To' address with a Subject, Message and optional Attachment. Note that sendmail requires the smtpHost to be configured in the instsoop.dat file (or spltsvr.dat).
Contents
?
Command CategorySystem Variables
Command Name?
Short Form?
Syntax? << (String)
Example3 + 2;echo ? << 5
UsageReturns the result from the previous SoopScript command
Contents
#OBID#
Command CategorySystem Variables
Command Name#OBID#
Short Form
Syntax#OBID# << (String)
Exampleecho #OBID# << aG1
UsageReturns the internal unique id of the object
Contents
#CLASS#
Command CategorySystem Variables
Command Name#CLASS#
Short Form
Syntax#CLASS# << (String)
Exampleecho #CLASS# << EMPLOYEE
UsageReturns the class of the object
Contents
#INDEX#
Command CategorySystem Variables
Command Name#INDEX#
Short Form
Syntax#INDEX# << (String)
Exampleecho #INDEX# << 1
UsageReturns the index number of the object
Contents
#OWNER#
Command CategorySystem Variables
Command Name#OWNER#
Short Form
Syntax#OWNER# << (String)
Exampleecho #OWNER# << theAdministrator
UsageReturns the username of the owner of the object
Contents
#USER#
Command CategorySystem Variables
Command Name#USER#
Short Form
Syntax#USER# << (String)
Exampleecho #USER# << theAdministrator
UsageReturns the username of the current user
Contents
#DATE#
Command CategoryDate System Variables
Command Name#DATE#
Short Form
Syntax#DATE# << (String)
Exampleecho #DATE# << 01/02/2009
UsageReturns the current date
Contents
#DAY#
Command CategoryDate System Variables
Command Name#DAY#
Short Form
Syntax#DAY# << (String)
Exampleecho #DAY# << 1
UsageReturns the current day of the month as a number (1 - 31)
Contents
#MONTH#
Command CategoryDate System Variables
Command Name#MONTH#
Short Form
Syntax#MONTH# << (String)
Exampleecho #MONTH# << 2
UsageReturns the current month of the year as a number (1 -12)
Contents
#YEAR#
Command CategoryDate System Variables
Command Name#YEAR#
Short Form
Syntax#YEAR# << (String)
Exampleecho #YEAR# << 2009
UsageReturns the current year
Contents
#TIME#
Command CategoryTime System Variables
Command Name#TIME#
Short Form
Syntax#TIME# << (String)
Exampleecho #TIME# << 12:34:42
UsageReturns the current time
Contents
#HOUR#
Command CategoryTime System Variables
Command Name#HOUR#
Short Form
Syntax#HOUR# << (String)
Exampleecho #HOUR# << 12
UsageReturns the current hour of the day
Contents
#MINUTE#
Command CategoryTime System Variables
Command Name#MINUTE#
Short Form
Syntax#MINUTE# << (String)
Exampleecho #MINUTE# << 34
UsageReturns the current minute of the hour of the day
Contents
#SECOND#
Command CategoryTime System Variables
Command Name#SECOND#
Short Form
Syntax#SECOND# << (String)
Exampleecho #SECOND# << 42
UsageReturns the current second of the minute of the hour of the day
Contents
%...
Command CategoryVariables
Command Name%...
Short Form
Syntax%length = (anything) << (String)
Example%length = 5;echo %length << 5
UsageAssigns the value 5 to the global variable %length. Valid names can be made up of letters, digits and underscores. Variable names must not be the same as reserved soop commands. Variables are case-sensitive.
Contents