TMS Event Function Line 11154639 Example Criteria Function Set 2
General
The following Json-code can be copied to field:Criteria Function Set on the Function Line 2: When succeded and TripStatus already 50-INPROGRESS set TripStatus: 50-INPROGRESS
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. and 11172835",
"Parameters": [
{
"ParameterName": "VALUE1",
"Value": "",
"DataType": "0",
"ResultFunctionSetID": {
"FunctionSet": {
"TableNo": 11173073,
"DataType": "31488",
"Entries": [
{
"EntryNo": "10000",
"CodeunitID": "11172846",
"FunctionCode": "FIELD",
"Description": "Veldwaarde ophalen",
"Parameters": [
{
"ParameterName": "FIELDNO",
"Value": "60"
}
]
}
]
}
}
},
{
"ParameterName": "VALUE2",
"Value": "11172835"
}
]
},
{
"EntryNo": "20000",
"CodeunitID": "11172846",
"FunctionCode": "COMPARE",
"Description": "Compare Status Code and <>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": "Field Value: 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 Count Planned Activities in Trip, Status > 40-SENT and >0",
"Indentation": "2",
"Parameters": [
{
"ParameterName": "VALUE1",
"DataType": "0",
"ResultFunctionSetID": {
"FunctionSet": {
"TableNo": 11173073,
"DataType": "34559",
"Entries": [
{
"EntryNo": "20000",
"CodeunitID": "11172846",
"FunctionCode": "COUNT",
"Description": "Count Planned Activities in Trip, Status > 40-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 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 Value : 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": "FIELD 2",
"Value": "11"
},
{
"ParameterName": "FILTER 2",
"Value": ">40-SENT"
},
{
"ParameterName": "READ ISOLATION",
"Value": "1"
}
]
}
]
}
}
},
{
"ParameterName": "OPERATOR",
"Value": ">"
},
{
"ParameterName": "VALUE2",
"Value": "0"
}
]
}
]
}
}