Field Type Decision Tree Interactive guide for choosing the right ObjectStack field type — decision flowchart, quick-reference table, and use case mapping
Not sure which field type to use? Follow this decision tree to find the right type for your data, then check the quick-reference table for details.
Full Details: Once you've identified the right type, see the Field Type Gallery for complete configuration properties.
flowchart TD
START([What kind of data?]) --> TEXT{Text?}
START --> NUM{Number?}
START --> DATE{Date / Time?}
START --> CHOICE{Choice / Selection?}
START --> REL{Relationship?}
START --> FILE{File / Media?}
START --> COMP{Computed?}
START --> STRUCT{Structured Data?}
START --> AI{AI / ML?}
%% Text branch
TEXT -->|Short text| T1[text]
TEXT -->|Long text| T2[textarea]
TEXT -->|Rich formatting| T3[richtext]
TEXT -->|Markdown content| T4[markdown]
TEXT -->|Email address| T5[email]
TEXT -->|Website URL| T6[url]
TEXT -->|Phone number| T7[phone]
TEXT -->|Secret value| T8[password]
%% Number branch
NUM -->|Any number| N1[number]
NUM -->|Money amount| N3[currency]
NUM -->|Percentage| N4[percent]
NUM -->|Star rating| N5[rating]
NUM -->|Slider input| N6[slider]
%% Date branch
DATE -->|Date only| D1[date]
DATE -->|Date + time| D2[datetime]
DATE -->|Time only| D3[time]
%% Choice branch
CHOICE -->|Single choice, dropdown| C1[select]
CHOICE -->|Multiple choices| C2[multiselect]
CHOICE -->|Single choice, visible| C3[radio]
CHOICE -->|Multiple, visible| C4[checkboxes]
CHOICE -->|On/off switch| C5[toggle]
CHOICE -->|True/false| C6[boolean]
%% Relationship branch
REL -->|Reference another object| R1[lookup]
REL -->|Parent-child cascade| R2[master_detail]
REL -->|Self-referencing hierarchy| R3[tree]
%% File branch
FILE -->|Any file| F1[file]
FILE -->|Image with preview| F2[image]
FILE -->|User profile picture| F3[avatar]
%% Computed branch
COMP -->|Calculated value| K1[formula]
COMP -->|Aggregate children| K2[summary]
COMP -->|Auto-incrementing ID| K3[autonumber]
%% Structured branch
STRUCT -->|Postal address| S1[address]
STRUCT -->|GPS coordinates| S2[location]
STRUCT -->|Color picker| S3[color]
STRUCT -->|Arbitrary JSON| S4[json]
STRUCT -->|Sensitive secret value| S5[secret]
%% AI branch
AI -->|Vector embedding for semantic search| A1[vector]
style START fill:#4f46e5,color:#fff
style T1 fill:#059669,color:#fff
style T2 fill:#059669,color:#fff
style T3 fill:#059669,color:#fff
style T4 fill:#059669,color:#fff
style T5 fill:#059669,color:#fff
style T6 fill:#059669,color:#fff
style T7 fill:#059669,color:#fff
style T8 fill:#059669,color:#fff
style N1 fill:#d97706,color:#fff
style N3 fill:#d97706,color:#fff
style N4 fill:#d97706,color:#fff
style N5 fill:#d97706,color:#fff
style N6 fill:#d97706,color:#fff
style D1 fill:#7c3aed,color:#fff
style D2 fill:#7c3aed,color:#fff
style D3 fill:#7c3aed,color:#fff
style C1 fill:#dc2626,color:#fff
style C2 fill:#dc2626,color:#fff
style C3 fill:#dc2626,color:#fff
style C4 fill:#dc2626,color:#fff
style C5 fill:#dc2626,color:#fff
style C6 fill:#dc2626,color:#fff
style R1 fill:#0284c7,color:#fff
style R2 fill:#0284c7,color:#fff
style R3 fill:#0284c7,color:#fff
style F1 fill:#be185d,color:#fff
style F2 fill:#be185d,color:#fff
style F3 fill:#be185d,color:#fff
style K1 fill:#78716c,color:#fff
style K2 fill:#78716c,color:#fff
style K3 fill:#78716c,color:#fff
style S1 fill:#0d9488,color:#fff
style S2 fill:#0d9488,color:#fff
style S3 fill:#0d9488,color:#fff
style S4 fill:#0d9488,color:#fff
style S5 fill:#0d9488,color:#fff
style A1 fill:#6d28d9,color:#fff
Type Use When Example textShort single-line input (names, titles) first_name, titletextareaMulti-line content without formatting description, notesrichtextFormatted content with HTML/WYSIWYG article_body, biomarkdownDeveloper-friendly formatted content readme, documentationemailEmail address with validation email, contact_emailurlWeb URL with validation website, linkedin_urlphonePhone number phone, mobilepasswordOne-way hashed credential (owned by auth subsystem) user_passwordsecretReversible encrypted-at-rest value, masked on read api_key, db_password
Type Use When Example numberAny numeric value (set precision/scale for decimals) price, weight, quantitycurrencyMoney amounts with currency code amount, total_pricepercentPercentage values, stored as fractions 0–1 (0.85 = 85%) completion, discountratingStar ratings (typically 1–5) satisfaction, difficultysliderNumeric value via slider UI volume, priority_level
Type Use When Example dateCalendar date without time birth_date, due_datedatetimeFull timestamp with timezone created_at, meeting_starttimeTime of day without date start_time, reminder_time
Type Use When Example selectPick one from a dropdown list status, categorymultiselectPick multiple from a dropdown tags, skillsradioPick one, all options visible priority, sizecheckboxesPick multiple, all visible features, permissionstoggleOn/off switch (UI-friendly boolean) is_active, notificationsbooleanProgrammatic true/false is_archived, email_verified
Type Use When Example lookupReference another object (soft link) assigned_to → usermaster_detailParent-child with cascade delete line_item → ordertreeSelf-referencing hierarchy category → category
lookup vs master_detail: Use lookup when the child can exist independently. Use master_detail when deleting the parent should delete all children (e.g., order → line items).
Type Use When Example fileFile upload (set multiple: true for many files) contract, documentsimageImage with preview/thumbnail product_photo, screenshotsavatarUser profile picture avatar, profile_photo
Type Use When Example formulaValue calculated from other fields full_name = first + lastsummaryRoll-up aggregate from child records total_amount = sum(items.price)autonumberAuto-incrementing display ID ticket_number: TICK-0001
Type Use When Example addressPostal address with components billing_address, locationlocationGPS coordinates (lat/lng) office_location, delivery_pointcolorHex color value with picker brand_color, label_colorjsonArbitrary structured data configuration, metadatacodeCode editor (JSON/SQL/JS) query_body, transform
Type Use When Example vectorHigh-dimensional embedding for similarity search (semantic search, RAG) content_embedding
Can't find your use case above? Check this table:
Use Case Recommended Type Why User's full name textShort, single-line, no validation needed Blog post body richtextNeeds formatting (bold, links, images) Product price currencyMoney needs currency code and decimal handling Task assignee lookupReferences a user record Invoice line items master_detailLines should cascade-delete with the invoice Department hierarchy treeSelf-referencing parent → child Feature flags jsonArbitrary key-value configuration User avatar imageSingle image with thumbnail support Support ticket ID autonumberAuto-incrementing human-readable identifier Total order value summaryRoll-up sum of child line item amounts Discount percentage percent0–100 range with % display Terms accepted booleanSimple true/false, no UI toggle needed Search index vectorUsed for AI similarity search OAuth token secretReversible value stored encrypted at rest
Question Answer → Field Type "Can the user type free text?" text, textarea, richtext, markdown, html"Is it a number I need to calculate with?" number, currency, percent, slider"Does the user pick from a list?" select, multiselect, radio, checkboxes"Does it reference another record?" lookup, master_detail, tree"Is it a file the user uploads?" file, image, avatar"Is the value computed automatically?" formula, summary, autonumber"Does it have internal structure?" address, location, color, json, code"Is it sensitive/secret?" password, secret"Is it for AI/ML?" vector
Still unsure? Start with text for strings or number for numerics. You can change the field type later, but ObjectStack does not auto-convert existing data: a small set of compatible narrowings (e.g. text → textarea/markdown/html/code, date ↔ datetime) pass cleanly, while other type changes are rejected with a destructive_change error when you save the updated object — existing values may not convert cleanly. Re-submit the save with ?force=true to proceed anyway.