Fixed-Length File Mapping Questions
Hello,
I have the following X12 EDI JSON that I'm mapping into a fixed-length file format.
Where I'm stuck is that I'm trying to access the Quantity from the flow data, but I don't know how to get to that information and I've had some difficulty finding documentation on what I'm trying to accomplish.
Secondary question about "children". Based on what I've been able to gather, "children" are independent looping structures within the rules. I have two sets of loops that I need to include. The first is to loop through the address information to get the Ship To, Ship From, and possibly Warehouse information. The second is to loop through the line items of the transaction.
For the most part, the address loop is working with the exception that it is creating blank lines for two of the sections.
Lastly, in the data, you'll see that there are line terminators( '\r ) from the original EDI and I'm not sure how to get them out.
Any ideas for any of these issues would be appreciated.
Comments
Jack Harris can you provide your JSON input and file definition JSON?
Here's the input
Here's the output
Here's what I currently have for the definition
I figured out the last two issues.
Jack Harris so you're still trying to figure out how to access the Quantity field? On the other 2 that you figured out, it could be helpful for other users to say what you did.
That is correct, I'm trying to figure out how to access the fields in the Quantity area and loop through it because it's the lines of the transaction to be added.
You're correct I should do that.
The '\r was being added to the original EDI parsing as the rowSuffix. Originally I had that misconfigured. When I changed it to have "rowSuffix":"'\r" the single quotes and extra lines went away.
Jack Harris can you type out your desired output using that sample input? The file definition rules you have don't look right and I'm not sure how to direct you without knowing what we would need to change.
This is what it's supposed to look like with most of the data as I didn't want to write out all 200 required lines manually.
Jack Harris I don't think the format you want is possible with the particular input format you have. For example, you have 3 definitions pointing to the N1 segment and it's why you end up with empty lines like this:
What you're really wanting is a segment just for the ship to and another segment for the ship to, but since this is an array, there isn't a way to put N1 3 times and then say only where identifier code is SF. If the ship to doesn't need to be dynamic, then you could hardcode a new element definition and then use the N1 for ship to. If it does need to be dynamic, then you either should add a new segment just for ship to or add address information to the ship from object. Could look like this:
On the quantity piece, you can't use a relative path that is nested like LX.W01 so you would need to first specify the LX and then have a child definition within it to be to W01. Additionally, you would want to get rid of all these empty LX objects.
Here is the definition rule made. I made up assumptions for some lengths.
That worked perfectly!
Do you know how I can prevent the Parsed Output from putting in the "page_of_records" tag?
Jack Harris I'm not sure where you are seeing that. Can you screenshot what you're looking at.
Jack Harris pages of records, records, and rows are essential pieces to the way Celigo works. So while you may see that in preview, input for AFE editors, and some other places, it won't be there after the file is actually built. When we grab data from a source application, we chunk the data into records and each chunk of records is a page. So if we get 100 MB of data from the source, we would make a max of 20 pages since a page of data has a limit of 5 MB. You can specify how many records are on each page of data by going to your export and manipulating it.
There will only be one record.
It's manipulating an X12 file with only 1 transaction each time.
Jack Harris I'm not following what your issue is here. Like I said, this is how data passes through Celigo.
Please sign in to leave a comment.