Previous Topic: ca_pam_setTableData(_id, values)Next Topic: Object Reference


ca_pam_setTableDataFromJSObject(_id, values)

Populates a table with the JavaScript object array.

Input Parameters
_id (string)

Specifies the table ID.

values (object)

Specifies the JavaScript array containing a list of objects. The objects properties must be same as the column name to populate the data.

Return Value

None.

Example

This example shows how to populate a table from a JavaScript object array. The table ID is Form.name and has two columns as firstName and lastName.

var tableData = new Array(); 
var data1 = new Object(); 
data1.firstName = "firstName1"; 
data1.lastName = "lastName1"; 
tableData[0] = data1; 

var data2 = new Object(); 
data2.firstName = "firstName2";
data2.lastName = "lastName2"; 
tableData[1] = data2; 
ca_pam_setTableDataFromJSObject('Form.names',tableData ); 

You can also find this function in the out-of-the-box content in CA Process Automation.

  1. On the Home page, click Browse Out-of-the-Box Content.
  2. Navigate to the User Interaction Forms folders, then:
    • 07 Populate Table RESTful WS: Populate Table RESTful WS.
    • 08 Populate Table SOAP WS: Populate Table SOAP WS.