ATC: TARGET tablename option

This command sets the Target table row for subsequent ATC: IF and ATC: SET commands.

  • tablename is required and denotes the table to be used (e.g. DocItem).
  • option is optional and can be any of the following in the order described:
    • BY sortfield  indicates the field in the table by which to sort. This option is recommended if more than one record may match your filter.
    • BY @ indicates that the DocItem or DocItemTask row that corresponds to the current row should be targeted
    • WITH filter; requires the semicolon (;) at the end. It specifies a filter for limiting the rows to those that match. Use .NET Data Expression syntax. Do not use [bookmark] references. For more information see the Data Dictionary and .NET data expression syntax.


ATC: DUE 0 DAY 1 INTO $StartOn
ATC: DUE 365 DAY 1 -1 INTO $EndOn
ATC: TARGET DocDates WITH DocDateTypeKey = 'DED5B6FF-C747-4E96-AA4F-1A010E238214'
ATC: SET TargetRow.ActStart = $StartOn
ATC: SET TargetRow.ActFinish = $EndOn

The above example means “take the Due date and define $StartOn as the first day of the following month, then define $EndOn as the last day of the month in 1 year, then set the Target row to be the one with the Commitment Current Date type (expressed as the DocDateTypeKey GUID) in the DocDates table, and finally set the Start and Finish date fields on that row to the values in $StartOn and $EndOn, respectively.”

ATC: SET $Project = [DocHeader_Project]
ATC: FOREACH DocItemTask By ProjEntity WITH ISNULL(csString080,'') = '';
   ATC: SET $WBCode = @.ProjEntity
   ATC: SET $WBCDescr = LookupResult( ProjectTask, $WBCode, $Project)
   ATC: SET @.csString080 = $WBCDescr
   ATC: TARGET DocItem BY @
   ATC: SET @.Description = $WBCDescr

The above example means “store the project into a variable, then loop through the item tasks that have no value in csString080.  Grab the WBS code (from ProjEntity field) and resolve the description of the WBS line using the LookupResult function.  Store the description into csString080 and then find the corresponding Item row and set the description.  Note: this loop makes some sense for Production Units, but not for Change Items!


Last updated: July 10, 2019 at 12:35 pm; V2017+; green text = new