ODAG is different from Direct discovery, You can't use ODAG parameter values in Direct Query, Since direct query will run the script every time you select a values in dimension.
ODAG parameters are passed by ODAG extension to the Qlik Engine to create dynamic application. If you are using Direct query without ODAG parameters, it will work.
Actually when i am selecting single values this code is working even with direct discovery. but the problem is whenever i am selecting more than one value it is not taking that field restriction itself.
I know that ODAG and Direct discovery are different. My requirement is, I have to implement ODAG with
Thank you for the response.