Module: grist-plugin-api : fetch data of a reference Table

How is it possible to fetch data from a Reference field ?
I don’t see any function wiling able to do it ?
Should I add each fields into the table with the reference Table via Formula( Lookups)?


Hi @Sao

You have two options. The first is to fetch the table you need and find the record manually using the id from the reference column:

await grist.docApi.fetchTable("SameTableId")

And the second option is to embed the referenced record in a new column using RECORD function. It will be available in the widget as a JSON object.