I have a data collection named, ‘Children’. The collection has a ‘Reference’ field that references ‘Site Members’ collection. Basically ‘Children’ collection has has the email of their parents that is in ‘Site Members’. Parent’s are the only ones that can register on the website.
I want a dataset that would return the Children’s data when the Parent Log’s in and clicks on ‘Children’.
Option one: I have a dataset that connects to ‘Children’, when I try to add a Filter based on parent’s id, I get the following error “None of your current datasets are valid for this filter.”
Option two: Filter based on ‘Owner’ is User: Logged-in user. Nothing comes back.
You need to use code for that.
You can create an afterQuery hook for the Children collection to retrieve their parentId (you’ll need to have there .include() ).
Something like: