Add doc in sub-table via action #936
-
I can't figure out how to add a document in a sub-table of the current row in an action-script. `const action:Action = async ({row,ref,db,storage,auth,actionParams,user}) => { const newEntry = { ref.collection('logHistory').add(newEntry); Sadly I get the error: Can somebody point me in the right direction please. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
hi @webwurm , actionScripts has an expectation of a returned object
more detailed examples here |
Beta Was this translation helpful? Give feedback.
hi @webwurm , actionScripts has an expectation of a returned object
you mainly need to add something like this to the end of your function
more detailed examples here