How do I use Inserts to place constants or variables into fields in ATRS?

The Inserts module, which pops up automatically, gives you the ability to drag and drop constants, variables, user constants and data items into almost any field in ATRS.

Insert Menu

Inserts is arguably one of the most versatile features in ATRS. This feature enables the advanced schedule types to work, deals with a variety of parameters, and customizes outputs for recipients.

  • The insert function is activated in two ways:
    1. ATRs will automatically launch the insert module at points where it can be used. (e.g. in a wizard's parameter screens).
    2. In the field into which you wish to insert a function, right-click and select Insert.
  • The following types of constants are available:
    • ATRS Constants (@@ATRS Constants)
    • User Defined Constants (@@User Defined Constants)

ATRS Constants

  • To use ATRS constants, select @@ATRS Constants from the Type list and then select the constant you want from the resulting Name list. Here is a list of constants to choose from:
    • Current Group Value: Returns the current group value.
    • Current Temp File Path: Returns the temp file path.
    • CurrentDate: Returns the current date.
    • CurrentDateTime: Returns the current date and time.
    • CurrentDay: Returns the current day date.
    • CurrentMonth: Returns the current month number.
    • CurrentMonthName: Returns the current month name.
    • CurrentScheduleName: Returns the name of the current schedule or package.
    • CurrentShortMonthName: Returns the name of the short month.
    • CurrentShortWeekDayName: Returns the name of the short week.
    • CurrentTime: Returns the current time.
    • CurrentWeekDayName: Returns the name of the day the schedule is run.
    • Current Year: Returns the current year.
    • End Last Year: Returns the date of the last day of last year.
    • Exported File Name: Returns the name of the exported file.
    • First Day of the Next Month: Returns the first day of the next month.
    • First Day of this Month: Returns the first day of the current month.
    • FiscalWeek: Returns the fiscal week.
    • Friday Last Week: Returns the date for last Friday.
    • Friday This Week: Returns the date for this Friday.
    • Key Parameter Value: Returns the current key parameter value in use by a dynamic schedule.
    • Last Day of the Month: Returns the last day of the month.
    • LastResult: Returns the last result.
    • Last Run: Returns the last run of the schedule or package.
    • LastestResult: Returns the latest result of the schedule or package.
    • LatestRunTime: Returns the latest run time of the schedule or package.
    • Monday Last Week: Returns the date for last Monday.
    • Monday This Week: Returns the date for this Monday.
    • MonthEndLastMonth: Returns the date of the last day of last month.
    • MonthStartLastMonth: Returns the date of the first day of last month.
    • SaturdayLastWeek: Returns the date for last Saturday.
    • SaturdayThisWeek: Returns the date for this Saturday.
    • Schedule Owner: Returns the schedule owner.
    • Scheduled Time: Returns the scheduled time.
    • StartThisYear: Returns the date of the first day of this year.
    • SundayLastWeek: Returns the date for last Sunday.
    • SundayThisWeek: Returns the date for this Sunday.
    • ThursdayLastWeek: Returns the date for last Thursday.
    • ThursdayThisWeek: Returns the date for this Thursday.
    • TuesdayLastWeek: Returns the date for last Tuesday.
    • TuesdayThisWeek: Returns the date for this Tuesday.
    • WednesdayLastWeek: Returns the date for last Wednesday.
    • WednesdayThisWeek: Returns the date for this Wednesday.
    • Year Start Last Year: Returns the date of the first day of last year.
    • Yesterday: Returns the date of the day before.

User Defined Constants

 

  • To use User Defined Constants, select @User Defined Constants from the Type list and then select the constant you want from the resulting Name list. Or select New to create a new constant. You can insert other constants and create a new formula of your own.
  • If you would like even more functionality, you can now use Javascript in your custom constant definition.
  • For more information about User Constants Data, click here.

Parameters

  • Use these to insert the current report parameter value into an email, report name, etc.

Event-Based Data

  • Used with event-based schedules.
  • Data from the database record or email body which triggered off the event can be inserted into emails, reports etc.
  • For instructions on how to parse the body of an email, see the last section of this page.

Data-Driven Data

  • Used with data-driven schedules. Data from the data driver can be inserted in all possible areas to drive the schedule.

Data Item

  • Construct a SQL statement to collect the information from a database field. Selecting this option will bring up the Data Items Module.
    • Here you can pick an already existing SQL script, or construct a new one to query a database and return a specified value.

User Defaults

  • Default Attachment: This will insert the attachment in the Default Attachment field from the User Defaults menu (in Options).
  • Default Message: This will insert the wording in the Default Message field from the User Defaults menu (in Options).
  • Default Signature: This will insert the wording in the Default Signature field from the User Defaults menu (in Options).
  • Default Subject: This will insert the wording in the Default Subject field from the User Defaults menu (in Options).
  • For more information on User Defaults, click here.