Table of Contents

TMS Event Function Line 11154639 Example Criteria Function Set 1

General

The following Json-code can be copied to field:Criteria Function Set on the Function Line 1: When succeded and TripStatus =<40-SENT Set TripStatus: 40-SENT

Note

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

Functional


{
  "FunctionSet": {
    "TableNo": 11173073,
    "DataType": "34047",
    "Entries": [
      {
        "EntryNo": "10000",
        "CodeunitID": "11172846",
        "FunctionCode": "COMPARE",
        "Description": "Compare Table No.=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": "20000",
        "CodeunitID": "11172846",
        "FunctionCode": "COMPARE",
        "Description": "Compare Status <> 31-SENDERROR",
        "Indentation": "1",
        "Parameters": [
          {
            "ParameterName": "VALUE1",
            "DataType": "0",
            "ResultFunctionSetID": {
              "FunctionSet": {
                "TableNo": 11173073,
                "DataType": "31488",
                "Entries": [
                  {
                    "EntryNo": "10000",
                    "CodeunitID": "11172846",
                    "FunctionCode": "GET",
                    "Description": "Get Field value: 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 Value 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": "Get Field: Processing Record-Id",
                                                        "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"
          }
        ]
      },
      {
        "EntryNo": "30000",
        "CodeunitID": "11172846",
        "FunctionCode": "COMPARE",
        "Description": "Compare Qty Planned Acti. Lines > 0 , with Status > 40-SENT",
        "Indentation": "2",
        "Parameters": [
          {
            "ParameterName": "VALUE1",
            "DataType": "0",
            "ResultFunctionSetID": {
              "FunctionSet": {
                "TableNo": 11173073,
                "DataType": "34559",
                "Entries": [
                  {
                    "EntryNo": "20000",
                    "CodeunitID": "11172846",
                    "FunctionCode": "COUNT",
                    "Description": "Count lines with Status Code > SENT",
                    "Parameters": [
                      {
                        "ParameterName": "TABLENO",
                        "Value": "11172835"
                      },
                      {
                        "ParameterName": "FIELD 1",
                        "Value": "31"
                      },
                      {
                        "ParameterName": "FILTER 1",
                        "ResultFunctionSetID": {
                          "FunctionSet": {
                            "TableNo": 11173073,
                            "DataType": "34047",
                            "Entries": [
                              {
                                "EntryNo": "30000",
                                "CodeunitID": "11172846",
                                "FunctionCode": "GET",
                                "Description": "Get 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 Processng Record-Id",
                                            "Parameters": [
                                              {
                                                "ParameterName": "TEXT",
                                                "ResultFunctionSetID": {
                                                  "FunctionSet": {
                                                    "TableNo": 11173073,
                                                    "DataType": "31488",
                                                    "Entries": [
                                                      {
                                                        "EntryNo": "10000",
                                                        "CodeunitID": "11172846",
                                                        "FunctionCode": "FIELD",
                                                        "Description": "Veldwaarde ophalen",
                                                        "Parameters": [
                                                          {
                                                            "ParameterName": "FIELDNO",
                                                            "Value": "70"
                                                          }
                                                        ]
                                                      }
                                                    ]
                                                  }
                                                }
                                              },
                                              {
                                                "ParameterName": "POSITION",
                                                "Value": "23"
                                              },
                                              {
                                                "ParameterName": "LENGTH",
                                                "Value": "40"
                                              }
                                            ]
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "ParameterName": "FINDWHAT",
                                    "Value": "1"
                                  },
                                  {
                                    "ParameterName": "READ ISOLATION",
                                    "Value": "1"
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      },
                      {
                        "ParameterName": "FIELD 2",
                        "Value": "11"
                      },
                      {
                        "ParameterName": "FILTER 2",
                        "Value": ">40-SENT"
                      },
                      {
                        "ParameterName": "READ ISOLATION",
                        "Value": "1"
                      }
                    ]
                  }
                ]
              }
            }
          },
          {
            "ParameterName": "OPERATOR"
          },
          {
            "ParameterName": "VALUE2",
            "Value": "0"
          }
        ]
      }
    ]
  }
}