Class: ActionTableScriptAPI

ScriptIncludes. ActionTableScriptAPI


new ActionTableScriptAPI()

Contains assistive methods for working with the ActionTable widget and acts as an anchor point for leveraging server-side data with script includes while not using the SPGlideAJAX functionality.

Note that ActionTable supports pulling data from a client callable script include as well as leveraging the REST API (Though authentication may pose issues with REST).

Extending this class instead of AbstractAjaxProcessor is not necessary from a functionality perspective, but does help to track or imply why that script exists.

Source:

Methods


finishQuery(queried)

Takes a general query and flushes out the record data with field descriptors.

Parameters:
Name Type Description
queried GlideRecord

That has the search parameters entered and query() has been called.

Source:
Returns:

With

Type
Array

generateExampleData(filter, page_size)

Returns non-persistent random data; If a page is requested twice, the data will not be the same.

Uses page_size to gauge the amount of data to generate.

Parameters:
Name Type Description
filter String
page_size Number

Defaults to 30

Source:
Returns:

Length either 5 * page_size or 30 of semi-random.

Type
Array

getExampleData(filter, page_size)

Returns non-persistent random data; If a page is requested twice, the data will not be the same.

Uses page_size to gauge the amount of data to generate.

Parameters:
Name Type Description
filter String
page_size Number

Defaults to 30

Source:
Returns:

Length either 5 * page_size or 30 of semi-random.

Type
Array

getFieldDescription(record, name)

Retrieve the value for the field along with additional descriptive information about the field in an object to add to the row data.

This does create somewhat of a duplication of data as this extra data will be the same across several rows.

Parameters:
Name Type Description
record GlideRecord
name String
Source:
Returns:

With properties; display_value, value, type, label

Type
Object

getTableData(table, query [, page_size] [, page])

Pull general data from a table.

Parameters:
Name Type Argument Description
table String

To query

query String

Encoded Query to pass into the query.

page_size Number <optional>

Optional limiter for number of rows to retrieve.

page Number <optional>

Optional offset for getting a specific page of data.

Source:
Returns:

Of records.

Type
Array

toJSON(record)

Convert a GlideRecord's data to JSON.

This method does NOT use getFieldDescription as that isn't the expected mode for the ActionTable widget. If looking for more flushed out data, use the finishQuery method instead.

Parameters:
Name Type Description
record GlideRecord
Source:
Returns:
Type
Object