Note: 
  • All code samples below refer to the skuid object.

  • In the v2 API, this object is not directly accessible when working within a browser console—or when referring to another Nintex Apps page runtime.

  • If you are experiencing issues, use the skuid.runtime API to target the appropriate page context.

skuid.model

Classes

skuid.model.Condition

Properties Type Description
inactive boolean Read-only. A value indicating if the Condition is inactive - meaning it will not be applied to the Model. The default value is defined in the Page Designer, but inactive Conditions can be activated via a skuid.model.Model's activateCondition function. Likewise, an active Condition may be deactivated via the deactivateCondition function.
value string For a Condition with the Value Content set to "Single specified value", a value defined in the Page Designer to which the Condition's field will be compared. This value can be changed at run-time (and the Condition reapplied) to enable dynamic Model filtering.
values string array For a Condition with the Value Content set to "Multiple specified values", an array of values defined in the Page Designer to which the Condition's field will be compared. This value can be changed at run-time (and the Condition reapplied) to enable dynamic Model filtering.
field string The API name of the field that this condition will affect.

skuid.model.Field(config)

Creates a Model Field object from XML.

Argument Type Description

config

object

A simple object with the following properties:

  • xml (string): XML definition for the Model field.
  • field (object): Initial state for the Model field.
  • model (skuid.model.Model .): The Model associated with the field.

skuid.model.Model

See skuid.model.Model .

Functions

skuid.model.cancel(models)

 

Argument Type Description

config

object

A simple object with the following properties:

  • xml (string): XML definition for the Model field.
  • field (object): Initial state for the Model field.
  • model (skuid.model.Model .): The Model associated with the field.

skuid.model.getModel(modelId)

Returns the skuid.model.Model registered under the given id.

Shortcut: skuid.$M()

Arguments

Argument Type Description
modelId string The ID of a Model, as defined in the Type.

Returns

Description Return type:

The model associated with the given modelId, or undefined if the modelId is not recognized.

skuid.model.Model

skuid.model.getModelsByService()

Displays a list of models by which connection they are associated with.

Returns

Description Return type:
An object containing an array for each connection represented on the page, with all models associated with a connection listed in the respective array. Object

skuid.model.getModelsList()

Displays the skuid.model.Model for all models on a page.

Returns

Description Return type:
A list of Nintex Apps models on a page. Array

skuid.model.getMoreData()

skuid.model.isNewId(id)

Arguments

Argument Type Description
id string An ID from a row object

Returns

Return type:

boolean

skuid.model.list()

Returns

Description Return type:
Returns all registered models on the page. The order of the models is not guaranteed. skuid.model.Model[]

skuid.model.load()

skuid.model.map()

Returns

Description Return type:
A simple object map of Model Ids (as properties) to Models (as values of those properties). Object
Copy
{
  <Model Id> : <skuid.model.Model>
}

skuid.model.save(models,options)

Sends all changes for the given models to the server.

Arguments

Argument Type Description
models skuid.model.Model[] The array of Models from which to send changes to the server.
options object

A simple object with the following properties:

  • callback ( function ( result ) ): A function, accepting one argument. Nintex Apps will call this function when the save operation is complete and will pass it an object with the following properties:
    • totalsuccess (boolean): Indicates if all requested operations succeeded, for all rows.
    • insertResults (object [ ]): Result objects for all rows that Nintex Apps attempted to insert.
    • updateResults (object [ ]): Result objects for all rows that Nintex Apps attempted to update.
    • deleteResults (object [ ]): Result objects for all rows that Nintex Apps attempted to delete.
  • rollbackOnAnyError (boolean): A boolean set to false by default. If set to true, this will rollback any changes made before the error occurred in the save process. This prevents data synchronization issues when a new record (or a partial edit of a record) causes new data to mix with old.

    Note:  At this time, rollbackOnAnyError is only supported by Salesforce.

Returns

Description Return type:

The Promise object will be resolved upon completion of the save operation.

jQuery Deferred Promise

skuid.model.updateData(models,callback)

Updates (or "refreshes") the specified Models with the most up-to-date data from the server.

Arguments

Argument Type Description
models skuid.model.Model[] The array of Models to receive updates from the server.
callback function() Called by skuid after the update operation has completed.

Returns

Description Return type:

The Promise object will be resolved upon completion of the update operation.

jQuery Deferred Promise