# Export Controller Filter Error

**URL:** <https://forum.radzen.com/t/export-controller-filter-error/8838>\
**Category:** Blazor WebAssembly\
**Created:** [August 31, 2021, 12:16pm UTC](https://forum.radzen.com/t/export-controller-filter-error/8838 "2021-08-31T12:16:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![InSumo2](https://forum.radzen.com/letter_avatar_proxy/v4/letter/i/da6949/32.png) [@InSumo2](https://forum.radzen.com/u/InSumo2)\
**Post date:** [August 31, 2021, 12:16pm UTC](https://forum.radzen.com/t/export-controller-filter-error/8838/1 "2021-08-31T12:16:21Z")

</div>

I had to add this code to the Export Controller to resolve the initial filter error:

```
            var filter = query.ContainsKey("$filter") ? query["$filter"].ToString() : null;
            if (filter.Trim() != "i =>")
            {
                items = items.Where(filter);
            }

```

It looked like this was resolved a while back.

> [@Export Filter](https://forum.radzen.com/t/export-filter/4432):
>
> I added a filter to an export request, but the following error is generated in execution: "ParseException: No property or field 'i' exists in type 'Customer'" What it's mean ?

I'm using ${datagrid0.Query.Filter} and ${datagrid0.Query.OrderBy} in the Export Button Click event.

While this is working, I would like to know if this is a bug or if I need to apply my filter differently. note: I added the ExportController.cs to the ignore list.

Basically the $filter is never null, it always contains the invalid " i =\> " or a valid filter.

---

<div class="post-metadata">

**Author:** ![simon](https://forum.radzen.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@simon](https://forum.radzen.com/u/simon)\
**Post date:** [September 16, 2021, 7:10pm UTC](https://forum.radzen.com/t/export-controller-filter-error/8838/2 "2021-09-16T19:10:07Z")

</div>

I experienced the same problem. I think that this is a feature we need to code around until a fix comes along. In my case I am adding another predicate but of course the empty filter causes an issue.

 ![image](https://forum.radzen.com/uploads/default/original/2X/a/a96c4cdc8ce39c83ea154f314b8cf398c54a6bcf.png)

 ![image](https://forum.radzen.com/uploads/default/original/2X/f/f58d523ea003e445c1bf69b957cdad80404e5bf8.png)
