I have a show_bike_page. There is a dataset connected to bike_collection. The name of dataset is loaddataset and also there is a hook (data.js) to convert some input data to uppercase. All is working well
Another page named save_bike_page. These is also a dataset connected to bike_collection. The name of dataset is savedataset without any hook. When I save any data here, the (data.js) hook fires…
Hooks are per collection. They have nothing to do with datasets.
If you want to get data from the collection without triggering the hook, you’ll need to use a direct query instead of a dataset, write the query in a jsw file in the backend and use {suppressHooks: true}.
like:
student_collection
_id sname mobile1
(system) MATHEW 123456789
(system) TOM 112233445
deposit_collection
_id s_id dep_amount
(system) data from student_collection(_id of MATHEW) 500
(system) data from student_collection(_id of MATHEW) 700
(system) data from student_collection(_id of TOM) 800
I want to show result in table element like these…
sname tot_amount
MATHEW 1200
TOM 800
how to do this… please suggest … thanks in advance
The easiest way will be to make s_id field type a reference field that contains the id from the student collection.
Then you’ll be able to query the deposit collection using .include(“s_id”) :