0

我想通过自定义日期字段(外部 ID 为“日期”)获取由特定标签和订单过滤的项目

根据文档,我尝试了多种方法,例如 PodioItem::Filter() 带有一个标签数组和一个简单的字符串,但我没有得到预期的结果。

我知道我们可以按标签过滤并按特定字段 ID 排序,但我不知道该怎么做。

来自文档的解释:

tags: Filter by the tags on the item
{field_id}: The id of the field to sort by, which can be fields of type "state", "text", "location", "money", "number", "calculation", "progress", "duration", "app", "date", "contact", "category" and "question".

有谁知道该怎么做?

谢谢大家!

4

1 回答 1

0

在这个页面的最底部http://podio.github.io/podio-php/items/你可以看到如何做日期过滤器。您可以将其与如下标签结合使用:

$items = PodioItem::filter($app_id, array(
  'filters' => array(
    $external_id_of_date_field => array(
      "from" => "2014-01-01 00:00:00",
      "to" => "2014-07-31 23:59:59"
    ),
    'tags' => array('tag1')
  ),
));
于 2014-10-13T18:03:57.187 回答