The Windward Studio

Windward Blog Home

How to Automatically Calculate Due Dates with AutoTag

by
Posted on 10/22/2014

Please Share This

 

Editor’s note: This is our first article in a new blog series on getting to know AutoTag better. We’ll be introducing you to cool features you may have overlooked.

Did you know that AutoTag can automatically calculate due dates?  For instance, you can configure the software to calculate and display the due date on an invoice when the invoice is generated.

The Challenge

You have an invoice template (or any document for that matter) that displays a due date. The due date is 30 days from the date the invoice is generated (net30), and right now you’re manually inputting the due date. There’s got to be a better way.

The Solution

You can use DATESPAN to add years, months and/or days to a date in AutoTag. Check out how easily this can be set up using two OUT tags. (Jump below the video to see the written instructions.)

 

The Step-by-Step Details

This tutorial uses Windward’s public SQL demonstration database.

Part 1 – Create an OUT tag that returns the current date.

These steps will produce an OUT tag in your template called [currentDate].

  1. Insert an OUT tag in your template.
  2. Double click the OUT tag to launch the Tag Editor.
  3. In the Tag Editor click the Equation button.
  4. In the Insert Function window under Select a category, use the pull down menu to select Date & Time.
  5. Under Select a function, click NOW.
  6. Click OK.
  7. Click OK again to close the Function Arguments Window.
  8. In the Tag Editor under Tag enter a value of today in the var field. This will give the OUT tag a variable name of today that we can reference in other places in our template.
  9. Also in the Tag Editor under Tag, enter a value of [currentDate] in the nickname field.
  10. Click Save Tag.

Part 2 – Create an OUT tag that returns the current date plus 30 days.

These steps will produce an OUT tag in your template called [net30].

  1. Insert an OUT tag in your template.
  2. Double click the OUT tag to launch the Tag Editor.
  3. In the Tag Editor click the Equation button.
  4. In the Insert Function window under Select a category, use the pull down menu to select Date & Time.
  5. Under Select a function, click DATESPAN.
  6. Click OK.
  7. In the Function Arguments window, enter a value of 0 for Years, 0 for Months and 30 for Days.
  8. Click OK.
  9. In the Tag Editor you will now see the following in your Select field: =DATESPAN(0,0,30)
  10. Click in the select field and add the variable that refers to your [currentDate] OUT tag. NOTE: Remember the syntax for referencing a variable in AutoTag is ${variablename}
  11. Your select statement will now look like this: =DATESPAN(0,0,30)+${today}

Your template now looks like this:

InvoiceDueDateTemplate

And when you run the report, it looks like this:

InvoiceDueDateReport

The Whole “Did You Know?” Series

I hope you found this post useful. Stay tuned for our next post in the series, on pod basics.

Remember, you can receive the series in your email inbox by subscribing to our company blog here:

Enter your email address:

Delivered by FeedBurner

Please Share This



Author: Valerie Schilling

Valerie is passionate about people. Her strengths, with many years in the tech industry, are deeply rooted in relating and communicating. Valerie has an unparalleled tenacity to ensure the people she works with get what they need. Even if your problem is not solved immediately, your day will be brightened by her intelligent and cheerful demeanor.

Other posts by