Update a field on every document that shares an ID
Change a value once, like a customer's address or an employee's status, and workflow copies it to every other document with the same ID, in every catalog. Uses global fields, the Global-Field Value Updated in the System trigger, and the Content - Update Shared Fields by Key Field action.
Before you begin
- Every related document carries the same ID, typed the same way, in one field
- Access to Administration > Global Fields and Administration > Workflow
When you're done, changing a value on one document, like a customer's address or a project's status, copies it to every other document with the same ID, in every catalog that uses the field.
How it works
Three pieces do the work, and all of them use global fields: fields defined once and shared by every document type that uses them.
- The ID is the key, like a customer number, employee ID, or project number. Documents that hold exactly the same ID belong together.
- The trigger Global-Field Value Updated in the System fires when someone changes a global field you choose, on any document type.
- The action Content - Update Shared Fields by Key Field finds every other document with the same ID and copies the global fields that changed in that save onto them.
Ideas: what people keep in sync
| When this changes on one document | Key field |
|---|---|
| A customer's address or phone number | Customer Number |
| An employee's last name or department | Employee ID |
| A project's manager | Project Number |
| A vendor's name, after a merger | Vendor ID |
| A client's account rep | Account Number |
| A legal hold on a matter | Matter Number |
| An employee's, project's, or contract's status, so the whole set can then move to another catalog (recipe) | Employee ID, Project Number, or Contract Number |
Before you start
- One ID, typed the same way everywhere.
C-1042andC1042are different values, so a document with the second one won't be updated. - A test record. Two or three documents of different types that share a made-up ID.
Matching is by exact value. Before you rely on the rule, search for a few real IDs and check that every related document comes back.
Set up the global fields
Global fields are covered in Set up catalogs, fields, and document types. You need one for the ID and one for each value you want to keep in sync.
Go to Administration > Global Fields and click Add Field. Enter a Name:, like
Customer Number, choose a Type:, and click Create. For a value with a fixed list, like a status, turn on Create drop-down from choices. and enter the choices under Field Entry Choices, one per line.
In Administration > Catalogs & Document Types, select a document type and click Fields.
- If the type already has the field, open it, turn on Use Global Field, and pick the global field under Global Field:. Its existing values stay with it.
- Otherwise click Add Field, turn on Use Global Field, and pick the global field.
Repeat step 2 for every document type, in every catalog, whose documents should stay in sync.
Build the trigger
Go to Administration > Workflow, click Triggers, then New Trigger.
Type:
Content Field ValuesandGlobal-Field Value Updated in the System. Trigger Name:Mailing Address changed.
Field: the field people will change, like
Mailing Address.
Field Evaluation:
No Field Evaluationto react to any change. To react only to one value, likeClosed, chooseSelected Field Value(s)and pick it.
Leave User Evaluation: at
All Users and Groupsand click Save.
Build the action
Click Actions, then New Action.
Type:
Content - Update Shared Fields by Key Field. Action Name:Update the customer's documents.
Key Field: the ID field, like
Customer Number. Click Save.
Wire the rule
Click Rules, then New Rule. Rule Name:
Address changed → update the customer's documents. Leave Enabled checked.
Add Trigger:
Mailing Address changed. Add Action:Update the customer's documents. Click Apply.
To keep several fields in sync, like an address and a phone number, check Use Multiple Triggers on the rule, set Combine Method to OR, and add a trigger for each field.
Content - Update Shared Fields by Key Field is only offered when the rule's trigger covers the whole system rather than one catalog or document type, like Global-Field Value Updated in the System. If it's missing from Add Action, check the rule's trigger.
Test it
Open one of your test documents, change the watched field, and save. Change nothing else in the same save.
Open the other test documents.
What you should see: the new value on every test document that shares the ID, whatever its catalog or document type.
Things to know
| Situation | What happens |
|---|---|
| Someone changes two global fields in the same save | Both are copied, not only the one the trigger watches |
| A related document's ID is typed differently | It isn't updated |
| A related document's type doesn't use the global field | That field is skipped on that document |
| The ID itself is changed | Documents with the old ID aren't found, so nothing changes on them |
| Another rule watches the copied field | It doesn't fire for the documents this action updates. Only the document someone saved starts workflow. The move recipe shows how a scheduled rule picks up the rest |
| The rule uses a scheduled or capture trigger instead | Nothing is reported as changed, so the action copies every global field on the document, not just one. Stick to Global-Field Value Updated in the System unless that's what you want |
Still stuck?
If nothing updates, check that the field you changed is a global field, that the trigger watches that field, and that the IDs match exactly. Still stuck? Contact support with the rule name, the ID you tested, and the names of one document that updated and one that didn't.
