I'm trying to build an interface for the bulk 'selection' of a bunch of incidents/problems from CA SDM, as a user interaction form.
I have a pair of issues.
Issue #1 is that the destination table is inside of a 'Field Set' element - We'll call it fieldSet.
The pre-execution code for passing a valuemap to the form doesn't seem to work when it's inside a field-set - I get an error stating that 'Form is not defined'
Example pre-execution code:
Form.fieldSet.destinationTable = Process.myValueMap
Issue #2 involves the workaround for that problem producing some unexpected results.
I am passing the valuemap array to a hidden table at the root level of the form - The valuemap array consists of valuemap items with attributes 'number' and 'asset.'
Form.sourceTable = Process.myValueMap
This is successful.
I then use ca_pam_getTableData() to grab the values of the hidden table, and then ca_pam_setTableDataFromJSObject() to push the values to the desired destination -
var incidentList = ca_pam_getTableData('Form.sourceTable',0,(ca_pam_getTableRowCount('Form.sourceTable') -1));
The source table has two rows of text field elements, 'asset' and 'number', and the destination table has three rows, 'asset', 'number' as text field elements, and then a row of checkboxes named 'resolved.'
The destination table updates, but every row is duplicated. - I am at a loss to explain either behavior, and I can't seem to figure out how to get around it.
Does anyone know what might be happening here?
For bonus points, does anyone know how I can default these check-boxes to a 'checked' state?