A value unique across all records
The customer asks: A tax number on one customer only
- Verdict: Ready, with limits (5)
- Door: Save rules · area: Setup and administration › Roles, lists and data rules
- Recipe: Save rules: one tax id per customer group, and a submit kept for a role
- Sample: none yet
- Checked: run on a sandbox 2026-10-21 · POS 2.0.0.656 (a second customer with the same tax id refused in its group, saved in another)
What you build
A save rule of kind unique across: the value of one field is on no other active record of the type, within up to three scope fields (for example the customer group, or the company). It holds on every save: Desk, import and the API. The recipe's manifest installs one: one customer per tax id per customer group.
Limits
- On a table above 10,000 records, the field must be indexed.
- It is a rule, not a database constraint: two saves at the same moment can both pass.
- A cancelled record holds no value; a disabled one still does; an empty value passes; the comparison follows the database's case rules.
- It checks the record itself, never a table's rows (card no-value-twice-in-lines does that).
- On a till sale and the till close a save rule only flags, never refuses.
Tell the customer
A customer's tax number can be held on one active customer only (or one per customer group); a second one is refused when it is saved.
What next
- Tell the customer the 5 limits above, and write them into the proposal.
- Follow the recipe: Save rules: one tax id per customer group, and a submit kept for a role.
- 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 cashier creating a customer whose mobile number is already on another one gets the existing customer, not a duplicate — Ready, with limits (4)
- No more than so many manager discount approvals per store per day — Ready, with limits (5)
- Only the receiving store receives a transfer; only a supervisor cancels it — Ready, with limits (4)
- Refuse a batch whose remaining shelf life is below our minimum, unless a named role accepts it — Ready, with limits (4)
Start a project shortlist with this need · Put it in your blueprint · Every need