I've been working on a solution similar to this, as I have client that needs to query by values in the related tables. I'm pursuing the route of running a query against the REST endpoint of the related table (which is not a feature class with geometry in my case) to bring back a list of parent IDs, which I will then query against that endpoint to get the geometries I need. I've not found a pre-built way to do it, so it has all been custom js/jquery so far in a custom widget.
If there are other ideas, I'm open...
I would hold off and see what capabilities are added to the 1.3 version of WAB this month, but if they do not improve the relates ability then you are on the right path.
I had a version of this working for my local deployment, using ajax queries against REST Services. This all worked fine until we deployed to the test environment that is on a secured server, so all my queries to the REST services now result in a 403 - permission denied message.
My question to you is how you have the eSearch configured to get past that - I also have the eSearch in my app, and that does succeed in bringing back data. Is the query Task that you utilize somehow handled differently than the direct ajax call to the service?
thanks in advance,