sendPopupTable


sendPopupTable (popupWindowTitle, columnHeaders, tableData)

sendPopupTable causes a pop-up window to be displayed on the desktop of the operator who started the calling function. You can send action commands for each row of the table, sort the columns, and send rudimentary HTML commands to the pop-up table and have it display as HTML instead of a table. This is intended to be used with captureOutput but may be used for other purposes as well.

Parameters:

popupWindowTitle

The title to be used for the pop-up window.

columnHeaders

An array of strings for the table column headers.

tableData

An array of arrays containing the table data.

Returns:

true if the operation succeeded, false otherwise.

Example:

function formatJobOutput(message)

session messageSource

// Set up the jobInfoColumns as the names for the table columns

jobInfoColumns.add("Name")

jobInfoColumns.add("Step")

jobInfoColumns.add("User ID/Step")

jobInfoColumns.add("Status 1")

jobInfoColumns.add("Status 2")

// Each line of text contains the information

// for two jobs. The list line may only contain

// one job, however.

do i = 3 to message.LINES.size() - 1

lineText = strTrimLeading(message.LINES[i])

tokens = strSplit(lineText, " +")

// Clear out the jobinfo array and append the job info from the message

jobinfo = false

jobinfo.add(tokens[0])

jobinfo.add(tokens[1])

jobinfo.add(tokens[2])

jobinfo.add(tokens[3])

jobinfo.add(tokens[4])

jobInfoList.add(jobinfo)

// If there is anything in the sixth tokens element,

// there is another job detailed on this line. if tokens[5] != false then

// Clear out the jobinfo array and append the job info from the message

jobinfo = false

jobinfo.add(tokens[5])

jobinfo.add(tokens[6])

jobinfo.add(tokens[7])

jobinfo.add(tokens[8])

jobinfo.add(tokens[9])

jobInfoList.add(jobinfo)

endif

end

// Send the data to the viewer that started this function.

sendPopupTable(messageSource.NAME & " Active Jobs", jobInfoColumns, jobInfoList)

return true

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Ops Console Management, BMC AMI Ops Console Automation, and BMC AMI Ops SecureHMC 4.1