Hi,
I have the following query which is working fine:
Map(
Paginate(
Match(
Index('invoicesByUser'),
Select('ref', Get(Match(Index('userByEmail'), email))),
),
),
Lambda('InvoiceRef', Get(Var('InvoiceRef')))
)
But when I try to format the result using Let - it returns [null]:
Map(
Paginate(
Match(
Index('invoicesByUser'),
Select('ref', Get(Match(Index('userByEmail'), email))),
),
),
Lambda(
'InvoiceRef',
Let(
{ InvoiceDoc: Get(Var('InvoiceRef')) },
{
info: Select(['data', 'info'], Var('InvoiceDoc')),
clients: Select(['data', 'client'], Var('InvoiceDoc')),
items: Select(['data', 'items'], Var('InvoiceDoc')),
user: Get(Select(['data', 'user'], Var('InvoiceDoc'))),
},
),
),
)
Still, this query works fine in Shell.
I’ll appreciate any help!
Thanks.