Advanced Topics
This page covers advanced mechanics for working with connected data in AnyDB.
You do not need these concepts to model systems correctly. Use them when you need precision, automation, or advanced calculations.
Relative vs absolute references
Relative references (within a record)
Used to connect cells inside the same record.
Example:
- multiply quantity by unit price
- derive totals or status values
Relative references behave like spreadsheet formulas.
Absolute references (across records)
Used to read a specific cell from another record.
Absolute references uniquely identify:
- team
- database
- record
- cell
Use absolute references only for special cases where data must come from a specific record. Absolute references are hardcoded and do not adapt if the record is deleted and recreated.
Referencing linked records
When an object is linked to another object:
- DYNREF can pull any field from the linked object
- lookups remain live and always reflect the current value
This is commonly used for:
- customer name on an order
- product SKU on a line item
- vendor address on a purchase order
Referencing attached child records
Attached child records can be referenced from a parent.
This enables:
- rollups (sum, count, average)
- status aggregation
- progress calculations
Child references are used when you need totals or summaries from many attached records.
Referencing parent records from children
Attached child records can also reference their parent records.
This is useful when:
- child records need contextual data
- parent-level settings apply to children
- calculations depend on parent attributes
This allows parent and child records to stay in sync without duplication.
Special reference helpers
AnyDB provides helper keywords to simplify formulas:
-
CURRREC
Refers to the current record -
CURRCELL
Refers to the current cell
These reduce the need to hardcode record or cell identifiers.
Template filtering in references
When referencing attached records, you can limit results by template name
This is useful when:
- a parent has many different types of attached objects
- only one type should be included in a calculation
Filtering keeps formulas predictable as models evolve.