MyDriveWorks - Tech Tips
Learn how to add, edit, delete and copy data from a Simple Table inside DriveWorks with this Tech Tip. The demonstrated functionality can be applied to other Table t
The Run Macro in a Loop task will run a Macro in the Specification the number of times specified by the Start, Limit and Increment Values.
Property Name | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Title | Changes the Title (not the name) of the task. | |||||||||||||||
Macro Name | The name of the macro in the project. | |||||||||||||||
Macro Argument | Provides an optional argument to the macro. Click here for more information...The Macro Argument property provides an optional argument to the macro. Property Type: Static Default Value: null The value or result of a rule, placed in the Macro Argument property, is passed into the special variable Current Macro Argument (see Info: Special Variables). Using the Macro Argument property allows the same macro to be used, but with differing outcomes depending on when it is run. To Change the Default ValueEnsure the property is a static property (It will display the gray orb alongside the property name) The default value of the static property can be changed by typing the required value directly into the property field:
Examples
A rule can also be built for this property by changing the type to dynamic. See How To: Change A Static Property To A Dynamic Property.
Value set in Form Designer. Static properties can be made Dynamic by double clicking the gray radio button. | |||||||||||||||
Defer | False (default) to run the macro immediately.
True (not recommended) to defer the execution of the macro until after the Specification has been saved. Using TRUE for the Defer property
When a Specification is created a copy of the Project file (.driveprojx file) is stored alongside it in a hidden folder. This file is saved whenever a Specification is transitioned to a non-running state. The Defer property controls the timing of when the macro is run.
When a Specification transitions to a paused state, and the Defer property is set to TRUE, it will run after all other Tasks within the same Task Sequence have been run and all the changed values have been saved to the Project file. | |||||||||||||||
Start Value | Controls the initial value of the loop counter.
This defaults to 1 when the Task is added. | |||||||||||||||
Limit Value | Controls the limiting value of the loop counter.
This defaults to 10 when the Task is added. | |||||||||||||||
Increment Value | Controls the value added to the loop counter on each iteration,
this will be positive to step up and negative to step down.
This defaults to 1 when the Task is added. | |||||||||||||||
Counter Constant | Optional. The name of a Constant which will receive the loop counter value on each iteration. |
When this task is added the properties are static by default.
See How To: Change A
Static Property To A Dynamic Property to enable rules to be built on these properties.
Property Name | Example Rule | Example Result | Meaning |
---|---|---|---|
Defer | FALSE | FALSE | FALSE will run this Task immediately. |
Defer | TRUE | TRUE | TRUE would defer this Task until after the Specification had been saved. |
Macro Argument | DWCurrentMacroArgument | 1 | Will be the Macro Argument used by the Macro running in a loop.This can then be used in rules. Find more information here |
Macro Name | "Export to table" | Export to table | This is the name of the Macro you want to run. |
Counter Constant | DWConstantLoopingConstant | DWConstantLoopingConstant | Will increase the specified Constant every time the loop is carried out. |
Increment Value | 1 | 1 | Will add 1 to the loop counter of each iteration. This is positive so will step up. |
Limit Value | TableMaxValue(DWLookupCustomers,1) | 10 | The loop counter will be limited to this number of loops. The rule is finding the maximum value that the table goes to and sets that as the limit |
Start Value | 1 | 1 | The loop counter will start at this value |
This task has different types of Outputs. For more information about Outputs see Specification Macros Task Node.
Outputs are only available within Specification Macros. Currently Outputs are not available for Specification Flow.
This task supports Status Outputs. These can be used to perform different actions depending on what the status outcome of the task is. For more information see Status Outputs in the Task Node Outputs section of Specification Macros Task Node.
The status output navigation is as follows:
Success
Success with Warnings
Failed(One of the following occured)
Learn how to add, edit, delete and copy data from a Simple Table inside DriveWorks with this Tech Tip. The demonstrated functionality can be applied to other Table t
View all available MyDriveWorks Tech Tips.