Table of Contents

TMS Event Function Line 11154639 Example Criteria Function Set 3

General

The following Json-code can be copied to field:Criteria Function Set on the Function Line 3: When failed set TripStatus: 31-SENDERROR

Note

Check the values used in the function. In each environment specific criteria may be applicable.

Functional

{
  "FunctionSet": {
    "TableNo": 11173073,
    "DataType": "34047",
    "Entries": [
      {
        "EntryNo": "5000",
        "CodeunitID": "11172846",
        "FunctionCode": "COMPARE",
        "Description": "Compare Table No.  and 11172835",
        "Parameters": [
          {
            "ParameterName": "VALUE1",
            "Value": "",
            "DataType": "0",
            "ResultFunctionSetID": {
              "FunctionSet": {
                "TableNo": 11173073,
                "DataType": "31488",
                "Entries": [
                  {
                    "EntryNo": "10000",
                    "CodeunitID": "11172846",
                    "FunctionCode": "FIELD",
                    "Description": "Get Field Value: Table No. ",
                    "Parameters": [
                      {
                        "ParameterName": "FIELDNO",
                        "Value": "60"
                      }
                    ]
                  }
                ]
              }
            }
          },
          {
            "ParameterName": "VALUE2",
            "Value": "11172835"
          }
        ]
      },
      {
        "EntryNo": "10000",
        "CodeunitID": "11172846",
        "FunctionCode": "COMPARE",
        "Description": "Compare Status Code. and <>31-SEND ERROR",
        "Indentation": "1",
        "Parameters": [
          {
            "ParameterName": "VALUE1",
            "DataType": "0",
            "ResultFunctionSetID": {
              "FunctionSet": {
                "TableNo": 11173073,
                "DataType": "31488",
                "Entries": [
                  {
                    "EntryNo": "10000",
                    "CodeunitID": "11172846",
                    "FunctionCode": "GET",
                    "Description": "Get field: Status Code",
                    "Parameters": [
                      {
                        "ParameterName": "TABLENO",
                        "Value": "11172786"
                      },
                      {
                        "ParameterName": "FIELDNO",
                        "Value": "81"
                      },
                      {
                        "ParameterName": "FIELD 1",
                        "Value": "1"
                      },
                      {
                        "ParameterName": "FILTER 1",
                        "Value": "6"
                      },
                      {
                        "ParameterName": "FIELD 2",
                        "Value": "2"
                      },
                      {
                        "ParameterName": "FILTER 2",
                        "ResultFunctionSetID": {
                          "FunctionSet": {
                            "TableNo": 11173073,
                            "DataType": "34047",
                            "Entries": [
                              {
                                "EntryNo": "30000",
                                "CodeunitID": "11172846",
                                "FunctionCode": "GET",
                                "Description": "Get Field: Trip No.",
                                "Parameters": [
                                  {
                                    "ParameterName": "TABLENO",
                                    "Value": "11172835"
                                  },
                                  {
                                    "ParameterName": "FIELDNO",
                                    "Value": "31"
                                  },
                                  {
                                    "ParameterName": "FIELD 1",
                                    "Value": "1"
                                  },
                                  {
                                    "ParameterName": "FILTER 1",
                                    "ResultFunctionSetID": {
                                      "FunctionSet": {
                                        "TableNo": 11173073,
                                        "DataType": "31488",
                                        "Entries": [
                                          {
                                            "EntryNo": "10000",
                                            "CodeunitID": "11172846",
                                            "FunctionCode": "COPYSTR",
                                            "Description": "Copy String: Processing Record-Id",
                                            "Parameters": [
                                              {
                                                "ParameterName": "TEXT",
                                                "ResultFunctionSetID": {
                                                  "FunctionSet": {
                                                    "TableNo": 11173073,
                                                    "DataType": "31488",
                                                    "Entries": [
                                                      {
                                                        "EntryNo": "10000",
                                                        "CodeunitID": "11172846",
                                                        "FunctionCode": "FIELD",
                                                        "Description": "Field = Field No.",
                                                        "Parameters": [
                                                          {
                                                            "ParameterName": "FIELDNO",
                                                            "Value": "70"
                                                          }
                                                        ]
                                                      }
                                                    ]
                                                  }
                                                }
                                              },
                                              {
                                                "ParameterName": "POSITION",
                                                "Value": "23"
                                              },
                                              {
                                                "ParameterName": "LENGTH",
                                                "Value": "40"
                                              }
                                            ]
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "ParameterName": "FINDWHAT",
                                    "Value": "1"
                                  },
                                  {
                                    "ParameterName": "READ ISOLATION",
                                    "Value": "1"
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      },
                      {
                        "ParameterName": "FINDWHAT",
                        "Value": "1"
                      },
                      {
                        "ParameterName": "READ ISOLATION",
                        "Value": "1"
                      }
                    ]
                  }
                ]
              }
            }
          },
          {
            "ParameterName": "OPERATOR",
            "Value": "<>"
          },
          {
            "ParameterName": "VALUE2",
            "Value": "31-SENDERROR",
            "DataType": "31488"
          }
        ]
      }
    ]
  }
}