How to Use the Variable Link Function Feature

This article describes the various Functions available for DesignMerge Text Variable Links. When a Function has been specified for a Variable Link, the data to be imported is calculated by DesignMerge (rather than read from a data field). For example, the function Date will pull in the current date in the format MM/DD/YYYY.

SELECTING A FUNCTION

To use this feature, start by creating a DesignMerge Text Variable Link, and then use the Function dropdown menu to select the function you would like to use for the link. Notice that after you have selected a function, you will see an 'F' character next to the Variable Link name in the list, indicating that a function has been assigned to this link. Notice also that the Field dropdown menu has been dimmed, indicating that data will be calculated automatically by the function rather than being read from a specific data field.

FUNCTION DESCRIPTIONS

Please see the list below for more details about each available Function.

Function Description
Consecutive Number

This function can be used to create a consecutive number in a document that does not already include such a number in a data field. When a Variable Link utilizing this function is placed in the document, you will be prompted to enter various consecutive number parameters at the start of the merge (starting number, pad amount, etc.)

Date

Calculates the current date in the format MM/DD/YYYY.

Example: '12/25/2022' represents December 25, 2022

Date Long

Calculates the current date in the format Month DD, YYYY. Note that the Month will be in the English language only. If you are trying to put together a localized date string, please see the Month Name, Day, and Year Long functions.

Example: 'December 25, 2022' would be the Date function equivalent of 12/25/2022.

Day

NEW - Calculates the current day of the month as 1 or 2 digits in the format D or DD.

Example: '3' represends the 3rd day of the month, and '27' represents the 27th day of the current month.
Document Name

This is the full filename (including filename extension) of the document being processed.

Example: 'mydocument.indd' would be the name of the InDesign document where the link has been placed.

Job Count

This is the TOTAL number of Jobs processed for the entire merge session.

Example: Given a 4-page starting document, and a data file containing 5,000 records:

If the Page Sets per Job value is set to All, this means that all of the pages will be placed into a single output file containing all 5,000 records (20,000 pages). In such case the value for Job Count would be '1' since only a single output job was produced.

If the Page Sets per Job value is set to 1,000, then this would result in the creation of 5 separate jobs/chunks, each containing 1,000 records of data (4,000 pages). In such case the value for Job Count would be '5' since five separate output jobs were produced.

Usage with Job Number Function: This function can be used in conjunction with the Job Number function to produce data in the format "Job X of Y", where X is replaced with a link that utilizes the Job Number function, and Y is replaced with a link utilizing the Job Count function.

Job Number

This is the CURRENT Job Number being processed. This value will always be '1' if you specify a Page Sets per Job value of All. If you use the Page Sets per Job feature to break up the variable data output into a series of Job files, this function will return the number of the job that is currently being processed.

Example: Given a 4-page starting document, and a data file containing 5,000 records:

If the Page Sets per Job value is set to All, this means that all of the pages will be placed into a single output file containing all 5,000 records (20,000 pages). In such case the value for Job Number would always be '1' since only a single output job was produced.

If the Page Sets per Job value is set to 1,000, this would result in the creation of 5 separate jobs/chunks, each containing 1,000 records of data (4,000 pages). In such case the value for Job Number value would be 1,2,3,4 or 5, depending upon which job/chunk was being processed at the time the link was merged.

Usage with Job Count Total Function: This function can be used in conjunction with the Job Count Total function to produce data in the format "Job X of Y", where X is replaced with a link that utilizes the Job Number function, and Y is replaced with a link utilizing the Job Count Total function.

Usage for Single PDF Files: This function is useful as a job counter when producing individual PDF files where the Record Number function is not appropriate (such as when producing individual PDF files of multi-up documents). For example, you can create a Filename Control Frame to uniquely name each PDF file, and enter the text "Filename_NNN.pdf" where a Variable Link using the Job Number function is assigned to the NNN portion of the text. This results in an incremental number for each individual PDF that is produced (e.g. Filename_1.pdf, Filename_2.pdf, Filename_3.pdf, etc.)

Job Sheet Counter

This function generates a sequential page number that counts each page in the job chunk being processed (as set by the Page Sets per Job value). This value starts with 1 and counts the number of printed sheets in an individual job chunk, adjusting the value for omitted pages. The value resets to 1 for each new job chunk that is processed. If you would like the value to count all sheets for all records, please set Page Sets per Job to All, or see the Sheet Counter function below.

Example: If the original document (page set) contains 4 pages, the first set of pages are numbered 1-4, second set of pages are numbered 5-9, etc. Once all of the pages for the job chunk have been produced, the counter will reset to 1 for the next job chunk to be processed.

Month

Provides the current month as 1 or 2 digits in the format M or MM.

Example: '6' represents the Month Long function equivalent of June and '10' represents the Month Long function equivalent of October

Month Name

Provides the name of the current month, localized for English, German, French and Italian (language choice is based on the Adobe InDesign version in use). For all other languages the month name will be in the English language only.

Example: 'June' represents the Month function equivalent of '06'.

NOTE FOR GERMAN, FRENCH AND ITALIAN USERS: The month names are generated by this function using unicode characters in UTF-8 format. As such, please be sure that the data file you are processing is also saved in UTF-8 format. If not, you may see strange characters generated in the month names that contain accented characters. As an example, the German month of March may appear as März instead of März. Converting your data file to UTF-8 format is all that is required to fix this issue.

Page Count

Number of pages in the page set being processed. This value is adjusted automatically for omitted pages.

Example: If the original document contained 4 pages at the start of the merge, then this value will be '4'. However, if for any given record a single page were omitted (via a Page Rule using the Omit Page from Print action), then this value would be '3' for the record being processed.

Usage with Page Number Function: This function can be used in conjunction with the Page Number function to construct strings in the format "Page X of N", where X would be replaced with a Variable Link using the Page Number and N would be replaced with a Variable Link using the Page Count function.

Page Name

This is the name of the page where the link has been placed in the document. Adobe InDesign allows the user to adjust the formatting of a page number in the Numbering & Section options. This value will be the page name derived using these settings. Please note that unlike the Page Number function, the Page Name value will NOT be adjusted automatically for omitted pages.

Example: If the user has specified Style: A,B,C,D... in the Numbering & Section options of Adobe InDesign, when the 3rd page of a 4-page document is processed the value generated by this function would be 'C'.

NOTE: This function may not work properly if the link that references the function is placed onto an InDesign Parent Page (formerly known as a Master Page). Please place any links that utilize this function onto the live document area to ensure proper behavior.

Page Number

This is the number of the page where the link has been placed in the document. This value is adjusted automatically for omitted pages.

Example: If the original document contained 4 pages at the start of the merge, and the link utilizing this function were placed on the last page, then this value would be '4'. However, if for any given record, two pages were omitted (via a Page Rule using the Omit Page from Print action), then this value would be '2' for the record being processed.

NOTE: This function may not work properly if the link that references the function is placed onto an InDesign Parent Page (formerly known as a Master Page). Please place any links that utilize this function onto the live document area to ensure proper behavior.

Read 2D Barcode Data

This function is designed to read the data stored with the 2D bar code frame where the variable link is assigned. This function will work only with 2D Barcode frames created using the 2D Barcode Module. The data is presumed to be a template or other text that contains Embedded Link references. The Embedded Link references will be swapped with data taken from the current record being processed, and the resulting data will then be encoded as a new 2D bar code, replacing whatever code exists in the frame. If the function is assigned to any frame that is not a 2D bar code frame, then an error message will be presented before the merge process begins.

Example: The user has created a static 2D bar code with the data as shown below. Note: the data in this example was selected using the vCard template. Only the First and Last names are being encoded in this vCard example.

To make this a variable QR Code, the user creates a variable link and selects the Read 2D Barcode Data function for the link. Then, the variable link is assigned to the 2D barcode frame to make it variable.

During the merge process, in the above example the entire data string will be read from the 2D bar code frame. Next, the values for <$Last> and <$First> will be swapped with data values read from the First and Last variable links. Once the data has been swapped, the entire string will be encoded as a new 2D bar code, replacing the code currently in the frame.

Please visit the Embedded Link page on this site for more details about how to use this feature. You may also wish to reference the vCard Page on this site for specific details about this and other QR Code formats.

Record Number

This is the current record number being processed for the link. The record number will be adjusted for the sequence number assigned to the link (to support multi-up applications).

Example: If the current record being processed is number 24, then the value generated would be '24' (assuming a sequence number of 1). If the sequence number assigned to the same link were '6', then the resulting record number value would be

Sheet Counter

This function generates a sequential page number that counts each page in the entire run (all job chunks). This value starts with 1 and counts the number of printed sheets across the entire job run, adjusting the value for omitted pages. The value does not reset to 1 for each new job chunk that is processed. If you would like the value to reset for each job chunk being processed, please see the Job Sheet Counter function above.

Example: If the original document (page set) contains 4 pages, the first set of pages are numbered 1-4, second set of pages are numbered 5-9, etc. The sheet number will continue to increment across all processed pages, even if the job is split across multiple job chunks. If pages are omitted from printing via a rule they will not be counted.

Time Stamp

Current time when link was processed. The data provided by this function will be potentially different for each link that is processed because the function will reflect the time when the link was processed. This is different from the Time function as the value reflects the exact time when the data was processed and the data includes the seconds value for more precision. Data is formatted as Military time HH:MM:SS.

Example: '07:34:22' is 7:34 AM and 22 seconds, and '14:17:34' is 2:17:34 PM and 34 seconds.

Time Start (formerly Time)

Current time at the start of the job. The data provided by this function will be the same for the entire job. Data is formatted as Military time HH:MM.

Example: '07:34' is 7:34 AM and '14:17' is 2:17 PM.

Year

Calculates the current year as 2 digits in the format YY.

Example: '22' represents the year 2022

Year Long

Calculates the current year as 4 digits in the format YYYY.

Example: '2023' represents the year 2023