By using this website, you agree to our Terms of Use (click here)
Good day, I am trying to create an import scenario and/or data provider that can be for a fixed-field length .txt file. I have to import a file every day, but I was asked if this can be done by using the file in its original form. Attached I put an image of the file. Is there a way to either create a new Data provider or use one that is already in Acumatica? Thank you and have an amazing day.
Indeed there is no default data provider type for fixed text. The only nasty way i can think of is use the CSV data provider type, import each record as one long String field called "Data". Then in your import scenario, use functions instead of fields. Use the Substring function to extract the data for each field, and wrap that with a Cxxx function, to convert the string to the correct field type.
So suppose the first field is the 0001 above, you might use:
=CInt(Substring[Data],0,4))
This is only a theory.
I just noticed a typo, it should be:
=CInt(Substring([Data],0,4))
You might also checkout this product for an easier way to work with fixed-length files: