在视觉查询中,ValueFilter在2sxc中不起作用

时间:2018-04-10 22:32:39

标签: dotnetnuke 2sxc

我有一个JSON结果集,就像这样

"Default": [
    {
      "PortalId": 0,
      "Price": 990000,
      "Featured": false,
      "Type": 1,
      "Bathrooms": 6,
      "Rooms": 5,
      "Volume": 0,
      "Area": 430,
      "CreatedDate": "2017-03-13T18:16:08.38Z",
      "ShowFrom": "2017-03-13T18:16:08.38Z",
      "ShowTill": "9999-12-31T23:59:59.997Z",
      "UserId": 2,
      "Kitchen": 1,
      "CityId": 46,
      "Code": "CA-799",
      "Verified": false,
      "Plot": 1234,
      "CityName": "Capdepera",
      "ImageName": "RV5",
      "ImagePath": "/Portals/0/RealEstateThumbs/20/RV5.jpg",
      "Id": 20,
      "Guid": "00000000-0000-0000-0000-000000000000",
      "Title": null,
      "Modified": "0001-01-01T00:00:00Z",
      "_2sxcEditInformation": {
        "entityId": 20,
        "title": "(no title)",
        "isPublished": true
      }
    },
    {
      "PortalId": 0,
      "Price": 1750000,
      "Featured": false,
      "Type": 1,
      "Bathrooms": 6,
      "Rooms": 5,
      "Volume": 0,
      "Area": 360,
      "CreatedDate": "2017-03-10T10:25:42.647Z",
      "ShowFrom": "2017-03-10T10:25:42.647Z",
      "ShowTill": "9999-12-31T23:59:59.997Z",
      "UserId": 2,
      "Kitchen": 1,
      "CityId": 61,
      "Code": "ES-9337",
      "Verified": false,
      "Plot": 1234,
      "CityName": "Esporles",
      "ImageName": "RV6",
      "ImagePath": "/Portals/0/RealEstateThumbs/21/RV6.JPG",
      "Id": 21,
      "Guid": "00000000-0000-0000-0000-000000000000",
      "Title": null,
      "Modified": "0001-01-01T00:00:00Z",
      "_2sxcEditInformation": {
        "entityId": 21,
        "title": "(no title)",
        "isPublished": true
      }
    }

使用测试参数将ValueFilter添加到Visual Query时:[QueryString:Code] = SP

它不会过滤此代码值(在上面的示例中,不应返回这两个结果)。

我做错了什么?

ValueFilter本身定义为:

Attribute = Code
Value = [QueryString: Value]
Operator: begins
Take: all

这是我解决方案的关键。

1 个答案:

答案 0 :(得分:0)

我相信令牌[QueryString: Code]中的空格是你的问题 - 不要在令牌中使用空格。