# Filter Not Working (Using JSON data columns in the collection's Filter)

**URL:** https://community.glideapps.com/t/filter-not-working-using-json-data-columns-in-the-collections-filter/74840
**Category:** Ask for Help
**Created:** [July 12, 2024, 4:12am UTC](https://community.glideapps.com/t/filter-not-working-using-json-data-columns-in-the-collections-filter/74840 "2024-07-12T04:12:36Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![mwza](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mwza/32/43529_2.png) [@mwza](https://community.glideapps.com/u/mwza)
#### Post date: [July 12, 2024, 4:12am UTC](https://community.glideapps.com/t/filter-not-working-using-json-data-columns-in-the-collections-filter/74840/1 "2024-07-12T04:12:36Z")

</div>

Hi All  
Collection is not displaying as expected. Best way to illustrate is with this video.  
[Filter Issue](https://www.loom.com/share/f40377eeb95442e88ef58170d7030485?sid=1e5dab83-2c2e-4909-b03f-a57b9fff432a)

The filter on the collection is “Does the array contain the JSON string of the record in the helper table.”  
I have compared the strings:  
**Array data:**

> 1 {“standard”:“Time & Attendance”,“offence”:“Unauthorised absence from the work station”,“consequences”:[“First Offence: Written Warning”,“Second Offence: Final Written Warning”,“Third Offence: Termination With Notice”],“rationale”:“Henry Olonga’s consistent mid-week absences without valid illness and never longer than a single day at a time fall under unauthorised absence and potentially habitual absenteeism if it meets the criteria of 5 absences per quarter.”}

**Record JSON:**

> 1 {“standard”:“Time & Attendance”,“offence”:“Unauthorised absence from the work station”,“consequences”:[“First Offence: Written Warning”,“Second Offence: Final Written Warning”,“Third Offence: Termination With Notice”],“rationale”:“Henry Olonga’s consistent mid-week absences without valid illness and never longer than a single day at a time fall under unauthorised absence and potentially habitual absenteeism if it meets the criteria of 5 absences per quarter.”}

They are identical and so there is a match - the underlying data is there, but the collection is not displaying the record.

Initially the filter works as expected when adding items to the “selected” group but “breaks down” if I try to update the array with the remove array column, despite the underlying data being updated as expected.

Can anyone see what the issue is?

---

<div class="post-metadata">

### Author: ![mwza](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mwza/32/43529_2.png) [@mwza](https://community.glideapps.com/u/mwza)
#### Post date: [July 12, 2024, 2:04pm UTC](https://community.glideapps.com/t/filter-not-working-using-json-data-columns-in-the-collections-filter/74840/2 "2024-07-12T14:04:58Z")

</div>

Update.  
I am not sure why my initial set up did not work (no coder here 😄) but I discovered that using template columns to represent both the array of JSON and the record JSON column to text strings, and using these in the collection filter, resolved the issue and the filters are working as expected.  
Hope someone else might find this helpful!

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [July 13, 2024, 3:45am UTC](https://community.glideapps.com/t/filter-not-working-using-json-data-columns-in-the-collections-filter/74840/3 "2024-07-13T03:45:08Z")

</div>

> [@mwza](#):
>
> but I discovered that using template columns to represent both the array of JSON and the record JSON column to text strings

hmm, you were originally using JSON Object/JSON Template columns, yes?

Seems this is one more data point that demonstrates that these columns are buggy.

cc @Robert_Petitto

---

<div class="post-metadata">

### Author: ![mwza](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mwza/32/43529_2.png) [@mwza](https://community.glideapps.com/u/mwza)
#### Post date: [July 13, 2024, 3:59am UTC](https://community.glideapps.com/t/filter-not-working-using-json-data-columns-in-the-collections-filter/74840/4 "2024-07-13T03:59:29Z")

</div>

Hi  
The column being queried was an array column with JSON data and the string i was searching for was a query JSON column.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [July 13, 2024, 4:22am UTC](https://community.glideapps.com/t/filter-not-working-using-json-data-columns-in-the-collections-filter/74840/5 "2024-07-13T04:22:00Z")

</div>

Yes, okay. I think what is happening is the Query JSON result gets cached and doesn’t always update when the source data changes. I’ve seen variations of this behaviour with all 3 of the JSON columns.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [July 13, 2024, 12:37pm UTC](https://community.glideapps.com/t/filter-not-working-using-json-data-columns-in-the-collections-filter/74840/6 "2024-07-13T12:37:52Z")

</div>

Is this the one we were talking about related to the API calls?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [July 13, 2024, 12:43pm UTC](https://community.glideapps.com/t/filter-not-working-using-json-data-columns-in-the-collections-filter/74840/7 "2024-07-13T12:43:05Z")

</div>

Yes, I believe so.

---

<div class="post-metadata">

### Author: ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)
#### Post date: [July 14, 2024, 5:34pm UTC](https://community.glideapps.com/t/filter-not-working-using-json-data-columns-in-the-collections-filter/74840/8 "2024-07-14T17:34:39Z")

</div>

What is the issue with API calls… does it cache and not update when source data changes?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [July 14, 2024, 11:27pm UTC](https://community.glideapps.com/t/filter-not-working-using-json-data-columns-in-the-collections-filter/74840/9 "2024-07-14T23:27:27Z")

</div>

Yeah, specifically with some of the JSON columns.

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [July 21, 2024, 11:27pm UTC](https://community.glideapps.com/t/filter-not-working-using-json-data-columns-in-the-collections-filter/74840/10 "2024-07-21T23:27:29Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
