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)

  • 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:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    {
    "filter":[
    {
    "$and":[
    {
    "id":"012693e0-711a-11eb-9442-023123a8c872"
    },
    {
    "teams.id":"1"
    }
    ]
    }
    ]
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Can you check if this works for you?

  • I will try that. I was just using what came in that field in the response to the GET without wanting to get involved with the links between modules. I think you have gven me enough information. Thanks.

  • to extend this, if i filter Documents with {"filter": [{"related_doc_rev_number": {"$equals": "1"}}] i get "error_message":"Invalid link documents for owner clause" is it safe to join on relate