IMPORTANT MESSAGE: We are still experiencing some difficulties that will affect your ability work with the RWS AppStore. Our IT team is working to resolve this but for now you may not be able to download or upload apps through the RWS AppStore. We apologise for the inconvenience and will update the community when we have a resolution in place. In the meantime you can take advantage of the Private AppStore if you are using Trados Studio 2021 or 2022.

What's the proper way to format Translation Memory Export filter expression

The GroupShare API has a TranslationMemory Export feature

When you make a request for a TM Export you specify the tmId, source and target language.

There is an additional parameter in the request body, and it contains the export filter:

What is the proper way to format the filter expression in the request body?

I'm trying to export all the TUs created after a certain date. From what I see, the API supports this, but any format I've tried so far has thrown an error.

Could someone provide me with a sample JSON of this filter that works?

  • I also have this problem and am also looking for help.

    Here's what I've tried:

    {
      "filter": {
        "fields": [
          {
            "name": "string",
            "type": "Unknown",
            "values": [
              "string"
            ]
          }
        ],
        "expression": "(\"Created on\" > '01/01/2019')"
      },
      "callbackUrl": null
    }

    In particular, the `expresion` property contains correctly-escaped JSON.

    This request is accepted with a 200 (OK) response containing...

    {
        "id": "34107371-15ab-46ea-9e02-3db266aff4e0",
        "translationMemoryId": "6414336a-b745-4592-97fa-1941c36146cd",
        "status": "Queued"
    }

    But if I then query for the status of this task I receive...

    {
        "id": "34107371-15ab-46ea-9e02-3db266aff4e0",
        "displayName": "MY TM NAME",
        "type": "TmService.Export",
        "settings": {
            "translationMemoryId": "6414336a-b745-4592-97fa-1941c36146cd",
            "filter": {
                "fields": [],
                "expression": "(\"Created on\" > '01/01/2019')"
            },
            "source": "de-ch",
            "target": "it-ch",
            "settingsType": "TmService.Export"
        },
        "details": [
            {
                "key": "Default",
                "status": "Failed",
                "details": [
                    "Error in Filter Expression: ErrorFilterUnknownField - position 12, input \"(\"Created on\" > '01/01/2019')\""
                ]
            }
        ],
        "status": "Failed",
        "createdAt": "2019-06-05T10:32:00.1238392+00:00",
        "updatedAt": "2019-06-05T10:32:00.4207523+00:00",
        "ownerId": "7e1f438c-e4a0-472d-b24a-4711f5a6e910"
    }

    It clearly doesn't like the expression. Is it because of the way I've escaped the double-quotes? Or is it the 'Created on' property/field? Or the value I've supplied? I've written the expression as

    "(\"Created on\" > '01/01/2019')"

    because that conforms to the REST API Filter Expressions guide, but I've also tried it as

    "(\"Created on\" > \"01/01/2019\")"

    and received the same response. I've also tried it without parentheses: same response.

  • I managed to find a solution on my own. 
    Te minimal format required for the export filtering to work:

    {
      "filter": {
        "fields": [
            {
            "name": "Created at"
            }
        ],
        "expression": "crd > \"01 Aug 2018\"" 
      }
    }


    I managed to deduce this by reading through the following web pages. They also contain a list of the possible field names.

    http://producthelp.sdl.com/SDL%20studio%20groupshare/en/Export_translation_units.htm


    http://producthelp.sdl.com/SDL%20studio%20groupshare/en/TM_system_fields.htm