Skip to main content

Get-Table-Column

Command Description

Gets the entire column information of the specified table from the table object and returns a one-dimensional array

Command Prototype

arrayRet = Mage.ExtractSingleTableCol(objTableData,col)

Parameter Description

ParameterRequiredTypeDefaultDescription
objTableDataTrueexpressionobjTableDataUse the "Get Specified Table" command to output variable or the "Get All Tables" command to specify the variable of the table index (for example: arrayRet[1], which means the table index is 2)
colTruenumber1Specify the column number of the table object (starting from 1)

return

arrayRet,The variable used to save the output of the command.

Demo

Dim objTableData=''  // Table object, use the variable output by the "Get Specified Table" command or the variable of the table index specified by the "Get All Tables" command (for example: arrayRet[1], indicating that the table index is 2 form) 

TracePrint "--------------------Get table columns--------------------"
// --------------------------------------------------------
// [Remarks] Get table columns
// Input parameter 1:
// objTableData--table object
// Input parameter 2:
// col--column number

// Output parameters:
// arrayRet: The variable to which the output of the function call is saved

// Command prototype: arrayRet = Mage.ExtractSingleTableCol(objTableData,col)
// --------------------------------------------------------

arrayRet = Mage.ExtractSingleTableCol(objTableData,1)
TracePrint(arrayRet)