General Functions

SelectedColumnList AddLayout(SelectedColumnList layout, String field, String title, String group)

Adds a layout entry based on field, title and group to the layout list object passed in. If you pass in Nothing() for layout, it will create a new layout.

NoReturn InsertAt(List seq, Record node, Number index)
Inserts the given record (node) into the list (seq) at the specified index.

NoReturn Notify(Path path, Record data, String notifyName, String desc, Any overrideUsers)
Invokes any subscribed notifications at the given path, with the given changed data (data), for the specified notification name (notifyName), specifying the description (desc) and optionaly overriding the users that the notification wil be sent to (overrideUsers, a list of User records).

NoReturn SetGlobalVar(String name, Any var)
Sets a global variable which will be accessible from any session or thread for the duration of the server uptime.

Any GetGlobalVar(String name)
Retrieves a global variable set with SetGlobalVar.

Number GetNewPosition()
Returns a number suitable for storing in a position for a record. Increases based on time.

List FilterByDateRange(RecordOrList olist, String dateField, DateTime start, DateTime end, Boolean changeDates)
Filters the given list by the given dates, returning a new list of entries in those dates only.

Any Run(String id, Record input)
Runs the given plugin name (id) with input as the parameter for the plugin.

Any RunPlugin(String id, Path path, Record input)
Runs the given plugin name (id) passing in path for &path, with input as the parameter for the plugin.

List GetNextRows(Record node, Number count)
Gets the next rows (count) after the given record.

Number geo:GetLong(Record node)
Retrieves the longitude value from the given record (node) that has mapping enabled.

Number geo:GetLat(Record node)
Retrieves the latitude value from the given record (node) that has mapping enabled.

List geo:GetMapPoints(Path path, Number lon1, Number lat1, Number lon2, Number lat2, Number cellsLong, Number cellsLat, String groupField)
Retrieves map points for map data at the given path, in the given bounding area (lon1/lat1, lon2/lat2), split into cellsLong and cellsLat grid, grouped by the specified field. May use r-tree optimization if the database engine supports this.

Number geo:GetDistance(Any recPath1, Any recPath2)
Returns the distance between two records that contain mapping information. Crows-fly path.

NoReturn UnSet(Record node, String field)
Removes (unsets) the field in the given record (node).

String str:Join(ICollection list, String delim, String lastDelim)
Joins together all text items in the list (list), putting delim between them, and lastDelim at the end.

NoReturn CopyFields(RecordOrList source, Record target)
Copies all fields from source to target.

NoReturn CopyChangedFields(Record source, Record target)
Copies all changed fields from source to target.

Path AddPredicate(Path path, String predicate)
Adds a predicate (predicate) to the end of the path.

List NewList()
Returns a new empty list.

Record NewRecord()
Returns a new empty, untyped record.

Record NewSubRecord(Record record, String field)
Returns a new record typed to be inserted into field within the given record.

List NewSubList(Record record, String field)
Returns a new list typed to be inserted into field within the given record.

Any GetVarByName(String name)
Retrieves a variable by name. If the variable is not found, returns null.

NoReturn SetVarByName(String name, Any val)
Sets a variable by name.

NoReturn SetVal(Record node, String name, Any val)
Sets the given field (name) on the given record.

NoReturn AddVal(Record node, String name, String title, Any val)
Works similarly to SetVal, but generates schema for the record if it is untyped. Honors the order of fields added, and provides a field title as well as name.

Any GetVal(RecordOrList src, String name)
Gets the given field (name) from the given record.

String GetAppVersion()
Returns the version of the application.

RecordOrList Find(RecordOrList seq, String field, Any val)
Finds the given value (val) in the field in the given list (seq).

String PostToUrl(String url, Any nameValuePairs, Number timeOutSeconds)
Performs an HTTP POST to send the given record of name/value pairs (nameValuePairs) to the given URL, with timeOutSeconds (eg. 30).

String LoadUrl(String url, Number timeOutSeconds)
Loads the given URL data, with the given timeout. Returns it as a string.

String GetDropdownIcon(Record node, String fieldName)
Retrieves the icon ID associated with the dropdown entry for the value of field in the record.

List GetDropdownOptions(Record node, String fieldName)
Retrieves the dropdown options in a list for the dropdown held at fieldName in the given record.

String GetDropdownTitle(Record node, String fieldName)
Retrieves the display title associated with the dropdown entry for the value of field in the record.

Number GetDropdownSortValue(Record node, String fieldName)
Retrieves the sort ID associated with the dropdown entry for the value of field in the record.

String GetSmallIconHtml(String iconID, String backColor)
Retrieves the icon HTML for the given icon ID with the given background color.

Record CreateActionInput(String actionName, Path where)
Createa a record suitable for input into the given task/action at the given path.

String GetWebServerName()
Retrieves the web server name as specified in the configuration tab.

List Merge(RecordOrList onewData, Path targetPath)
Merges data (onewData) into the given path.

List data:RunODBC(String connection, String command)
Runs an ODBC query (command) at the given connection string, and returns the data as a list.

List RemoveFromList(List seq, Record rec)
Removes the record (rec) from the list (seq).

Path GetPathByRecID(Path typePath, Number recID)
For the given type (pointed to by typePath) and the given counter ID (recID), returns the path to the record that has that counter ID.

Any Nothing()
The same as null.

Any NoLink()
Returns a no-link value. Use to reset a link field.

Boolean Exists(Any src)
Returns true if the given value is not null, or otherwise holds a substantial value.

Boolean NotExists(Any src)
Returns true if the given value is null or holds an unsubstantial value.

Record RunSearchEngineQuery(String query, Number page, Path path)
If the search engine is enabled in the web application, runs a text search under the given path and returns the results in a record. If multiple pages are returned, access the next page using the page number.

String MakeLink(String title, Path path)
Returns a string suitable for assigning to a link field, pointing to a given path, showing a specific title. If title is null, the title of the record is retrieved automatically.

String MakeHyperlink(String title, Path path, Boolean newTab)
Returns a string suitable for inserting into HTML text, with a link to view the given path. The hyperlink text will be title. If newTab is true, will force open in a new tab.

Any Item(RecordOrList seq, Number index)
Returns the item in a list at the given index. 1-based.

NoReturn Assert(Boolean b, String error)
If the first parameter doesn't evaluate to true, then raises the given error text as an error

String GetDisplay(String val)
Gets the display portion of a link field.

RecordOrList Top(List expr, Number count)
Returns the top (count) items from the list expr.

RecordOrList Sort(List expr, Any field, Boolean sortDir)
Sorts the given list (expr) by field, ascending (sortDir=true) or descending (sortDir=false).

RecordOrList SortEx(Any expr, String field1, Boolean sortDir1, String field2, Boolean sortDir2, String field3, Boolean sortDir3)
Similar to Sort, but allows the use of up to 3 keys that are combined.

Number Count(Any expr)
Returns the number of items in the given list of record.

List List(List seq, String field)
Retrieves the values of field in the list seq, and returns a new list of those values only.

List Filter(List seq, String field, Any val)
Creates a new list of all items in seq where field is equal to val.

List UniqueList(List seq, String field)
Returns a unique list of values held in field in each record in seq.

RecordOrList CropList(Any seq, Number num)
Crops the given list to be only num in length.

Any Clone(Any obj)
Clones the given record so it can be changed independently of the original record.

Any IIf(Boolean condition, Any result1, Any result2)
If condition is true, returns result1, otherwise returns result2.

NoReturn workflow:SetStage(Record node, String workflowName, String stage)
Sets the stage of the given workflow record for workflow (workflowName) to stage (stage).

Next Topic: String Functions

General Functions - WorkflowFirst Customer Support Server, Version 1.0.849 (beta)
[ Client.Wiki, Professional ]
Up Since 7/21/2019 9:10:54 PM