A field required when another holds a value
The customer asks: A field must be filled when another field holds a value
- Verdict: Ready, with limits (2)
- Door: Save rules · area: Documents and print › Numbering and checks on save
- Recipe: Save rules
- Sample: none yet
- Checked: carried 2026-10-16 · not re-run
What you build
A save rule of kind required when, held on every save: Desk, imports and API writes. (The retailer's own mandatory depends on is checked in the Desk form only.) From POS build 2.0.0.654 a rule on a table's rows may read its record: on Stock Entry, items.material_request is required when parent.purpose = Material Transfer (contracts/pages/save_rules.md §8).
Limits
- On a till sale and the till close a save rule only flags, never refuses.
- A row rule is refused with the row's number, "Row 2: Material Request is required."; the record's own fields only, through
parent..
Tell the customer
The record cannot be saved without the field when the other holds a value.
What next
- Tell the customer the 2 limits above, and write them into the proposal.
- Start from: Save rules.
- Build and test it on your sandbox (request one if you have none; what is on it).
- Run the checks: your own tests, the kit's checks and the money kit's release gate (the release gate).
- Release through the customer's own release gate (The customer's release gate); an app other retailers install goes through the App library.
Related needs
- A code must follow our pattern — Ready, with limits (1)
- A field filled in from other fields when the record is saved — Ready, with limits (3)
- Fields cannot be changed once the document is approved — Ready, with limits (1)
- The same item or code may not appear twice in one document — Ready, with limits (1)
Start a project shortlist with this need · Put it in your blueprint · Every need