0

我雇了一个人来编写一些HubL逻辑,用于从HubDB 表中获取已排序的行。该代码有效。对hubdb_table_rows的调用返回按“webinar_order”排序的结果,其中包含整数值。

        {% set items = hubdb_table_rows( module.hubdbtable_field, 'orderBy=webinar_order&limit=50' ) %}
        {% if items == [] %}
        <div>
            <p>{{ module.result_message }}</p>
        </div>
        {% else %}
        <div>
        {% for item in items %}

我在同一个 HubDB 表中有另一列“webinar_date”,它是一个(单击并选择)日期字段。我想更新逻辑,以便按日期排序返回行;最终下降(最近的第一个)。

但是,当我将“orderBy= webinar_order &limit=50”中的列名更改为“orderBy= webinar_date &limit=50”时,它只会返回我在表中看到的行。我也查看了过滤器选项,但没有看到任何有用的信息。

当前 - 工作

{% set items = hubdb_table_rows( module.hubdbtable_field, 'orderBy=webinar_order&limit=50' ) %}

更新 - 不工作

{% set items = hubdb_table_rows( module.hubdbtable_field, 'orderBy=webinar_order&limit=50' ) %}

我是否缺少某些日期类型特有的东西?是否有可能我没有正确引用网络研讨会日期列?(我不确定如何获取标签/变量名称,并假设它们与列名相同,空格替换为下划线,就像“网络研讨会订单”的情况一样

我查看了HubDB 论坛中的用例和建议,但无法获得任何解决问题的见解。

带有日期列的 HubDB 表

4

0 回答 0