Setting Item Dates to the Current Date Automatically

Did You Know?

The ATC: SET workflow script command can be used to set Item dates on a document to “today’s date.” For example, if you want to automatically set the Requested Date on a Submittal, or the Submitted Date on a Submittal Package, you can do that through workflow scripts.

First Step:

Find the name of the Date field that you want to set automatically.

  • Go to the document’s Item tab, expand it if necessary, and click on the date field. The name of the field will appear at the footer, after the period. For example, the field below is Requested.

Second Step:

Add a new workflow script.

  1. Go to the Workflow Scripts tool on the System Admin Dashboard.
  2. Filter by the Doc type to see if you can add commands to an existing script or if you need a new one.
    1. If you are going to add to an existing script, skip to step 7
  3. If you need a new script, click the + icon and give your script a name, then save.
  4. Find and expand the script row to get to the Events For section.
  5. Select your Doc type and click the + icon to map the Doc type to the script.
  6. Select your Trigger When condition (often Normal Saves) then save.
  7. Click the script icon.
  8. For the simplest workflow script, you will need the following commands, where Requested can be replaced by the name of the Date field that you determined in the First Step.

    ATC: FOREACH DocItem BY DocItemNumber
    ATC: SET @.Requested= NOW()

  9. You can add additional commands or parameters to your script. For example, if you want to set the Submitted Date to today for Items that have the Submitted status only (S), you could write a script such as:

    ATC: FOREACH DocItem BY DocItemNumber WITH ItemStatus = ‘S’;
    ATC: IF @.ItemStatus IsChanging
    ATC: SET @.Submitted = NOW()