or()
Usage
or(boolean1, boolean2,...)
Description
Returns the logical OR result of the given boolean values.
Example
${or(true, false)}
results in
true
You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.
Usage
or(boolean1, boolean2,...)
Description
Returns the logical OR result of the given boolean values.
Example
${or(true, false)}
results in
true
New in v.3.6: Allows to retrieve the last error message when sending a mail.
${mail_get_error()}
Returns the logical OR result of the given boolean values.
or(boolean1, boolean2, ...)
This method can be used to signal an error condition while scripting execution. It is mainly used in entity callback functions like onCreate()
or onSave()
to allow the user to implement custom validation logic.
If an error is raised the current transaction will be rolled back and no changes will be written to the database.
error(propertyKey, token, detail)
error(propertyKey, token)
Returns the given value, rounded down to the nearest integer. This method tries to convert its parameter objects into numerical values, i.e. you can use strings as arguments.
floor(val)
Allows checking if an error has been raised in the scripting context
has_error()
New in v.3.6: Allows to check for errors when sending a mail.
${mail_has_error()}
onCreate01
, onCreate02
)error()
functionExample:
onSave01
, onSave02
)error()
functionThe state of the object in the scripting environment represents the state of the object after the modification. To get information about the previous state the keyword modifications
can be used.
Keyword | Value |
---|---|
modifications | Object containing the modifications made to the object in the current operation |
Example:
this
keyword results in an error as the object has already been deletedSee <a data-id="651d6bf220e3422488fa61a34109745c" class="mention">error()</a> function