Copy Operations

Description

A guide to performing copy operations and using the copy genie.

Overview of the Copy Process 

The Copy operation is a flexible tool for creating a result (destination) table using the fields and field-data from the master (source) table. If the master table is a set, the Copy operation lets you use fields from all of the tables in the set, not just the parent table. When you run an Copy Operation for a set which has one-many child tables, if no fields from the one-many child tables are included in the Copy definition, Alpha Anywhere only copies one instance of each parent record. Copy operations can be used to:

If you want to copy all of the fields from a single table, you may instead wish to use the Duplicate command found by right-clicking on a table in the Control Panel.

To do this:

  1. Click the Tables/Sets tab in the Control Panel.

  2. Right-click the table you want to copy, and select Duplicate from the right-click menu.

    Copying to an existing table risks overwriting not only existing data, but also layouts, fields rules, report and other application components stored in the table's data dictionary.

Performing a Copy Operation 

To define a new Copy operation:

  1. Click the Operations tab on the Control Panel.

  2. Click the New button. The Create New Operation dialog box appears.

  3. Select "Copy Records" as the operation, and select the table you want to copy.

  4. Click the Create button to display the Copy Builder or click Create Using Genie to display the Copy Genie (see Using the Copy Genie ). Copy Builder:

    images/Copy_Operation.gif
  5. Choosing Fields 

    Enter a new table name for Result Table.

  6. Select the fields you want to include by double-clicking on them. To copy all the fields, click the Select All button.

  7. To remove a field from the Copy Fields list, select the field and press Delete.

  8. Copy Settings 

    For additional options, click the Copy Settings button on the toolbar.

  9. Check the appropriate choices on the Copy Properties dialog box. Picture of Copy Properties Dialog Box

    images/Copy Settings.gif
  10. Selecting Records 

    The records that are copied, and the order in which they are added to the result table, is determined by the current range settings. To change these settings, click the Select Records button on the toolbar.

  11. In the Select Records dialog box, choose either:

    • "All records" - copy all records from the Transaction table to the Master table.

    • "Base operation on current selection of records"

    • "Specify record selection criteria"

  12. If you selected "Specify record selection criteria", then make a selection from the list box.

  13. Enter the filtering (a logical expression ) and ordering (a character expression ) criteria required by your choice.

  14. Click OK. Select Records Dialog Box

    images/UG_Select_Records_dialog_box.gif
  15. Optionally, click Save to display the Save copy settings as... dialog box.

  16. Enter the name of the operation into the Name field and click OK.

  17. Click the 'lightning' icon to run the operation.

Using the Copy Genie 

  1. Click Next > to continue.

    images/UG_Copy_Genie_1.gif
  2. Enter then name of the new table in the Result table field. Picture

    images/UG_Copy_Genie_2.gif
  3. Optionally, click the Advanced Options button to display the Advanced Options dialog box.

  4. Choose whether to warn before overwriting an existing table.

  5. Click OK to continue or Cancel to discard your input.

  6. Click Next > to continue.

    images/Copy_Genie_Advanced_Options.gif
  7. Indicate whether you want to copy All fields or Selected fields.

  8. Click Next > to continue.

    images/UG_Copy_Genie_3.gif
  9. If you chose Selected fields in the previous dialog box, move the fields you wish to copy from the Field List to the Fields to copy list.

  10. Select a field name and in the Field list and click '>' to add it to the Fields to copy list.

  11. Select a field name in the Fields to copy list and click the '<' to remove it from the Fields to copy list.

  12. Click the '>>' to add all fields to the Fields to copy list.

  13. Click the '<<' to remove all fields from the Fields to copy list.

  14. Click Next > to continue.

    images/UG_Copy_Genie_4.gif
  15. Indicate whether you want to copy the input table's dictionary, and if so, whether to overwrite the result table's dictionary.

  16. Click Next > to continue.

    images/UG_Copy_Genie_5.gif
  17. Indicate which records to copy.

  18. If you clicked the Selected records radio button, make a selection from the list box. Otherwise, continue with step 16.

  19. Enter the filter and order criteria required by your choice.

  20. Click Next > to continue.

    images/UG_Copy_Genie_6.gif
  21. Indicate whether you want to run the operation now, save the operation and then run it, or view the settings of the Copy Records Card.

  22. Click Finish.

    images/UG_Copy_Genie_7.gif
  23. If you selected Run the Copy Record operation now, (but first save the definition for future use), the Save copy settings as... dialog box will appear.

  24. Enter the name of the operation into the Name field and click OK.

  25. If you selected Don't run the Copy Records operation now, just show me how the genie has filled in the Copy Records card, the Copy Records Card will appear.

  26. Optionally, click Save to display the Save copy settings as... dialog box.

  27. Enter the name of the operation into the Name field and click OK.

  28. Optionally, click the Run button on the toolbar to run the operation.

Limitations

Desktop Applications Only

See Also