Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
Overview
This guide explains how to migrate from hardcoded enums to organization-scoped picklists using the PF-15 Picklist System.Why Migrate?
- Organization customization: Each org can customize values
- Admin UI management: Non-developers can add/edit options
- Color coding: Items can have associated colors for UI display
- Soft-delete: Items can be deactivated without breaking existing data
Migration Steps
1. Identify Enum Usage
Find all places where you’re using hardcoded enums:2. Create Picklist (Admin or Migration)
Either create via Admin UI or database migration:3. Use Backward-Compatible Hook
During migration, useusePicklistByEnum for backward compatibility:
4. Use PicklistSelector in Forms
Seeded Picklists
The following system picklists are automatically seeded:| Category | Picklists |
|---|---|
| HR | employment_status, employment_type, leave_type, leave_request_status, fmla_case_type, fmla_case_status, assignment_status, assignment_type |
| FA | fa_customer_type, fa_bill_status, fa_invoice_status, fa_po_status, fa_budget_status, fa_budget_version_type, fa_journal_entry_status, account_type, account_status, fund_type, fa_payment_method, payment_terms |
| Platform | document_category, document_status, priority_levels, status_general |
| FW | form_status, automation_status, trigger_type, action_type |
Best Practices
- Always use
usePicklistByEnumduring migration for backward compatibility - Mark system picklists with
is_system: trueto prevent accidental deletion - Use semantic picklist names that match the database enum names
- Include colors in metadata for status-type picklists