AX1408

Copy On Demand Plan Files command

Use the Copy On Demand Plan Files command to copy a plan file from a source on-demand file group to a target on-demand file group. This command is intended for use in specialized solutions, where the affected file groups and their plan files have been designed to support this activity.

When this command is executed, a dialog displays a list of plan files in the source file group. The user can select one or more plan files to copy to the target file group. A new record is created in the target file group for each plan file that is copied.

Can be used in

  • Task panes
  • Ribbon tabs

When the Copy On Demand Plan Files command is selected from the Command Library as the shortcut target, it displays as command://CopyOnDemandPlanFiles or command://CopyOnDemandPlanFilesCommandAdapter (legacy syntax).

Shortcut parameters

This command uses the following shortcut parameters:

Item Description

Dialog header

Optional. Defines custom descriptive text for the dialog header area (the area below the dialog title and above the list of plan files).

If no text is defined here, the default descriptive text is: "Copy plan files between on-demand file groups, creating new records in the destination."

Source file group

The file group to copy plan files from. Click the folder icon to select a file group. You can select any on-demand file group, or any file group alias that currently points to an on-demand file group.

Target file group

The file group to copy plan files to. Click the folder icon to select a file group. You can select any on-demand file group, or any file group alias that currently points to an on-demand file group.

Keep original plan file creator

Specifies whether the plan file creator for the copied plan files is set to the same creator as the original plan files. By default, this option is enabled.

If this option is disabled, then the plan file creator for the copied plan files is set to the user who is performing the copy action.

Use default template

Specifies whether the copied plan files have the option to adopt the default template of the new file group. This is primarily intended to be used when copying plan files to a file group that uses virtual, form-enabled plan files, so that the copied plan files can be converted to virtual files and use the new template.

  • If disabled (default), then the target file group must contain copies of the original templates that were used to create the plan files from the source file group. If these templates are not present, then the copy process will fail.

  • If enabled, then the copied plan files will be assigned a template as follows:
    • If the target file group contains copies of the original templates that were used to create the plan files from the source file group, the copied plan files use those templates.
    • If the target file group does not contain copies of the original templates, the copied plan files use the default template specified for the target file group in the file group properties.

    If the target file group does not contain copies of the original templates and does not have a designated default template, then the copy process will fail.

Copy plan file attachments

Specifies whether plan file attachments are copied to the target file group when a plan file is copied. By default, this option is enabled.

If this option is disabled, then plan file attachments will not be copied to the target file group.

Save plan files after copy

Specifies whether the new plan files are processed and saved in the target file group after the copy is performed. This is intended to perform a save-to-database within the context of the new file group. By default, this option is disabled.

If you enable this option, then after the plan files are copied to the new file group, they will be opened, refreshed, and saved (including a save-to-database). This process is performed by Scheduler, using the same process as when you choose to run Process Plan Files (normal processing) on the server. The refresh includes all active Axiom queries where Refresh during document processing is enabled. A confirmation message displays in the user's Notifications task pane when the process is complete.

Regardless of whether this option is enabled, if it is ever intended to save the copied plan files in the target file group, then they must be designed so that they save data to the appropriate tables after being copied.

NOTES:  

  • If Process with Utilities is enabled for the target file group, then utility processing is performed instead of normal processing. The default data source is used.

  • If you enable this option but also specify a Copy data utility, then the new plan files are not processed and saved. Instead, the designated utility file is processed for each new plan file.

Copy data utility

 

Filter

Optional. Defines a filter to limit the plan files shown in the selection dialog, when choosing plan files to copy. The filter must be based on the plan code table for the source file group, or on a reference table that the plan code table links to.

You can type a filter criteria statement, or use the Filter Wizard to create the filter.

Default values

This command also supports defining default values. This section can be used to apply default values to any columns in the target plan code table, when the new record is created in the target file group.

Visibility

Items using this command are only visible if the current user's security permissions meet the following criteria:

  • The user has at least read-only permission to one or more plan files in the source file group and the target file group (or the potential of being elevated to this level of permission by a plan file process).
  • The user has the Create New Records security permission for the target file group.

If the user does not have the appropriate permissions, then the item is hidden. You can use the Show restricted items option for the task pane or the ribbon tab to force the item to be visible at all times (but grayed out if unavailable).

Remarks

This command is an advanced feature and should only be used if it is the only way to achieve the desired population of plan files between two related file groups. It is the responsibility of the solution designer to ensure that the copied plan files will behave as expected in the target file group. For example, the plan file must be designed to dynamically save to the appropriate tables and columns within the context of the new file group.