Finding the Right Variable

The topics under Variable Replacement are grouped by family. This topic is grouped by what you are trying to do instead. Scan the heading that matches your goal, read the one-line descriptions, and follow the link to the family topic for the full list and syntax.

Variables go inside square brackets and are replaced with live values when the action runs. [Field] reads a field on the active record and [<Field>] reads the same field on the alternate record. Functions take their arguments separated by the pipe character, as in [IF(val1|=|val2|yes|no)], and can be nested. The full rules are in Variable Replacement, and you can try any expression against a real record in Variable Testing before putting it in an action. For the action that does the work once you have the value, see Finding the Right Action. If you are not sure which heading fits, the administrator version of the AI Help Assistant (Ask DoM) will take a plain-language description of what you want and point you at the variable by name.

Read a value from the current record

Use Record Variables for anything about the record itself: [FIELD(name)] when the field name has to be built dynamically, [RECORDID], [RECORDCREATEDATE], [RECORDNOTES], [HASVALUE(...)], [FIELDCOUNT(name)] for repeated fields, [EFORMDATA(name)] to read a value from an E-form document on the record, and [DATAHISTORY(...)] to read what a field used to hold.

Read a value from another record

  • [<Field>] reads the alternate record and [NAMEDRECDATA(Name|Field)] reads a named record. Both are in Workflow Variables.
  • [DMGET(...)], [DMGET2(...)], and [DMGETPROP(...)] search a Record Type by field values and return a field from the first match, without any action at all. [DMGETIN(...)] returns a list. See DMGET Variables.
  • [GETRECORDID(...)] returns the ID of the first record matching a search, and [UNIQUEDATA(...)] returns the distinct values a field holds across a Record Type. See Record Variables and Advanced Variables.

Read documents

Document Variables cover names, IDs, counts, sizes, pages, dates, and notes: [DOCUMENTNAME], [DOCUMENTID], [DOCCOUNT(...)], [DOCIDS(...)], [DOCUMENTTEXT] for the OCR text, [DOCLINE(...)] to find a line of text, [DOCDATA(name)] for data stored on the document, [DATAANNO(...)] for the value of a data tag annotation, [MISSINGDOCS] and [REQUIREDDOCS] for the required documents list, and [DOCUMENTBINARY64] for the file content itself.

For text at a position on a page, or the coordinates of matching text or a barcode, use [OCRDATA(...)], [COORDS(...)], [OCRCOORDS(...)], [BARCODEDATA(...)], and [MATCHLINES(...)] in Advanced Variables.

Read line items and tables

  • [LI(#|Field)] reads one line item field, [LINEITEMS(...)] returns all of them, [LICOUNT(...)] counts them with an optional filter, [LINENUM(...)] finds the line holding a value, and [LITOTALDIFF(...)] compares the line total with the header amount. See Line Item Variables.
  • [TABLE(name|row|column)], [TABLEROWCOUNT(...)], [FINDTABLE(...)], and [TABLETOHTML(...)] read E-form tables. See Table Variables.

Change text

String Variables is the largest family. The ones used most: [UPPER], [LOWER], [PROPERCASE], [TRIM], [LEFT], [RIGHT], [SUBSTRING], [LEN], [REPLACE], [REPLACEALL], [SPLIT] to take one piece of a delimited value, [JOIN], [PAD], [INDEXOF], [REGEX] and [REGEXREPLACE] for pattern matching, [ALPHA], [ALPHANUM], and [DECIMAL] to strip unwanted characters, [CSVFORMAT] to quote a value for CSV, [URLENCODE], [GUID], [RANDOMSTRING], [DMCR] and [DMLF] for line breaks, and [FILENAME] and [FILEEXTENSION] to take a file path apart.

Do math

Number / Math Variables: [MATH(...)] evaluates an expression, [SUM], [AVG], [MIN], [MAX], and [COUNT] work over delimited lists or JSON, [ROUND], [ABS], [DIFF], [DEVIATION] for a percentage difference, [CLEANCUR] to turn a currency string into a number, [FORMAT(num|pattern)] to format one, [ISNUMBER], and [AUTONUM(name|start)] with its AUTONUMEXISTS, AUTONUMRESET, and AUTONUMDELETE companions for sequential numbering.

Work with dates

Date Variables: [DATE], [DATETIME], and their UTC forms for now, [DATEADD(date|Y|M|D|H|m|s)] to shift a date, [DATE(date|#|period|format)] to shift and format in one step, [FORMAT(date|pattern)], [CLEANDATE] to normalize whatever a user typed, [DATEFROMTERMS(terms|start)] for payment terms such as Net 30, [DIFF] between two dates, the parts [DAY], [MONTH], [YEAR], [DOW], [DOY], [MONTHSTART], [MONTHEND], [YEARSTART], [YEAREND], [ISDATE], and [EPOCH].

Make a decision

Logic Variables: [IF(val1|operator|val2|true|false)] compares two values, with B for between and L for a wildcard match, [CASE(val|match1|result1|match2|result2|else)] picks from several, [IFNULL(val|alt)] and [NOTNULL(val|pre|post)] handle blanks, [COALESCE] and [FIRSTVAL] take the first non-blank of a list, and [ISEMAILVALID] checks an address.

Know where you are in workflow

Workflow Variables give the current item's context: [WFTRIGGERNAME], [WFID], [WORKITEMID], [WFASSIGNEDNAME] and [WFASSIGNEDEMAIL], [WFMGRNAME] and [WFMGREMAIL], [WFDUEDATE], [WFNOTE], [WFUSERS(...)] for everyone assigned at a trigger, [WICOUNT(...)] for open items, [WIDATA(name)] for values stored on the work item, and [RECORDLINK], [DOCLINK], and [WFLINK] for links you can put in an email.

Users and teams

User / Team Variables: [USERNAME], [USERFULLNAME], [USEREMAIL], [USERMANAGER] and the other USER fields for the current user, [USER(username|prop)] for any user, [INTEAM(team|yes|no)] to test membership, [TEAMEMAILS(name)], [TEAMS(...)], and the OOO functions to find who is covering for an out-of-office user.

Work with JSON and REST responses

JSON Variables: [PROP(json|property)] reads one property, [JSONWHERE], [JSONSORT], and [JSONUNIQUE] filter and order arrays, and [JSONRECORD] and [JSONRECORDOBJ(...)] turn the record into JSON for a REST body. [RESTGET(url)] fetches a URL inline without an action. See also Advanced Variables.

System and server values

Server Variables: [SERVERURL], [SERVERDATA(name)] for values stored by Server Field Update, [FIELDOPTIONS(RecordType|Field)] for a field's dropdown options, [ERRORCOUNT], [CRONDESC] to describe a schedule, and the System_ organization and branding values. Values set up under Custom Variables in Admin are in Custom Variables. AI Variables report token usage and limits. Portal package links and passwords are in Collaboration Variables, and requester details for assets in Asset Tracking Variables.

Fields that change how the system treats a record

These are not functions but field names beginning with @ that you add to a record's data: @RECORDLOCK, @OCR, @INDEX, @SPLIT, @MERGE, @NOTIFY, the retention holds @OFFLINEHOLD, @DELETEHOLD, @PURGEHOLD, @ROUTEHOLD, and @ALLHOLD, @REQUIREDDOCUMENT, and the OCR controls @OCRMODE, @OCRFIRSTNPAGES, and @OCRLASTNPAGES. See Special Data Variables.