# Preprocess GET Filter values

**URL:** <https://community.dreamfactory.com/t/preprocess-get-filter-values/2199>\
**Category:** Server-Side Scripting\
**Created:** [February 16, 2016, 7:33am UTC](https://community.dreamfactory.com/t/preprocess-get-filter-values/2199 "2016-02-16T07:33:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![glenteoh](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@glenteoh](https://community.dreamfactory.com/u/glenteoh)\
**Post date:** [February 16, 2016, 7:33am UTC](https://community.dreamfactory.com/t/preprocess-get-filter-values/2199/1 "2016-02-16T07:33:42Z")

</div>

Hello,

I am creating a simple script to grab records from a database using a filter parameter n. I would like to find out how to pre-process a GET filter parameter value such that if n=ABC, the actual request sent will be n=XYZ.

This is because in my table the value of ABC does not exist, only XYZ. So the original request will result in no results found.

I have tried using event.request.payload.resource and event.request.query.n to no avail - I’ve been getting “undefined” errors for hours.

What is the way to grab the value of a filter parameter and change it in pre-process scripts?

Any help will be greatly appreciated!

Cheers  
Glen

---

<div class="post-metadata">

**Author:** ![kimpatro](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/kimpatro/32/467_2.png) [@kimpatro](https://community.dreamfactory.com/u/kimpatro)\
**Post date:** [February 16, 2016, 10:39am UTC](https://community.dreamfactory.com/t/preprocess-get-filter-values/2199/2 "2016-02-16T10:39:36Z")

</div>

Hi,

take a look at this: [https://wiki.dreamfactory.com/DreamFactory/Tutorials/V8\_custom\_scripting\_service](https://wiki.dreamfactory.com/DreamFactory/Tutorials/V8_custom_scripting_service)

Maybe the `event.request.parameters;` have the filter value.

---

<div class="post-metadata">

**Author:** ![glenteoh](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@glenteoh](https://community.dreamfactory.com/u/glenteoh)\
**Post date:** [February 25, 2016, 4:46am UTC](https://community.dreamfactory.com/t/preprocess-get-filter-values/2199/3 "2016-02-25T04:46:54Z")

</div>

Hi @kimpatro,

I managed to grab the filter parameters and modify them, but am unable to get it processed by the server.

I tried using event.request.content\_changed = true; but it didn’t seem to work.

How do we feed the parameters back to the server in order for it to be processed?

Glen
