We have been experiencing some issues with client filters, that we have been able to work around but I thought it would be good to mention it.
We have a “Floor Plan” data object with an attribute “Building” connecting Floor Plans to buildings in a many-to-one relation. The data source object for the Floor Plans had a filter “Floor Plan.Building” exists in “Buildings”, for all floor plans for all buildings to be fetched on app load. A client filter “Floor Plan.Building” equals Building (Selected)" for just showing the floor plans for the selected building, this client filter was always enabled.
When no building was selected, nothing was in the data source as expected. But when a building was selected nothing happened.
Changing “enable” client filter from “true” to “Building.Has Selected Objects” makes the data source work as expected. But optimally, we would want it to contain zero objects when no building is selected.
Let me know if this is intended functionality or not!
Hi, and thanks for reaching out to the community!
I have looked into this and tried to recreate your setup from your description and everything seems to be working as expected when I set the client filter to enabled = true. When I have no building selected, I see no floor plans, and when I select a building, I can see all floor plans related to the selected building. So there might be an extra layer of logic or filtering that somehow intervene with the client filter on your end, I’m just not sure exactly where it happens.
Could it perhaps be some filtering in the initial app load, or a server-side filtering that disqualifies the floor plans from your datasource on selection? Please let me know, and I will try to further assist you on this issue
After more debugging, it looks like this is the case for data sources with “Initially Subscribe to Updates”. I got it to work by setting the data source attribute to false and setting it to true right away. Like this:
Hi, and thanks for following up, it’s great to hear that you made it work! From what you’re telling me, there might be some clues as to why this happens in our docs about how data is loaded into the app. Additionally, there could be some logic on app load that I didn’t include in my attempt to recreate your setup, so if you have the time, please send me a detailed overview of the setup on DM so I can continue investigating a potential bug and report it.