# Advanced filter in function doesn't preload used data

**URL:** <https://community.appfarm.io/t/advanced-filter-in-function-doesnt-preload-used-data/223>\
**Category:** Bug reports\
**Tags:** app-data\
**Created:** [January 26, 2023, 10:12am UTC](https://community.appfarm.io/t/advanced-filter-in-function-doesnt-preload-used-data/223 "2023-01-26T10:12:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yassine.tebib](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/yassine.tebib/32/74_2.png) [@Yassine.tebib](https://community.appfarm.io/u/Yassine.tebib)\
**Post date:** [January 26, 2023, 10:12am UTC](https://community.appfarm.io/t/advanced-filter-in-function-doesnt-preload-used-data/223/1 "2023-01-26T10:12:08Z")

</div>

Hello appfarm

Sorry for that weird title , didn’t know how to explain it in one sentence

i think i found a small bug in appfarm

As i understood, appfarm loads only variable properties that you use in the app. ( for instance : if i’m not using “Command Date” variable in any container / filter / action. appfarm will optimise by not loading them on the app )

i found that it doesn’t take into consideration advanced filters ( Filters in a filter )

i actually have a function with a database that i filter by looking into another database that i filter too.

it seems that the variable that i’m filtering with is not loaded in the app ( i only use it here for this specific App )

in this example : i’m using “Order Line” Database . i’m looking if it exists in “Order Header” database that i also filter . The variable that i’m using only one time is “POS Origin”. this doesn’t worked because my app doesn"t load it and thinks that i’m never using it.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/1X/23289d0efbe8b45c4a2c28d4e2c542c57c6623b6.png)

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/1X/408b586579a75920d47ac14bf6a9fa213073e0b7.png)

Hope i was clear.

Thanks

---

<div class="post-metadata">

**Author:** ![kristian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/kristian/32/58_2.png) [@kristian](https://community.appfarm.io/u/kristian)\
**Post date:** [January 26, 2023, 10:51am UTC](https://community.appfarm.io/t/advanced-filter-in-function-doesnt-preload-used-data/223/2 "2023-01-26T10:51:17Z")

</div>

Thanks! Looks like a bug (reproduced with the same result)! The Filtered selection as part of the filter editor is quite new, so I believe we’ve missed to add those filter dependencies to the evaluation of which properties to read for an App.

Workaround: Make sure that property is in use somewhere else in the App.

---

<div class="post-metadata">

**Author:** ![Yassine.tebib](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/yassine.tebib/32/74_2.png) [@Yassine.tebib](https://community.appfarm.io/u/Yassine.tebib)\
**Post date:** [January 26, 2023, 10:56am UTC](https://community.appfarm.io/t/advanced-filter-in-function-doesnt-preload-used-data/223/3 "2023-01-26T10:56:47Z")

</div>

Thanks Kristian

that’s exactly what i did to resolve that !

enjoy your day !
