Are there any restrictions to filters?

Hi, I am calling the GET api with a filter. Seems to all work fine, but not doing what I expect when I have some filter expressions.

If I have a filter

[{"id": {"$equals": "012693e0-711a-11eb-9442-023123a8c872"}}]

It returns as expected

But if I add

[{"id": {"$equals": "012693e0-711a-11eb-9442-023123a8c872"}}, {"team_name": {"$equals": "[{\"id\": \"1\", \"name\": \"Global\", \"name_2\": \"\", \"primary\": true, \"selected\": false}]"}}]

I get no rows, despite the values in the team_name element being those returned in the previous call. Multiple elements in the filter seem fine unless the filter is a array (ot at least thats how it seems)

Parents
  • Hello Nick, 

    On this case, it seems that you are trying to filter from a related field on Teams module, so you can try specifying link and the field name: "teams.id" for example:

    {
       "filter":[
          {
             "$and":[
                {
                   "id":"012693e0-711a-11eb-9442-023123a8c872"
                },
                {
                 "teams.id":"1"
                }
             ]
          }
       ]
    }

    Can you check if this works for you?

Reply
  • Hello Nick, 

    On this case, it seems that you are trying to filter from a related field on Teams module, so you can try specifying link and the field name: "teams.id" for example:

    {
       "filter":[
          {
             "$and":[
                {
                   "id":"012693e0-711a-11eb-9442-023123a8c872"
                },
                {
                 "teams.id":"1"
                }
             ]
          }
       ]
    }

    Can you check if this works for you?

Children