TRUECALC
Functions

DGET

Single field value for rows matching criteria

Try it

When to use it

When should I use DGET?

Use DGET to retrieve a single value from a database field where criteria match exactly one row — useful when you need a precise lookup and want an error if zero or multiple rows match.

Used in

operations

Syntax

DGET(database, field, criteria)

Examples

=DGET({"Name","Score";"Alice",90;"Bob",80},"Score",{"Name";"Alice"}) // => 90
=DGET({"Name","Score";"Alice",90;"Bob",80},2,{"Name";"Bob"}) // => 80
=DGET({"ID","Val";"1",100;"2",200;"3",300},"Val",{"ID";"2"}) // => 200

On this page