Steps before/after

<< Click to Display Table of Contents >>

Navigation:  General Functions > Configuring the MIE (Programmer's Guide) > Wizards > Steps >

Steps before/after

Each wizard step can perform several commands either before the screen is displayed or after the data is posted back and saved.  Commands are executed in order and some require that certain information be available before issuing the command (such as the user's ID must be established.)  

Note, these commands look like standard merge tags, however the are not inserted into the HTML.  Instead, they are entered either in the Steps to Execute Before or Steps to Execute After settings when defining each wizard step.

Commands may be executed more than once without risk of duplicating records.  All commands that copy information are smart enough to detect if a destination record already exists.  If one does, it is simply updated with new information.  This makes using a wizard a way of keeping one customer in sync with a master customer's settings, over time.  Many commands will log the results of what they did to the job log.

The following commands are available:

Command

Definition

{%COPYUSERTEMPLATE=<uNoTemplate%}

Copies the user template specified to the current customer.  This is generally used to copy a template that will be used when setting up new users.

{%APPLYUSERTEMPLATE=[<uNoTemplate]>%}

REQUIRES USERID to be established before issuing.  Applies the user template defined to the current user account that was setup by the wizard.  If no template is defined, the wizard will find the first template it encounters for the current customer and apply that.

{%NOTIFYUSER=<null>%}

REQUIRES USERID to be established before issuing.  Causes the system to send an email notifying the newly established user of their new account credentials.

{%COPYCDD=<Source CustNo>%}

Copies the entire Corporate Data Dictionary from the source customer to the current customer.

{%COPYCP=<source CustNo>|[cp1,cp2,...,cpN]%}

Copies selected catch points from the source customer to the current customer.  If no cpNos are specified, then all catch points are copied.

{%COPYDROPDOWNS=<dd1,dd2,...,ddN>|[source CustNo]%}

Copies selected drop-down (prompt table) records from the source customer to the current customer.  If source customer is not specified, then the default values will be copied.  dd1,dd2, etc specify the pmpNo primary key value of the prompt table (dataPromptTables) for the drop-downs to be copied.

{%SETUSERACCESS=<access>%}

REQUIRES USERID to be established before issuing.  Sets the access of the user's account that was established by the wizard to the value specified.

{%SETSETTING=<setting name>|<value>%}

Sets the setting named to the value sent.  The value may be a static value, or it may be a variable that references one of the input fields specified on the current form.  If referencing an input field, the syntax is [%<IID>%] - that is the value to be sent.  When "[%" is detected as the start sequence for the value, the <IID> (input ID that references the input) is parsed out and used to pull out the actual value that was posted back with the rest of the form.  The value posted will be saved to the setting.  When SetSetting references an input and the form is first displayed for edit, the Wizard will parse off the IID, load the current setting from the system, and place the setting in the input for display to the end user.

{%COPYMENUOVERRIDE=<UsermNoSource>%}

Copies the menu override record specified by the primary key value (UsermNo) to the current customer.  This allows pre-defined menu overrides to be put in place for the current customer.  Menu overrides are maintained in the UserdataMenus table.

{%COPYINPUTOVERRIDE=<UseriNoSource>%}

Copies the input override record specified by the primary key value (UseriNo) to the current customer.  Input overrides are maintained in the UserdataInputs table.

{%COPYIMPORTEXPORTJOB=<ieNoSource>%}

Copies the import/export job to the current customer.  ieNoSource is the primary key value of the import/export job to be copied.

IMPORTANT - Oftentimes an import job will insert constant values that are foreign key values for various related records defined for that customer.  For example, inserting cpNos for catch points when importing into the asset staging table.  When such jobs are copied to a different customer, those constant values are not valid and will not be copied as is.  The Wizard will attempt to identify the proper foreign key value and use it instead.  In order for this to work, all such records must be copied FIRST - before copying the import job.  Copying an import job is usually one of the last things to do.

Import jobs are designed around a specific CSV file format - and the column header values must agree with the import job definition.  Therefore, the file defined by the import job being copied will be opened, and its header will be copied over to the current customer's area.  This will allow users of the new customer to download the current file to use as a template for uploading new files.

{%COPYREPORTGROUPS=<gp1,gp2,...,gpN>%}

Copies the report groups specified to the current customer.  gp1,gp2,etc refer to the primary key value (RepGpNo) of the report groups table.  Report groups are maintained in the dataReportGroups table.  All reports currently assigned to those groups will also be copied.

{%COPYAUTOINCRANGE=<airNo>%}

Copies the autoincrement range specified by the primary key value to the current customer.  This is necessary when any inputs are defined to auto-increment.  A supporting range must be present for the feature to work properly.  Autoincrement ranges are maintained in the RDCdataAutoIncRanges table.

{%COPYTIMEDOP=<SchedNo>|[set active]%}

REQUIRES USERID to be established before issuing.  Copies the timed operation specified by the primary key value to the current customer.  If set active is sent as -1, then the job is subsequently set to active.  Otherwise, the job is set to inactive by default.  Timed operation jobs are maintained in the SystemSchedule table.

{%COPYREPORTFAVORITE=<RepFavNo>|[<add to dashboard>,<display order>]%}

REQUIRES USERID to be established before issuing.  Copies the report favorite defined by the primary key value to the current customer.  If add to dashboard is sent as -1 (and the report is a graphics-style report), then the report favorite is added to the current user's dashboard.  If display order is sent, then the display order of the dashboard is set to the number sent.  Report favorites are maintained in the dataRepFavorites table.

{%COPYCLIENTSCHEDULE=<schedNo>%}

Copies the client schedule specified by the primary key value to the current customer.  All tasks referenced by the schedule, including install tasks, are copied as well.  All software packages referenced by all tasks are added to the current customer.  Client schedules are maintained in the ATdataClientSchedule table.

{%COPYWORKFLOW=<wfWFno>%}

REQUIRES USERID to be established before issuing.  Copies the workflow specified by the primary key value to the current customer.  All referenced process points are copied as well as all referenced email templates and email questions.  Referenced contact groups are NOT copied and neither are referenced CABs.  Workflows are maintained in the WFdataWorkFlows table.

{%UPDATECUSTOMERSTATE=<null>%}

REQUIRES COPYDROPDOWNS command to be issued to copy states/provinces to the new customer prior to issuing this command. Updates references to the dataStateProvinces table for the current customer to point to references owned by the current customer.  Generally, in order to create a new customer record, the customer's address must be solicited.  This happens before the customer record is created, and therefore there is no drop-down for states/provinces available under the new customer's context.  The wizard will use the states/provinces for the customer that created the wizard.  Once the new customer record is established, however, this command should be issued to ensure that the new customer record points to states/provinces that are within the new customer's area.  

{%COPYDATAENTRYFORM=<deNo>%}

ANY REFERENCED WORKFLOW must be copied before issuing this command.  Copies the data entry form specified by the primary key value to the current customer.  Data entry forms are maintained in the WFdataEntryForms table.

{%ASSOCIATECREDITCARD=<null>%}

CREDIT CARD INFORMATION MUST HAVE ALREADY BEEN CAPTURED BY THE WIZARD before issuing this command. Associates any credit cards that were captured by the wizard to the current customer.  This command must be issued when capturing credit card information.  Otherwise, the credit cards will be on file but not associated with any given customer.

{%COPYEMAILTEMPLATE=<eMsgNo>%}

Copies the email template specified by the primary key value to the current customer.  Any referenced questions are NOT copied.  The only time email template questions will be copied is when they are referenced by a workflow that is being copied.  Email templates are maintained in the dataEmailTemplates table.

{%SENDEMAILVIATEMPLATE=<description>|<'DE' or 'CP'>|<description match into DE or CP>%}

REQUIRES USERID to be established before issuing.  Sends an email, using the template specified by the description (not by the primary key), to the current user.  If the email template is being used to send a link to a specific catch point screen, then the second parameter should contain the constant CP and the third parameter should contain the name of the catch point so that the wizard can match to the proper catch point.  If the email template is being used to send a link to a data entry screen, then the second parameter should contain the constant DE and the third parameter should contain the description of the data entry screen so that the wizard can match to the proper record.  If the email template is not being used to send either a data entry screen or catch point link, the second and third parameters may be omitted.

When filling in tags for the email message (from the email template), this command issues three pre-defined tags:

{%V1%} - Name of the user to whom the email is being sent (can be used in a salutation)
{%V2%} - URL target (for data entry or catch point links)
{%V3%} - name of catch point or description of data entry screen (only applies to data entry or catch point links)

{%SENDPASSWORD=<userID>%}

If the user ID provided can be found on the system, and if there is an associate contact record with an email address, the user's password will be emailed, in open text, to the email address on file.  

{%MARKTHREADCOMPLETE=<null>%}

Marks the current wizard thread as complete.  For wizards that require completion, this sets the date within the thread that satisfies that criteria.

{%SETCUSTOMERCONTEXT=LOGIN%}

Sets the current customer context to what it was when the user logged in (the customer to which the login belongs).