SyntaxUse the Modify Table command to add or remove defining clauses and change the value of clause arguments:
Each modification clause is related to the arguments that define the table. To change the value of one of the defining clauses or add a new one, use the Modify clause that corresponds to the desired change. When modifying a table, you can make the changes from a script or while working interactively with MQL.
Deriving a User Table from a System TableIf you are a user with access to a system table, you can copy (clone) the system table to create a new table in your workspace. This new user table inherits all the columns of the system table. Any subsequent changes made to the system table are reflected in the derived user table as well. Once derived, the user table can be customized to add new columns, hide existing columns and to change the order of the columns. However, other aspects of the user table, like expressions and settings of columns inherited from the system table, cannot be altered. A user table that is derived from a system table cannot be used to derive another user table. You can only derive a user table from a system table in MQL. Once the derived user table is created, you can see it the same as your other tables. To create a copy of a user-derived table for another user, you must re-derive the original system table for the new user and then reapply any customizations. Only system tables and derived tables are shown in webapp selection menus. The Copy Table command lets you derive a user table by copying a system table:
Derived Table BehaviorWhen you modify a system table after a user table has been derived from it, the modifications are not apparent in the table definition until the user table is modified. Similarly, if a derived user table is modified with new columns added, and then the system table it was derived from is modified by adding new columns, the order of the columns in the derived table might not be as expected. You will need to readjust the column order numbers in MQL or rearrange the columns. If the system table (source) is deleted, the user table derived from it is also deleted. If you want to keep the derived user table, you can first modify it to make it a standalone table. For example:
If you need to export a derived table, all columns must have a name. If they do not, you will get a warning when exporting. You must add names to any un-named column and re-export the table or import will fail. |