Summary


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


Macro Usage


Fields marked with the I94t9VZ7fTlkcV_MCUiETdbk-2i4duO8ZQ.png icon support the use of System Macros. Macros may be entered manually or selected from the Macro Builder.


Macro Builder
  • Select the I94t9VZ7fTlkcV_MCUiETdbk-2i4duO8ZQ.png button to open the Macro Builder
  • View macros by category and detail about macro usage
  • Drag a macro to the Edit field on the right
  • Combine macros and static text to form custom names
  • Select Resolve Macros for preview of the custom name

 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]


Macro
Description
Example/Options
BURST or BURSTNAME
Burst Name

BURSTID
Burst ID Number

BURSTSTATUS
Burst Status (started, completed or aborted)

BURSTITEMS
List of documents in a burst and their status

SCHEDULE or SCHEDULENAME
Schedule Name

SCHEDULESTATUS
Status of a schedule (started, completed or aborted)

SCHEDULEITEMS
List of bursts in a schedule and their status

DOCNAME
Document Name

DOCINAME
Instance Name
A burst can contain multiple instances of a document, each uniquely named. This macros returns the document instance name.
DOCDESC
Document Description

XDCID
XDC ID Number

XDCNAME
XDC Name

XDCPATH
Folder path where XDC object resides

DOCEXTID
XI Document ID Number

USER
InfoBurst User
Name of the InfoBurst user requesting the job
USEREMAIL
InfoBurst User email address
Email address of the InfoBurst user requesting the job
OWNER
Burst Owner
InfoBurst user that created the burst
TAB
Report tab name
Insert report tab name in a file name when the Perform Split option is used.

Example: Report tab name is SUMMARY.

[$TAB]_[TODAY,MM-DD-YY]
SUMMARY_10-28-10
BURSTOUTPUT
List of files delivered to a destination
$BURSTOUTPUT
  • File name
$BURSTOUTPUT(NAME)
  • File name
$BURSTOUTPUT(NAME_SIZE)
  • File name, size
$BURSTOUTPUT(PATH)
  • File name, full path
$BURSTOUTPUT(PATH_SIZE)
  • File name, full path, size
DP
Data Provider name when publishing Web Intelligence in Delimited Text format



Date-Time Macros


Macro
Description
Example
Support +/-
Date Units
M
Month of year
1
Yes
N/A
MM
Month of year
02 or 10
Yes
N/A
DD
Day of month
05 or 12
Yes
N/A
YY
Current Year
04
Yes
N/A
YYYY
Current Year
2004
Yes
N/A
HH
Hour
12
Yes
N/A
MN
Minute
34
Yes
N/A
SS
Second
20
Yes
N/A
DATE
Current Date
01_10_04
No
same as [MM]_[DD]_[YY]
TIME
Current Time
12_34_20
No
same as [HH]_[MN]_[SS]
WEEK or WW
Week #
05
Yes
N/A
DN
Day #
02
Yes
N/A
QTR
Quarter
01
Yes
N/A
DY or DDX
Short Day
MON
No
N/A
DAY or DDLX
Long Day
MONDAY
No
N/A
MMX
Short Month
JAN
No
N/A
PREVMONTH
Previous month (short)
JAN
No
N/A
MMLX
Long Month
JANUARY
No
N/A
PREVLONGMONTH
Previous month (long)
JANUARY
No
N/A
TODAY
Todays Date
8/11/10
[TODAY,YYYYMM] = 201008
[TODAY-1M,MM-DD-YY] = 07-11-10
[TODAY-7D,DD-MONTH-YYYY] = 11-AUG-2010
Yes
D,K,M,Y
CURRXXX
Day of current week as defined in macro
CURRMON = 4/8/13
Yes
D,K,M,Y
PREVWORKDAY
Previous working day (includes holidays)
5/5/04
Yes
D,K,M,Y
PREVxxx
Date 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
No
D,K,M,Y
NEXTxxx
Date 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
No
D,K,M,Y
XXXYYYInMonth
XXX=1st-5th, YYY=SUN-SAT
[2ndTUEInMonth]
Yes
D,K,M,Y
XXXYYYInNextMonth
XXX=1st-5th, YYY=SUN-SAT
[3rdMonInNextMonth]
Yes
D,K,M,Y
XXXDayInMonth
XXX=1st-31st
[10thDayInMonth]
Yes
D,K,M,Y
XXXDayInNextMonth
XXX=1st-31st
[5thDayInNextMonth]
Yes
D,K,M,Y
FIRSTDAYINMONTH
First day in month
1/1/04
Yes
D,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
LASTDAYINMONTH
Last day in current month
1/31/04
Yes
D,M
FIRSTDAYINQTR
First day in month
1/1/04
Yes
Q
LASTDAYINQTR
Last day in current quarter
1/31/04
Yes
Q
FIRSTDAYINYEAR
First day in year
1/1/04
Yes
Y
LASTDAYINYEAR
Last day in year
12/31/04
Yes
Y


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

 Parameter Macro


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


Macro
Description
Example
PARAMETER NAME
Bursting Parameter Value
If 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

Function
Parameters
Description
Example
@first
(variable) or (variable,n) where n = # chars
Extract first (n) chars from a variable
[@first(city)]

[@first(product,3)]

@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)]


Macro Concatenation


Pass the result of one macro to another.


Example


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 -.


[@first(date,5)]~[@rpl(date,/,-)]


Macro Concatenation Character


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


See Also


Using System Macros

Using Extra Columns