Axaptapedia is now maintained by AgileCadence For more information please click here.


From Axaptapedia
Jump to: navigation, search


AxCopyTableFieldListToClipboardDlg.PNG ---> FieldListCopyResult.PNG

Features (You can ...)[edit]

Version 1.2 Georg[edit]

Adding capability of insert values of passed record with adding call to form of SysRecordInfo Download File:Georg AxCopyTableFieldListToClipboard1'2.xpo

Version 1.1[edit]

  • Insert a variable declaration before using the name; You will have to move the declaration where it belongs if pasting in the middle of a method.
  • Insert a call to clear() method of a table variable in order to clear its contents. This is useful, for example, when doing inserts in a loop.
  • Specify a different variable name than the one by default (tableName). If the variable is unacceptable, the image on the right will point out the mistake.
  • Choose which fields to copy into the clipboard. There are 2 presets so far. The list will be extended in future releases.
  • Insert a call to insert() or update() after the lines with field values assignment.
  • A close to the result preview is shown above the settings in the dialog to let you see, what the code will look like.


Simply download and import the project. Refer to IDE integration

IDE Integration[edit]

The tool can be integrated into the system in a couple of ways:

  • Insert the menuItem AxCopyTableFieldListToClipboard into the SysContextMenu menu. The text "Copy Table FieldList" will be automatically added to the context menu on AOT objects. In order to sort this out and show the text only for tables, you have to modify the method verifyItem of the SysContextMenu class. Paste the following code into the appropriate section (after case MenuItemType::Action:)

<xpp> //--> AxCopyTableFieldListToClipboard_ikash date=2007-02-11 txt='Show in menu only for tables' case menuItemActionStr(AxCopyTableFieldListToClipboard):

   if (this.selectionCount() != 1 || firstNode.AOTIsOld())
       return 0;
   if (!docNode && firstNode.sysNodeType() == 204)
       return 1;
   return 0;

//<-- AxCopyTableFieldListToClipboard_ikash </xpp>

  • Insert the menu Item into the GlobalToolsMenu or the DevelopmentTools menu. Then select a table in the AOT and run the menu.
  • You can add the bmp image attached to the project into the plugs folder of Tabax and you will automatically be able to launch the tool from the Tabax toolbar.
  • You can select a table name in the editor and call the tool from the editor scripts. In order to insert the tool into the editor scripts create a method with the following code in the EditorScripts class.

<xpp> void AOT_Copy_TableFieldList(Editor e) {

   Args    args = new Args();
   new MenuFunction(menuItemActionStr(AxCopyTableFieldListToClipboard), MenuItemType::Action).run(args);

} </xpp>

  • If none of the conditions match, a list of tables will be opened and you will be able to select the table you want to use.

Planned Upgrades (Suggestions)[edit]

  • Add additional selection options for the field List. (AutoReport, AutoLookup, Only Mandatory)
  • Add full support of the Editor - if a table variable is selected, the declaration will be found (similar to AxGoToDeclaration). (So far only if a table name is selected the tool will work on it)
  • Add the possibility to include a if(tableVariable.validateWrite()) source line

See Also[edit]


  • AndyD - ListView setColumnWidth and winApi stuff
  • aidsua - a hint on the match function