Picklist Fields

This page explains how to use the Options and Data Source data types.

Overview

Affinda’s data-mapping capability lets you normalise extracted values against your own lists, giving you cleaner data and fewer downstream corrections.

When to choose each type

ScenarioOptionsData Source
Data typeShort, fixed list (≈ 50 values or fewer)Larger, often two-dimensional data source from user's downstream system
Value prediction mechanismModel predicts the value directlyRaw data from document mapped via string match

Options

A field whose Data Type is set to Options stores a single column of permitted values. Enter the items directly in the field editor. Any value outside this list is flagged during validation.

Good practice

  • Keep the list concise.
  • Use consistent casing.
  • Review periodically to remove unused terms.

Data Sources

Data Sources act as lightweight master-data tables that you can manage from within Affinda. They accept CSV, XLSX or JSON, making them suitable for anything from supplier registers to nested product catalogues.

Creating a Data Source

  1. Upload a CSV, XLSX or JSON file.
  2. Pick the Key Column — the unique identifier for each row.
  3. Pick the Label Column — the human-readable field shown in the validation interface.
  4. Click Save. The system assigns an ID you can reference via API.
  5. Use Replace Data to overwrite rows later without changing the ID.

Automating updates

Call PUT /data-sources/{id} for full replacement or PATCH /data-sources/{id} for incremental updates. Schedule these calls from your integration.

Mapping document fields

Matching Criteria dialog
  1. Open the field, then Data Source → Configure Matching Criteria.
  2. Choose the Document Field to match (e.g. Employer Name).
  3. Pick the Data Source Property (e.g. Employer Name).
  4. Select Match Type:
    • Exact – matches only when strings are identical.
    • Partial – succeeds when the extracted string appears anywhere in the candidate.
    • Fuzzy – uses edit-distance logic to allow minor typos.
  5. Tick Required if validation should fail when nothing matches for this criteria.

Tips for reliable matching

  • Trim whitespace and normalise case in your source files.
  • Ensure the key column is unique.
  • Keep label strings short so they fit comfortably in the UI.

API reference

GET    /data-sources                # List
POST   /data-sources                # Create
PUT    /data-sources/{id}           # Replace all rows
PATCH  /data-sources/{id}           # Update selected rows
DELETE /data-sources/{id}           # Delete