Description
Related to Improve Entity creation when formula is used for name (or some fields are required)
and Allow only unique values in a Field
and maybe Validation rules in general
Problems
Users need to enforce mandatory fields to ensure data consistency and integrity when creating or updating entities.
Solution
Implement a "Required Fields" feature that allows users to designate specific fields as mandatory across all entity creation and update processes.
NOTE: It is not possible to create Required Fields for Highlight database so far
Field Setting UI
Add Required switcher to the following field types:
Basic Text, URL, Email, Phone (blank string is a no value like null)
Number
Date
Single Select
Parent relation (many-to-one) for some cases and permissions:
Example: Tasks must be created within shared projects (no orphan tasks). The current system allows users with entity creation capabilities to associate an entity with anything if they have update rights on at least one side. Anton proposes tightening the rule by requiring the user to have read permissions on the related entity as well, ensuring stricter control over entity associations Require capabilities on both ends to link/unlink entities
Example: For Estimations, four Fields should be required: Name, Discipline (to-one relation), Quantity (number), Duration (number).
Imitate State DB: there shouldn't be any cards without a state
People: single user
🦄 OUT OF SCOPE: Support to-many relation Fields as required (tags, etc)
People: multiple users
Multi-select field
Location field
❌ Formulas and Lookups CAN'T be required
❌ Required fields can not be selected for Highlight database
What to do if I am adding new entity on View and filter of Required field is set? Haha! → Set selected value in the filter
Phase 1
Entity Creation
There are many places where we can create a new entity, so we should cover them all
Form view
Required fields in form view
Other cases
If at least one required field in database, ALWAYS show New Quick Add popup on entity creation. Invoke New Quick Add modal popup for entity creation with required fields
New Quick Add
Invoke New Quick Add modal popup:
Select text and create a new entity (not relevant for entities with names generated)
Reference Selector
Smart Folder in left menu
Board View Axis, Timeline View groups
ALL VIEWS → ? we can pass context to form and set some values, like column/row/filter, etc.
Search
Edit fields
We can edit fields in many places, like Entity View, Views via inline edit, batch actions.
Field operations
Create entity via Convert action
Support Convert action for entities with Required Fields
Automations
Support required fields in automations
API
Import
Technical things
Phase 2. Design special UI to create a better UX for a user
Design for all cases
https://www.figma.com/design/JRmd7B9p7MPXFojD2fZuD1/PA---Views-%26-Search?node-id=12519-37592&t=dmC2T1GeK9KIpna6-1
📦 Archive
The solution should work across all kinds of Views. One way to this is to use Form View (experimental) :
A user creates an entity without setting the required Fields on any View
Fibery shows the Form with required Fields as a popup
Perhaps, if a DB has required Fields, we should Force/push users add entities via Forms.
Another solution would be borrowing a technique from indirect context Views: