Query data by date field with multiple values

Hi Gurus,

I’m in the middle of migrating our APP to the latest API. We have a requirement to get data having date field assigned within D-14 to D+14.
Originally I was using items_by_multiple_column_values, and put each date in column_values array. But now when I do the same thing to the 2023-10 API, it doesn’t work.
On the API document, it says the date field can just pass “one” string. Does anyone encounter the same trouble, and how could it be solved?
Please kindly share with me if you have a solution to this.

Thanks and Regards,
Leo Li

hi @leo.li

Welcome to the community! I would query the items using the query operator in stead of query items by column value. Something like this?

query {
  boards (ids:123456789) {
    items_page (query_params: {rules: {column_id: "date", compare_value: ["2023-12-01", "2023-12-31"], operator:between}}) {
      cursor
      items {
        id
        name
      }
    }
  }
}
1 Like

Hi @basdebruin

Thanks! It works. And it’s better than the old way I used in previous API. Now I don’t need to provide each value but just from and to value.
I kept checking items_page_by_column_values and couldn’t find any way to solve. You really saved my day! :+1:

Thanks again!

1 Like