It looks like Query widget—Web AppBuilder for ArcGIS | ArcGIS has you covered. Have you tried looking into that? It mentions that you can query and filter based on related table attributes.
Thank you for you r reply. I tried using query, but I don't see fields from the related table when I try to do the expression.
And if I try to query related table, the layer itself doesn't get queried..
I tried both: selecting the layer (There were no fields from related table to choose from) and I tried querying related table separately (layer was not adjusted based on this query)