Output doesn't match Preview
I'm trying to process a 940 through FTP connectors. What it's supposed to do is import the document in x12 format and reformat it into a flat file. When I preview the generated file, I get the below
However, when the file actually gets processed I get this:
So far I have tried the following:
- Used a Dummy HTTPS destination to get the correct raw data for mapping
- Ensured that the file that I was trying to process was the same as the file that I implemented with
- Changed the file extensions just in case it didn't know how to read the input file without it
I've been able to get this to work previously, but I don't know what would have changed to make it stop seeing the data.
Here are my rules:
{
"_id": "659e99942fcea4324e60c54a",
"lastModified": "2024-01-26T19:19:14.069Z",
"name": "Geodis 940",
"sandbox": true,
"description": "Geodis 940",
"version": "1",
"format": "fixed",
"fixed": {
"rowSuffix": "",
"rowDelimiter": "\n",
"paddingChar": " "
},
"rules": [
{
"required": true,
"elements": [
{
"name": "Qualifier",
"length": 8,
"value": "PARTNER"
},
{
"name": "Value",
"length": 10,
"value": "BAY01"
}
]
},
{
"required": true,
"elements": [
{
"name": "Qualifier",
"length": 8,
"value": "SET"
},
{
"name": "Value",
"length": 10,
"value": "940"
}
]
},
{
"required": true,
"elements": [
{
"name": "Qualifier",
"length": 8,
"value": "ROUTE"
},
{
"name": "Value",
"length": 10,
"value": "BAY01"
}
]
},
{
"required": true,
"elements": [
{
"name": "Qualifier",
"length": 8,
"value": "COMPANY"
},
{
"name": "Value",
"length": 10,
"value": "W1"
}
]
},
{
"required": true,
"elements": [
{
"name": "Qualifier",
"length": 8,
"value": "BEGIN"
}
]
},
{
"required": true,
"maxOccurrence": 100,
"elements": [
{
"name": "RECORDID",
"length": 20,
"value": "I940_1020_004010"
},
{
"name": "RECORDTYPE",
"length": 4,
"value": "1020"
},
{
"name": "Order Status Code",
"length": 1,
"value": "{{[Order Status Code]}}"
},
{
"name": "Depositor Order Number",
"length": 22,
"value": "{{{[Depositor Order Number]}}}"
}
]
},
{
"required": false,
"maxOccurrence": 3,
"relativeDataPath": "N1",
"elements": [
{
"name": "Record ID",
"length": 20,
"value": "I940_1040_004010"
},
{
"name": "Record Type",
"length": 4,
"value": "1040"
},
{
"name": "N101",
"length": 4,
"value": "{{{[Entity Identifier Code]}}}"
},
{
"name": "Name(N102)",
"length": 60,
"value": "{{{[Name(N102)]}}}"
}
]
},
{
"required": false,
"maxOccurrence": 1,
"elements": [
{
"name": "Record ID",
"length": 20,
"value": "I940_1060_004010"
},
{
"name": "Record Type",
"length": 4,
"value": "1060"
},
{
"name": "Address1",
"length": 55,
"value": "{{{[N1].1.[N3].0.[Address Information]}}}"
},
{
"name": "Address2",
"length": 55,
"value": "{{{[N1].1.[N3].0.[Address Information(N302)]}}}"
}
]
},
{
"required": false,
"relativeDataPath": "[N1].1",
"maxOccurrence": 3,
"elements": [
{
"name": "RecordId",
"length": 20,
"value": "I940_1070_004010"
},
{
"name": "RecordType",
"length": 4,
"value": "1070"
},
{
"name": "City",
"length": 30,
"value": "{{{[City Name]}}}"
},
{
"name": "State",
"length": 2,
"value": "{{{[State or Province Code]}}}"
},
{
"name": "Zip",
"length": 15,
"value": "{{{[Postal Code]}}}"
},
{
"name": "Country",
"length": 10,
"value": "{{{[Country Code(N404)]}}}"
}
]
},
{
"required": false,
"maxOccurrence": 3,
"relativeDataPath": "G62",
"elements": [
{
"name": "RecordId",
"length": 20,
"value": "I940_1110_004010"
},
{
"name": "RecordType",
"length": 4,
"value": "1110"
},
{
"name": "Qualifier",
"length": 2,
"value": "{{{[Date Qualifier]}}}"
},
{
"name": "Date",
"length": 10,
"value": "{{{[Date]}}}"
}
]
},
{
"name": "1140",
"required": false,
"elements": [
{
"name": "Record ID",
"length": 20,
"value": "I940_1140_004010"
},
{
"name": "Record Type",
"length": 4,
"value": "1140"
},
{
"name": "Shipment Method of Payment",
"length": 2,
"value": "{{{[Shipment Method of Payment Code]}}}"
},
{
"name": "Transportation Method Code",
"length": 2,
"value": "{{{[Transportation Method/Type Code]}}}"
}
]
},
{
"required": false,
"maxOccurrence": 1000,
"relativeDataPath": "LX",
"elements": [
{
"name": "LX",
"length": 20,
"value": "LX"
}
],
"children": [
{
"required": false,
"maxOccurrence": 1000,
"relativeDataPath": "W01",
"elements": [
{
"name": "RecordId",
"length": 20,
"value": "I940_2020_004010"
},
{
"name": "RecordType",
"length": 4,
"value": "2020"
},
{
"name": "Quantity",
"length": 17,
"value": "{{{[Quantity]}}}"
},
{
"name": "ItmQual",
"length": 2,
"value": "VN"
},
{
"name": "prodID",
"length": 12,
"value": "{{{[Product/Service ID(W0107)]}}}"
},
{
"name": "LotQualifier",
"length": 2,
"value": "LT"
},
{
"name": "Lot",
"length": 48,
"value": ""
}
],
"children": [
{
"required": false,
"maxOccurrence": 1000,
"relativeDataPath": "N9",
"elements": [
{
"name": "RecordId",
"length": 20,
"value": "I940_2040_004010"
},
{
"name": "RecordType",
"length": 4,
"value": "2040"
},
{
"name": "Reference Identification Qualifier",
"length": 3,
"value": "{{{[Reference Identification Qualifier]}}}"
},
{
"name": "Reference Identification",
"length": 30,
"value": "{{{[Reference Identification]}}}"
}
]
},
{
"required": false,
"maxOccurrence": 1000,
"relativeDataPath": "G69",
"elements": [
{
"name": "RecordId",
"length": 20,
"value": "I940_2030_004010"
},
{
"name": "RecordType",
"length": 4,
"value": "2030"
},
{
"name": "description",
"length": 40,
"value": "{{{[Free-form Description]}}}"
}
]
}
]
}
]
},
{
"name": "File Trailer Record",
"required": true,
"maxOccurrence": 1,
"elements": [
{
"name": "RecordId",
"length": 20,
"value": "I940_3010_004010"
},
{
"name": "RecordType",
"length": 4,
"value": "3010"
},
{
"name": "Quantity",
"length": 17,
"value": "{{{[Quantity]}}}"
}
]
},
{
"name": "File Trailer Record",
"required": true,
"maxOccurrence": 1,
"elements": [
{
"name": "E",
"length": 3,
"value": "End"
}
]
}
]
}
Any ideas?
0
Comments
Better picture of the output
Jack Harris what is your sample data?
Jack Harris something like this. It's a little confusing, but you should change the sample data to be wrapped in array brackets. This is because during the actual run, a page of data is sent to the translator and not a single record.
Sample data:
What you gave me worked perfectly and now my 943s and 940s are working. But now I'm working on a 944 which isn't exporting and I don't understand what you changed to make it start working. Below is the data, but can you explain a bit more about what you changed in the rules?
Import Rules
Input Sample data
Output Rules
Output Sample Data
Generated file
Downloaded file
Jack Harris does this get you there? I changed your max occurrence on ISA to 1 and max occurrence on ST to 1000.
Rules:
Input:
Output:
Please sign in to leave a comment.