melonly logomelonly logo
melonly logo
Dashboard
Log in

Record Mappings

How matchers connect record templates so Search fill, Run, Record Search, charge totals and unique fields work.

What are Record Mappings?

Matchers tell the CAD that two fields hold the same kind of data, even when their labels differ. A "First Name" field and a "Given Name" field only link if both use the matcher first_name. You set matchers on fields in the Template Editor.

Matchers power Search fill, Run, Record Search, unique checks and charge totals. Leave the matcher blank on fields that don't need any of these.

There are two kinds:

KindSet onExample
Field matcherThe field itselffirst_name, veh_plate, sex
Option matcherEach choice on a Select, Multiple Choice or Checkboxes fieldmale, female and other on a Sex field

A matcher can only use lowercase letters and underscores, up to 64 characters. Searches and unique checks ignore letter case.

Search Fill

Search fill on a Standard section finds a record, then copies its data into the section.

  1. Find the Record

    Officers search using the sources you turned on for that section. You can turn on more than one.

  2. Copy Every Shared Matcher

    The CAD copies every field on the found record whose matcher also exists in this section. Searching a civilian by name can fill sex, phone number and address too, not just the name.

SourceOfficers search by
CivilianFirst name, last name and date of birth (plus middle initial and alias, if the template has them)
VehiclePlate
LicenceLicence number
Custom searchThe fields on one of your search indices
Record IDThe record's number

Copying skips fields with no matcher, read-only fields and supervisor-only fields unless the author is a supervisor. Values are fitted to the destination's input mask, and can move between field types, for example a date into a text field.

Matching Choices

When the destination is a choice field, the CAD first picks the option with the same option matcher. If none match, it falls back to the option with the same label, ignoring case.

Built-in Matchers

The CAD recognizes these matchers. You can make up your own, like phone_number or case_number, for anything else. Some types need certain matchers before they'll save. See Required fields.

Option Matchers

Each choice on a choice field has its own matcher box next to its label. Use option matchers when two templates word the same choice differently, or when the CAD needs to pick a choice for you.

Field matcherOption matchersSelected when
sexmale, female, otherSearch fill copies sex between records
licence_statusvalid, suspended, expiredThe licence is in that state
charges_held_for_bondyes, noAny charge on the record holds for bond, or none do

Flags

Tick the flag box on a choice to show its label as a red alert whenever that choice is picked. Runs play the flag tone, and on the Police panel the alert is sent to dispatch. A common setup is a Flags field with options like Armed or Violent marked as flags. See Alerts and Warnings.

Charge Matchers

Put these on fields in a Standard section to show totals from the charges on the same record. The CAD fills them in and locks them. The record still needs a Charges section.

MatcherShows
charges_fine_subtotalFines before surcharges
charges_fine_totalFines including surcharges
charges_pointsTotal licence points
charges_jail_totalTotal jail days
charges_bondBond owed
charges_held_for_bondWhether any charge holds for bond: Yes or No as text, 1 or 0 as a number or a choice with yes and no option matchers
charges_surcharge_ + nameOne surcharge's amount: add the surcharge's abbreviation, name or ID in lowercase, like charges_surcharge_cc

Text fields show money with your currency symbol and jail as days.

Traffic and speeding charges also apply their points and suspensions to the licence whose number is in a licence_number field on the same record.

Unique Fields

Text, text area, number, date, time and random fields can be unique.

Unique typeRule
Not UniqueNo check
LocalNo other record can reuse the value in this field
GlobalNo other record can reuse the value in any field with the same matcher

Use Global on licence_number and veh_plate so plates and licence numbers stay unique across your CAD. Only Random fields can be both unique and read-only.

Search Indices and Dependencies

Search indices search records by your own matchers, like phone_number. Each one adds a Record Search tab and a Search fill source. Run doesn't use them. A match still copies every shared matcher, not just the ones you searched by.

Fields hidden by a dependency don't count toward required matchers, so keep identity fields like first_name and veh_plate in sections that are always visible.

Need help?

Still have questions? Join our Discord server for support from the Melonly Team.