TableDefineFromTable
The TableDefineFromTable function is only supported in Studio. It
returns a new Table object inherited from the specified table. The
function does not clone the table content, instead, the new table will
be empty.
Prototype
TableDefineFromTable(Table; Name)
Arguments
Table String/Variable By value
A valid string containing the name of an AF table or the name of a SFHub table.
Name String By value
Contains a variable of type table or a valid string containing the name of an AF table or an attribute table.
Returns
Table
A new empty Table object with the same column schema of the original table.
Exception
Undefined
Undefined is returned if:
- Table is empty, or Undefined or not a valid String
- Name is empty, or Undefined or not a valid String
Examples
$myNewTable = TableDefineFromTable($$myTable ; 'NewTable' )
This will return a new SFHub Table with name NewTable and the same columns schema of the $$myTable.
$myNewTable = TableDefineFromTable('SF_Component table' ; 'NewTable' )
This will return a new SFHub Table with the name NewTable and the same columns schema of the AF Table SF_Component table.