Basic Concepts: Single vs Multiple Values

  • Single Value: A single, definite piece of information. For example, “today’s date” or “John’s phone number”.
  • Multiple Values: Array values, a series of information. For example, “all dates this month” or “all of John’s phone numbers”.

Default Single and Multiple Value States

Field NameDescriptionDefault State
SingleLineTextSingle Line TextSingle
LongTextLong TextSingle
UserUserOptional*
AttachmentAttachmentMultiple
CheckboxCheckboxSingle
MultipleSelectMultiple SelectMultiple
SingleSelectSingle SelectSingle
DateDateSingle
NumberNumberSingle
DurationDurationSingle
RatingRatingSingle
FormulaFormulaDynamic*
RollupRollupDynamic*
CountCountSingle
LinkLinkOptional*
CreatedTimeCreated TimeSingle
LastModifiedTimeLast Modified TimeSingle
CreatedByCreated BySingle
LastModifiedByLast Modified BySingle
AutoNumberAuto NumberSingle
ButtonButtonSingle

While most fields have their default single or multiple value states, these states can change due to linking and referencing mechanisms.

  • Impact of Link Fields: If a link field is multiple-valued, all fields referenced through this link field will become multiple-valued. Example: Imagine you have a “Tasks” table and an “Employees” table. If a task can be completed by multiple employees, the link field in the “Tasks” table connecting to the “Employees” table will be multiple-valued. Consequently, any fields referenced through this link (such as employee phone numbers) will also become multiple-valued.
  • Formulas and Rollups: Although they are typically single-valued, formulas can become multiple-valued when they reference multiple-value fields. Similarly, they can become multiple-valued when referenced through multiple-value link fields. Example: Suppose you have a formula field calculating each employee’s total salary. If this formula references a multiple-value salary field (e.g., salaries for different projects), the formula field will also become multiple-valued.

Examples

Understanding the distinction between single and multiple values is crucial for advanced users. It helps users understand why certain fields might contain multiple values and guides them in properly setting up and using these fields.

Employee Information and Project Tasks

Consider managing a company using Teable with two tables: Employee Information and Project Tasks.

  1. Employee Information table:
NamePhoneEmailTasks
John123456john@company.comTask1, Task2
Mary789012mary@company.comTask3
  1. Project Tasks table:
Task NameAssigned ToDue DateProgress
Task1John2023-11-2050%
Task2John2023-12-0130%
Task3Mary2023-11-1580%

In this example:

  • The “Tasks” field in the Employee Information table is multiple-valued because one employee can be responsible for multiple tasks.
  • The “Assigned To” field in the Project Tasks table is single-valued because each task is assigned to one employee.

When you create a new task in the “Project Tasks” table and assign it to an employee, that employee’s “Tasks” field automatically updates to include all tasks they’re responsible for.

Number Mini Charts

Example: You might wonder why a number field sometimes displays multiple lines or bars instead of just one. This occurs because it’s actually a multiple-value field, likely due to previous linking or referencing operations.