这是视觉查询返回的没有 valueFilter 的 json 数据:
{
"Default": [
{
"Title": "Demo Image",
"Id": 2062,
"Description": "<p>Wonderful Description Goes here</p>",
"Available": true,
"Image": "/Portals/29/gallery/image-holder.jpg",
"Category": "Landscapes"
},
{
"Title": "Second Image",
"Id": 2179,
"Description": "<p>More info about gallery item</p>",
"Available": true,
"Image": "/Portals/29/adam/Image Gallery/d_1cnVC7ok2XkNwelFfzxw/Image/NorthEastWomensVids.jpeg",
"Category": "Landscapes"
},
{
"Title": "Krisis",
"Id": 2191,
"Description": "<p>Super duper</p>",
"Available": true,
"Image": "/Portals/29/adam/Image Gallery/5lWMBOhQrU240JeahWVojg/Image/11L202413A.jpg",
"Category": "Landscapes"
},
{
"Title": "Banff Mountain",
"Id": 2195,
"Description": "<p>Acrylic on canvas - 24-38 inches</p>",
"Available": false,
"Image": "/Portals/29/adam/Image Gallery/8rD59K5dikald8csgfGbiA/Image/Cheryl_Muth_Painting-28.jpg",
"Category": "Landscapes"
},
{
"Title": "Dark mountain day",
"Id": 2196,
"Description": "<p>acrylic on canvas - 32x38 inches</p>",
"Available": false,
"Image": "/Portals/29/adam/Image Gallery/GNm6lv__sU-3jsfxtFOMIQ/Image/Cheryl_Muth_Painting-32.jpg",
"Category": "Portraits"
},
{
"Title": "jans painting",
"Id": 2197,
"Description": "<p>acrylic on canvas 45x33 inches</p>",
"Available": true,
"Image": "/Portals/29/adam/Image Gallery/3GvRbdwiUUSRieqBro8nBQ/Image/jans_painting.jpg",
"Category": "Flowers"
}
]
}
如果我向可视化查询添加值过滤器并指定 Attribute = Category 和 Value = Landscapes,那么当我测试查询时,我只会得到景观项目。
但是问题是当我尝试对可用属性执行值过滤器时。它是一个布尔字段值,在输入表单中带有是否切换。
如果我将 valueFilter 属性设置为 Category 并将值设置为“true/false”、“yes/no”或“1/0”,我不会得到任何类型的记录。
你能帮我弄清楚为什么我不能对布尔字段执行 valueFilter 吗?
我正在使用最新版本的 2sxc
谢谢