This articles describes Macros and their usage. Macros are placeholders used to generate contextual information and utilize it in various ways. Macro usage includes customizing file and folder names in deliveries and supplying document parameter values.

Macro Usage

Fields marked with the M icon support the use of Macros. Macros may be entered manually or selected from the Macro Builder.

Macro Builder

Use the Macro Builder to view available macros and preview macro result. Not all macros will resolve as some are contextual and can only be resolved at runtime. 

  • Select the M button to open the Macro Builder
  • Select a macro
  • Add it to Field Value
  • Select the Test button to preview the result
  • Select the Apply Field Value button

Custom Function

Create a custom function using and reuse the function (Macro Build > Functions)


  • Open the Macro Builder
  • Select Date category
  • Add a Marco to Field Value and customize (example: [FIRSTDAYINMONTH+1D])
  • Select Test
  • Select Save
  • Name: Provide function name
  • Description (optional): Provide function description


Manage custom function under System > Configuration > Catergory:General > UserFunctionMacros

Usage Examples

  • File: [$DOCNAME]_[=state]_[TODAY,MM-DD-YYYY] = Revenue By State_Arizona_11-10-2009
  • Folder: \\folder1\[$DOCNAME]\[TODAY,MM-DD-YYYY] = \\folder1\Revenue By State_Arizona\11-10-2009

System Macros

System macros are invoked using [$MACRONAME]

BURSTBurst Name
BURSTIDBurst ID Number
BURSTSTATUSBurst Status (started, completed or aborted)
BURSTITEMSList of documents in a burst and their status
BURSTOUTPUTList of files delivered to a destination$BURSTOUTPUT
  • File name
  • File name
  • File name, size
  • File name, full path
  • File name, full path, size
DELIVERYDelivery name
DOCNAMEDocument Name
DOCINAMEInstance NameA burst can contain multiple instances of a document, each uniquely named. This macros returns the document instance name.
DOCDESCDocument Description
DPData Provider name when publishing Web Intelligence in Delimited Text format
SCHEDULESchedule Name
SCHEDULESTATUSStatus of a schedule (started, completed, aborted, or expired)
SCHEDULEITEMSList of bursts in a schedule and their status
EVENTEvent nameFor use in event-based schedule to insert Event name into schedule Action notifications
TABReport tab nameInsert Web Intelligence report tab name in a file name when the Split option is used.

Example: Report tab name is SUMMARY.

VIEWTableau view nameInsert Tableau view name in a file name when the Split option is used.

Example: View name is SUMMARY.

XDCPATHFolder path where XDC object resides
DOCEXTIDXI Document ID Number
USERInfoBurst UserName of the InfoBurst user requesting the job
USEREMAILInfoBurst User email addressEmail address of the InfoBurst user requesting the job
SERVERNAMEInfoBurst server name

Date-Time Macros

MacroDescriptionExampleSupport +/-Date Units
MMonth of year1YesN/A
MMMonth of year02 or 10YesN/A
DDDay of month05 or 12YesN/A
YYCurrent Year04YesN/A
YYYYCurrent Year2004YesN/A
DATECurrent Date01_10_04Nosame as [MM]_[DD]_[YY]
TIMECurrent Time12_34_20Nosame as [HH]_[MN]_[SS]
WEEK or WWWeek #05YesN/A
DNDay #02YesN/A
DY or DDXShort DayMONNoN/A
MMXShort MonthJANNoN/A
PREVMONTHPrevious month (short)JANNoN/A
TODAYTodays Date8/11/10
[TODAY,YYYYMM] = 201008
[TODAY-1M,MM-DD-YY] = 07-11-10
CURRXXXDay of current week as defined in macroCURRMON = 4/8/13YesD,K,M,Y
PREVWORKDAYPrevious working day (includes holidays)5/5/04YesD,K,M,Y
PREVxxxDate of previous day of the week where xxx is the day abbreviation. Supports date formatting.[PREVFRI] = 12/10/10
[PREVFRI,MM-DD-YYYY] = 12-10-2010
NEXTxxxDate of previous day of the week where xxx is the day abbreviation. Supports date formatting.[NEXTMON] = 12/20/10
[NEXTMON,MM-DD-YYYY] = 12-20-2010
XXXYYYInMonthXXX=1st-5th, YYY=SUN-SAT[2ndTUEInMonth]YesD,K,M,Y
XXXYYYInNextMonthXXX=1st-5th, YYY=SUN-SAT[3rdMonInNextMonth]YesD,K,M,Y
FIRSTDAYINMONTHFirst day in month1/1/04YesD,M
LASTWEEKDAYINMONTHLast week day in current monthN/AYD,K,M,Y
LASTWEEKDAYINQTRLast week day in current quarterN/AYD,K,M,Y
LASTWEEKDAYINYEARLas week day in current yearN/AYD,K,M,Y
LASTDAYINMONTHLast day in current month1/31/04YesD,M
FIRSTDAYINQTRFirst day in month1/1/04YesQ
LASTDAYINQTRLast day in current quarter1/31/04YesQ
FIRSTDAYINYEARFirst day in year1/1/04YesY
LASTDAYINPREVQTRLast day in previous quarter3/31/04YesD,K,M,Y
LASTDAYINYEARLast day in year12/31/04YesY

  • D: Calendar day
  • K: Week day (Mon-Fri)
  • M: Month
  • Y: Year
  • +0 returns the first D/K/M/Y

Combine Date Macro Operators

In builds 237 and later it is possible to combine date macro operators.

Example: [TODAY+4M+0k]

Date Macro Variable

Date macro variable allows for passing of date from one macro to another. Usage scenario described below.

Report runs on 1/1/19. Report contains start and end date parameters. Report should run for past three months.

Start Date: [FIRSTDAYINMONTH-3M]  (result = 10/1/18)

End Date: [TODAY-1D]  =  12/31/18

The start date should be 9/1/18.

The date macro ($<VARIABLE>) variable allows for passing of date resolved be first macro to be used in second macro. Variable name can vary.

Start Date: [FIRSTDAYINMONTH-3M@startdate]  (result =  9/1/18)

End Date: [TODAY-1D$startdate]  =  12/31/18

Parameter Macro

The parameter macro is used to provide the document bursting parameter value. The macro is invoked using [=PARAMETER NAME]

PARAMETER NAMEBursting Parameter ValueIf the document prompt name is Enter Customer State: then [=Enter Customer State:]

If document filter name is Customer City then [=Customer City]

Extra Column Macro

The extra macro is used to provide extra column values from a data source used to supply bursting parameter values. The macro is invoked using [%COLUMN NAME].

Function Macros

@first(variable) or (variable,n) where n = # charsExtract first (n) chars from a variable[@first(city)]


@mid(var,n1,[n2])Extract characters from a variable where n1=starting point and n2=number of characters to extract (optional)[@mid(city,2,3)]
@last(var,n)Extract last (n) characters from a variable[@last(city,3)]
@rpl or @replace(variable,find,replace)Replace characters in (find) with (replace) for a variable. Supports multiple characters (i.e., [@rpl(agent,/\:,-)][@rpl(agent,/,-)]
@rm or @remove(variable,remove)Remove characters in (remove) from variable[@rm(agent,/)]
@sp or @convspace(variable,find)Replace characters in (find) with a space for a variable[@sp(agent,/)]
@embed(/folder/file)Embed HTML file cataloged in InfoBurst into email message[@embed(/folder1/disclaimer)]

When Burst and HTML reside in the same folder, use the following to reference the Burst:

@query(query id,query name,parameter)Return value from a database query[@query(105,States,Region=West)]

Macro Concatenation

Pass the result of one macro to another.


Variable is DATE with a value of 12/31/99. Requirement is to extract the first five characters from the string (12/31) then replace the / with -.


Macro Concatenation Character

The default macro concatenation character is ~. The character can be customized in System > Configuration > General.

See Also

Using Macros

Using Extra Columns