Ed,
I do this by converting the array to a JSON object, then passing the JSON as a string to the IRF. Then, in the IRF, convert the JSON string to a JavaScript object, and populate the form table from that object. That summary makes it sound more complicated than it is. Here's an example:
In the pre-execution code of the "Assign User Task", convert the array to a JSON string:
json = new Array();
for (var i=0; i<Process.event_data.length; i++) {
json_row = {
'event_name' : event_data[i][0],
'status' : event_data[i][1],
'user' : event_data[i][2],
'created_on' : event_data[i][4]);
json.push(json_row);
}
Process.json_string = stringifyJSON(json);
Pass "Process.json_string" to a text item on the IRF called "data_json".
In the Script section of the IRF, create a function that is called on the "onLoad" event:
{
load_table: function() {
json = ca_pam_convertJSONToJSObject(ca_pam_getTextFieldValue('Form.data_json'));
ca_pam_setTableDataFromJSObject('Form.updates', json);
}
}
Of course, the table "Form.updates" was created with columns matching the member names of the JSON object: "name", "status", "user", "created_on".