Base
Last updated 23/03/2024
Five Object
TheProperties
field
The
five.field.<fieldID>
form
The
five.form.<actionID>.<fieldID>
headers
The headers
property is on the Five
object and contains the values provided as HTTP request headers via public URLs.
five.headers
parameters
The
five.parameters
stack
The
five.stack.<tableId>.<primaryKey>
variable
The
five.variable.<variableID>
Functions
actionID()
The actionID()
is a function on the Five
object that returns the current action ID.
actionID() : string;
addAttachment()
The addAttachment()
is a function on the Five
object and can be called during a mail merge action being executed.
addAttachment(attachment: string, name: string) : FiveError;
addFilter()
The addFilter() is a function that adds a key and its value to the Five stack.
addFilter(keyName: string, key: string) : void;
clearVariable()
The clearVariable() is a function that clears a previously set global variable.
clearVariable(name: string) : any;
clientAddress()
The clientAddress() is a function that returns the network address of the client.
clientAddress() : string;
commit()
The commit() is a function that commits a database transaction.
commit(tx: Transaction) : FiveError;
createError()
The createError()
is a function on the Five
object to return an error with an optional message and notification parameters.
createError(currentResult: FiveError | message: string, [message: string, [notification: string]]) : FiveError;
currentUserKey()
The currentUserKey()
is a function on the Five
object to return the current logged in user.
currentUserKey() : string;
currentUserRecordKey()
The currentUserRecordKey() is a function that returns the user record associated to the current user.
currentUserRecordKey() : string;
date()
The date()
is a function on the Five
object that returns the current local date as a string.
date(): string;
dateTime()
The dateTime()
is a function on the Five
object that returns the current local date and time as a string.
dateTime(): string;
dateTimeLocalToUTC()
The dateTimeLocalToUTC()
is a function on the Five
object that converts a local date and time to a UTC timestamp.
dateTimeLocalToUTC(localDateTime: string) : string;
dateTimeUTCToLocal()
The dateTimeUTCToLocal()
is a function on the Five
object that converts a UTC timestamp to a local date and time.
dateTimeUTCToLocal(timestamp: string) : string;
displayCustomForm()
The displayCustomForm()
is a function on the Five
object that displays a custom form.
displayCustomForm(actionID: string) : void;
emailAddress()
The emailAddress()
is a function on the Five
object that returns an email address object to pass into a mail merge action.
emailAddress(email: string, [name: string]) : EmailAddress;
executeAction()
The executeAction()
is a function on the Five
object that executes an action.
executeAction(actionID: string, [context: any, [at: Date]]) : FiveError;
executeAction(actionID: string, context: any, [onResult: (results: any) => void]) : FiveError;
executeFunction()
The executeFunction()
is a function used on the Five
object that executes a function on the server.
executeFunction(
name: string,
variables: Map<string, any>,
file: File,
actionKey: string, //Deprecated, not used
functionKey: string,
[ onResultsCallBack: (results: any) => void) : void ])
executePlugin()
The executePlugin()
is a function on the Five
object that executes a plugin by its Plugin ID on the Five Server.
executePlugin(pluginID: string, context: any) : PluginResult;
executeQuery()
The executeQuery()
is a function on the Five
object that executes SQL statements on the Five server and returns results.
executeQuery([transaction,] query[, limit[, ...parameters]]) : QueryResult;
getDatabaseConnectionByID()
The getDatabaseConnectionByID()
is a function on the Five
object that returns a database connection using its database ID.
getDatabaseConnectionByID(databaseID: string) : DatabaseConnection;
getFormField()
The getFormField() is a function that returns the field associated to the field ID on the form ID in the stack.
getFormField([FormID: string,] fieldID: string) : any;
getMetadata()
The getMetadata()
is a function on the Five
object that provides metadata from a field.
getMetadata([ formID: string ], fieldID: string, queryFieldID: string) : any;
getOption()
The getOption() is a function that returns a value of an option configured in the Options field against the instance of the running application.
getOption(key: string) : string;
getSelectedMenuID()
The getSelectedMenuID() is a function that returns the current selected menu ID.
getSelectedMenuID() : string;
getStackField()
The getStackField() is a function that returns the stack entry associated to the table ID and field ID.
getStackField(tableID: string, fieldID: string) : DrillDownItem;
getVariable()
The getVariable()
is a function on the Five
object that will return values set from the setVariable()
function.
getVariable(name: string) : any;
httpClient()
The httpClient()
is a function on the Five
that creates and returns a new HTTPClient
object.
httpClient() : HTTPClient;
isCloud()
The isCloud() is a function that returns whether the application is running in the cloud.
isCloud() : boolean;
isCreate()
The isCreate() is a function that returns true if the action is currently creating a record.
isCreate() : boolean;
isEdit()
The isEdit() is a function that returns true if the action is currently editing a record.
isEdit() : boolean;
isMobile()
The isMobile() is a function that returns true if the user interface is running in mobile mode.
isMobile() : boolean;
log()
The log()
is a function on the Five
object that writes a message to Five's Inspector.
log(log: any) : void;
maxField()
The maxField() is a function that returns the maximum value from the array of records associated to the field ID.
maxField(records:Array<BasicRecord>, fieldID: string) : number;
minField()
The minField() is a function that returns the minimum value from the array of records associated to the field ID.
minField(records:Array<BasicRecord>, fieldID: string) : number;
now()
The now()
is a function on the Five
object that returns the current date and time in UTC as a string.
now(): string;
open()
The open() is a function that opens the supplied uri.
open(uri: string) : void;
refreshTable()
The refreshTable()
is a function on the Five
object that refreshes any live queries associated to the table ID.
refreshTable(tableID: string) : void;
reload()
The reload()
is a function on the Five
object that reloads the data on the current form.
reload() : void;
rollback()
The rollback() is a function that rollbacks a database transaction.
rollback(tx: Transaction) : FiveError;
selectAction()
The selectAction()
is a function on the Five
object that selects an action to take the place of the current action without leaving the current menu.
selectAction(actionId: string [, recordKey: string]) : void;
selectFile()
The selectFile() is a function that opens a file opened dialog for a user to select a file.
selectFile(context: any, acceptedExtensions: Array<string>) : FiveError;
selectMenu()
The selectMenu() is a function that selects a menu and opens the record specified by the record keys.
selectMenu(menuID: string, ...recordKeys: Array<string>) : void;
sender()
The sender() is a function that returns the sender associated with the event callback.
sender() : any;
sendNotification()
The sendNotification()
is a function on the Five
object that sends a notification to the client, where it will display in the UI.
sendNotification(userKey: string, notification: string) : void;
setVariable()
The setVariable()
is a function on the Five
object that sets a global variable.
setVariable(name: string, value: any) : void;
showError()
The showError() is a function that shows an error dialog with the supplied message.
showError(message: string) : void;
showMessage()
The showMessage()
is a function on the Five
object that is used to display a message to the client that will be displayed in the UI.
showMessage(message: string) : void;
startTransaction()
The startTransaction()
is a function on the Five
object that starts a transaction with a database connection.
startTransaction(db: DatabaseConnection) : FiveError;
success()
The success()
is a function on the Five
object that returns a FiveError
object indicating success.
success([currentResult: FiveError | message: string, [message: string, [notification: string]]]) : FiveError;
sumField()
The sumField() is a function that returns the sum of all the values from the array of records associated to the field ID.
sumField(records:Array<BasicRecord>, fieldName: string) : number;
time()
The time()
is a function on the Five
object that returns the current local time as a string.
time(): string;
toDataURL()
The toDataURL()
is a function on the Five
object that encodes the contents supplied in the data parameter as a data URI.
toDataURL(mimeType: string, data: string): string;
uuid()
The uuid() is a function that returns a unique identifier.
uuid() : string;