Build a reference number from other fields
Combine two fields into one — vendor code plus invoice number into a single reference, say — the moment a document is filed, with a Content Capture trigger and a Merge Field Values action, so the combined value exists for searches, file names, and exports without anyone typing it.
Before you begin
- The document type has the two source fields and a text field to hold the result
When you're done, every newly filed document gets a reference field filled from two other fields — ACME-10442 from a vendor code and an invoice number — automatically, consistently, and searchable the moment it exists.
- Trigger
- Content Capture › Content Captured in this Document TypeField Evaluation: Selected Field Has Value · Field: Invoice Number
- Action
- Content - Merge Field ValuesField to Match: Vendor Code · Field to Merge: Invoice Number · Separator Character: - · result written to the merge field
- Rule
- "Filed with invoice number → build reference", enabled
Build the trigger
Go to Administration > Catalogs & Document Types, pick the Catalog and Document Type, click the Workflow tile, then Triggers > New Trigger.
Type:
Content CaptureandContent Captured in this Document Type. Trigger Name:Filed with an invoice number.
Field Evaluation:
Selected Field Has Value, Field: the invoice number field — no point merging an empty value.
Click Save.
Build the action
Click Actions > New Action. Type:
Content - Merge Field Values. Action Name:Build reference number.
Set Field to Match to the first source field and Field to Merge to the second. The lists only offer fields of this document type; the second list hides whatever you chose in the first.
Separator Character: choose how the two values are joined — a single character such as
-, a space, or no separator.
Click Save.
Check which field receives the merged result on the action form before saving — the form names it explicitly. If your document type doesn't yet have a field for the result, add a text field under the Fields tile first, then come back.
Wire the rule
Click Rules > New Rule. Rule Name:
Filed with invoice number → build reference.
Add Trigger:
Filed with an invoice number. Add Action:Build reference number. Apply.
Test it
File one document with a vendor code and an invoice number.
Open its properties.
What you should see: the reference field holding the two values joined by your separator, and the rule in View History. Search for the combined value to confirm it's indexed.
Variations
| Want this instead | Change this |
|---|---|
| Rebuild the reference if someone edits either source field | Two Content Field Values › Field Value Updated in this Document Type triggers (one per source field), each in a rule with the same action |
| Use the reference in the stored file name or folder | That's the document type's own naming rules: Folder and file building |
| Write a fixed prefix instead of a second field | Content - Update Field with the literal value into the reference field first, then merge |
| Combine global fields shared across types | Content - Combine Global-Field Values |
| Produce a start–end range string from two numbers | Content - Calculate Field-Value Range |
| A summary of every field's name and value in a memo field | Content - Create Field Name and Value Summary |
