What does CalculatedFields do?

CalculatedFields PLVD turns named items in Adobe Illustrator and InDesign into spreadsheet-style calculated fields. Use it to update dates, revision numbers, filenames, prices and other repeated information across a document.
The item’s name holds the formula. Name a text frame =TODAY(), run the script, and today’s date is written into the frame. Values update when you run the script, rather than recalculating live.
Examples
| Item name | Result |
|---|---|
=TODAY() |
Writes today’s date. |
=UPPER(FILENAME) |
Writes the document’s filename in uppercase. |
=CONCATENATE("Rev ", ROUND(3.14159, 2)) |
Writes Rev 3.14. |
@Customer |
Reads the frame’s text as a variable named Customer. |
#Qty |
Reads the frame’s contents as a number named Qty. |
#Price=Qty*2.5 |
Calculates Price, writes it into the frame and makes it available to other formulas. |
=CONCATENATE(Customer, " owes ", Price) |
Combines the customer name and calculated price. |
Only items whose names start with =, @ or # are treated as fields. Ordinary unnamed items and items with other names are left alone.
Fields that work together
Use @Name for text variables and #Name for numeric variables. Other formulas can refer to these names. The script works out the evaluation order, so fields can depend on one another wherever they appear in the document.
Fields can also refer to themselves: #Counter=Counter+1 creates a counter that increases by one on each run, using its previous value.
Function names and argument order borrow from Excel, including UPPER, MID, IF, ROUND, TODAY and SUM. Formulas use JavaScript expressions; this is not a spreadsheet grid with cell references.
More than text
Formulas can also move or resize named items, change fill or stroke colors, and relink placed images. Functions such as SETBOUNDS, SETFILL and SETTOP act on existing items. You can read text files and delimited data with READFILE, LINE, LINECOUNT and COLUMN.
Requirements
- Adobe Illustrator or Adobe InDesign on macOS or Windows.
- PluginInstaller for installation and optional donations.
- A PluginInstaller Scripts Panel for the Adobe application you use. Scripts Panel OT supports Illustrator and InDesign; Scripts Panel NT is an alternative for InDesign.
Installing CalculatedFields PLVD
- Download, install and start PluginInstaller.
- Install the appropriate PluginInstaller Scripts Panel for Illustrator or InDesign if you have not already done so.
- Click this link to fetch CalculatedFields PLVD: CalculatedFields PLVD. Then click the Install… button, or click the … button to see all install options.
- Open the PluginInstaller Scripts Panel in Illustrator or InDesign. Select CalculatedFields.jsx to run the script.
Alternatively, you can install this software directly from PluginInstaller. Select Available Software, then scroll through the list and/or use the Search box to locate CalculatedFields PLVD.
No registered account is needed to install and use CalculatedFields PLVD.
Start with the sample files
Run Copy Sample Files to Desktop.jsx from the PluginInstaller Scripts Panel. In Illustrator, it creates a CalculatedFieldsSamples folder on your Desktop; open CalculatedFieldsSampleFile.ai there. In InDesign, it opens a business card sample, creating it from the bundled template the first time it runs for that InDesign version.
We recommend starting with these samples to learn how the fields work before building your own templates. Keep an unchanged copy for reference, then run CalculatedFields.jsx to update the fields. The business card example demonstrates stepping through contact data.
Custom functions
The editable CalculatedFieldsFunctions.jsx sidecar supplies built-in functions and is a template for adding your own. PluginInstaller supplies a user-editable copy; copy a function, rename it and adapt it. Keep a backup of your custom functions.
Rules and limits
- Run the script to update the whole document. Editing source data alone does not refresh the fields.
- Names are case-sensitive:
@Addressand@ADDRESSare different variables. - A failed formula writes
ERRORinto the frame. - Duplicate variable names stop the run with a dialog before anything is written.
- Formulas are evaluated as ExtendScript and can run code. Only run the script on documents whose field names you trust.
Build your templates gradually, test frequently and save a copy before running the script on important artwork.
Free to use — donations welcome
CalculatedFields PLVD is fully functional donationware. If it helps your work, you can support its development through PluginInstaller. Find CalculatedFields PLVD in Available Software and use the … menu to view donation options. Register an account if needed for the donation, and keep your unlock code in a safe place; a lost unlock code cannot be retrieved.