# Filter Connect Data with Query, showing unpublished and scheduled items

**URL:** <https://forum.builder.io/t/filter-connect-data-with-query-showing-unpublished-and-scheduled-items/4621>\
**Category:** Visual Editor Help\
**Tags:** visual-editor\
**Created:** [December 8, 2023, 5:11pm UTC](https://forum.builder.io/t/filter-connect-data-with-query-showing-unpublished-and-scheduled-items/4621 "2023-12-08T17:11:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oscar.tyndale](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/oscar.tyndale/32/3212_2.png) [@oscar.tyndale](https://forum.builder.io/u/oscar.tyndale)\
**Post date:** [December 8, 2023, 5:11pm UTC](https://forum.builder.io/t/filter-connect-data-with-query-showing-unpublished-and-scheduled-items/4621/1 "2023-12-08T17:11:48Z")

</div>

Hi, I connected a data model on a page (using the data tab option) on builder and then use data binding to show the info of each entry for the inputted data set, I use repeat for each entry and it works great, my only problem is on the connect data part, when using a query rule to filter the results, I’m using “if published is publish” to show only entries published, but it’s also showing expired and programmed entries (per the page scheduler)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/2/2c686660a425b500bc0b3ff33715e6646db585ac.png)

is there any way to filter only the published elements or to create a rule where if the expired date set on the item is lower than the todays date.

is this possible to achieve in the visual editor?  
Thank you in advance and I hope this explains well.

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [December 8, 2023, 5:53pm UTC](https://forum.builder.io/t/filter-connect-data-with-query-showing-unpublished-and-scheduled-items/4621/2 "2023-12-08T17:53:16Z")

</div>

Hello @oscar.tyndale,

Welcome to the [builder.io](http://builder.io) forum.

We are unable to reproduce this possible issue, would you be able to share the builder content link where you are having this issue?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/c/c1dca21328459a8dfbcfe40b6b91648da8ebd7b8.png)

Additionally, you can try reverse logic i.e. Published Is not “Draft” and see how that works for you.

 ![Screenshot 2023-12-08 at 11.22.14 PM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/6/6f36affa285dfd3128447e6b747bfbb1e5f07ea4.jpeg)

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [December 8, 2023, 7:23pm UTC](https://forum.builder.io/t/filter-connect-data-with-query-showing-unpublished-and-scheduled-items/4621/4 "2023-12-08T19:23:55Z")

</div>

Hello @oscar.tyndale,

I appreciate your report, and I was able to reproduce the issue on your space, though regrettably, I couldn’t replicate it on my end. We understand the importance of resolving this promptly.

As a temporary workaround, we recommend using the `startdate` parameter for your query until we conduct a thorough investigation.

---

<div class="post-metadata">

**Author:** ![oscar.tyndale](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/oscar.tyndale/32/3212_2.png) [@oscar.tyndale](https://forum.builder.io/u/oscar.tyndale)\
**Post date:** [December 8, 2023, 9:25pm UTC](https://forum.builder.io/t/filter-connect-data-with-query-showing-unpublished-and-scheduled-items/4621/5 "2023-12-08T21:25:36Z")

</div>

Thank you manish! but I can’t compare that with the current date, how do I pull the current day? I tried $currentDate, “{{ now() }}”, new Date() but I don’t think that’s possible on the custom query field.

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [December 11, 2023, 1:25pm UTC](https://forum.builder.io/t/filter-connect-data-with-query-showing-unpublished-and-scheduled-items/4621/6 "2023-12-11T13:25:08Z")

</div>

Hello @oscar.tyndale,

I wanted to inform you that we have identified a potential issue related to recent changes, and our team is actively investigating the matter. We are discussing this internally and will share next steps with you as soon as possible.

Thank you~
