Request parameters to filter SQL query using session

I want to filter the Coupon Usage table based on the request parameter passed in querystring.


This param is dynamic and based upon the param_1 value, I want to filter out the table records.
Right now, I am using a plugin afterGetSearchResult in order to join the table as well as use the where clause.
If I put a static value in where clause, it works but if I use $this->request->getParams()['param_1'], it fails.

Although I can see the output in the console that the params are fetching.
This problem is exactly similar to the link below and he solved it using the session variable but he has not mentioned how he did it.

Magento2 filter not working for request parameter for order grid

Go to Source of this post
Author Of this post: Siddhant Lohia
Title Of post: Request parameters to filter SQL query using session
Author Link: {authorlink}