Anyone know of a way to modify the data written out in the header of a BT file?

Version 10.2.500.28 → 2022-2

This topic covers tips, tricks and known issues for making the jump between the two above sessions.

Does anyone know of a way to modify the data that Epicor writes out in the GENINV label that is used to create the BT File for Bartender?

Currently it writes out info after %BTW% and one parameter /DBTEXTHEADER=3 is causing issues with the latest version of Bartender.
After working with Bartender support to figure out why our new version of Bartender is not processing labels correctly like our old version (It prints 3 labels with only text and no data, instead of 1 label). They mentioned that /DBTEXTHEADER is not needed and once we manually removed it from the BT file the label printed correctly.

1 Like

@mufaddal This may be why you were getting multiple labels.

@SteveV in the bartender integration is there any action you can do to remove the text? You could put it back on bartender to give you a solution within their integration that might be able to help you…

I know there are variables you can use, so maybe you can get the text and assign it to a variable, search and strip that text, then pass the variable on in the workflow to get your end result…?

Just wanted to let you know the version it’s not an issue in version 2021 R8. We are seeing the issue in 2022 R5, and the interesting thing was they didn’t have an issue when they took our integration file, label and data and ran it on their VM. They said there must be some difference causing the bug on our system.

1 Like

Of course

That’s a good idea, I’ll see if I can somehow play around with that. I assumed I really couldn’t map those because when you use the database setup wizard you have to strip out that first line. I agree I’m probably going to see if bartender can come up with a work around.
I’m just surprised we don’t have any control (or any way I can find) to modify what Epicor is generating on that first line.

From the limited time I’ve spent with it I couldn’t figure that out.

Also, from the bartender standpoint I always ask them to show me their integration and the text file and what not over a meeting. Just so I can confirm that everything is set up the same. I don’t accept the, “it’s your problem,” response without first asking for more info as to why they think that.

Can I ask you, do you see the right amount of pages when you preview the document?

They actually took our Integration file and put it on their VM, so I assumed it was the same, but no guarantees.
If you preview the document it fills in the data correctly and prints 1 label, from within the designer.
I believe when they were remoted into our system they used the Integration Builder to test and got 3 labels that were blank.
They were confused as to why they were seeing this behavior, because everything they checked looked correct.
Only when I mentioned I thought it was odd that the header line of the BT file contained two items that =3 and we were getting 3 labels, they said something about the /DBTEXTHEADER and not needing it. Once it got removed worked perfectly.

so when you preview it on your system from bartender designer you see 3 pages?

No Designer it shows correctly 1 page and the data is filled in. Again though with designer you are using the database file with the header stripped. It’s something with the Header %BTW% record that the new version is not liking when /DBTEXTHEADER is in the line.

1 Like

okay I worked with @mufaddal on a similar issue just two weeks ago where they were getting too many labels and in the end I had concluded that it must be because of the data in the file…

What I don’t get though is Steve that the integration and the file works on their VM (header and all), but not on yours. I would be asking to see it working/see the data file they are using.

I’ve got a two pronged approach to resolve it, but with both I’m not getting anywhere.
First way is on the Epicor side and I have a ticket open with them to determine how I can control what is printing on that first line of the BT file.
The Second is getting bartender to help with the cause, where this version isn’t acting the same. I’ve put in another support call to them to work that angle.

I’ll keep this thread updated if I get any solution working.

Alright yes, please let us know!

I feel like there would be some way to get this working on the BT side using the various actions available in BT Integration Builder.

1 Like

We use 2022 R4. The header line says 3. Number of labels depend on the data in the file, which is either one or two. Does your data that is output by Epicor have more than one line which is what will cause multiple labels.

Ok well the approach of going back to Bartender was the best solution and extremely easy.
So in The integration builder, you add another action->Transform->Search and Delete.
On the Search and Delete tab leave source as Variable and variable as %eventData%
In Options in Search for box put /DBTEXTHEADER=?
Change Occurrences to first occurrences only.

Make sure this new action is before the print command script action.

Now when the file comes in it strips out that word, then processes the script.
Worked perfectly!


Hi Steve,
We had the same issue of printing multiple labels from Epicor but it was alwasy showing 1 label o nthe desinger. We did add the action recently but for us it was more of the options selection while creating the integration. We went with the basic Interigation option and it then started to create 1 file but if we select multiple features which are not used it was creating multiple records for us.

Steve glad you got it thanks for reporting back. Had I the time, I would’ve tried to play around with the actions to get you what you wanted and earned the solution :weary:

I marked you as solution also, since that was your original suggestion. I wasn’t familiar enough with Bartender to go down that path. I only marked mine so people would know exactly how it was resolved.

1 Like

I’ll link your post in an edit. :pray: I truly feel though that you did the work so I would still advocate yours as the solution. I didn’t put in the work.

I just had a similar issue with a client where the BarTender version was too far ahead of their Epicor version and the “/DBTEXTHEADER=?” in the file was causing every print job to fail. Trying the solution here to see if it works.
One point to clarify, BarTender Support said that “/DBTEXTHEADER=?” just defines which line of the trigger file the event data starts and it doesn’t have anything to do with how many copies print… the replacement for this is the command “/R=3”

BarTender Support said Epicor Support should be able to provide a fix… I feel like they would just say to upgrade Epicor or not run an incompatible combination.
Has anyone ever rec’d a data fix or one-off or figured out how to modify how BarTender RDD’s generate the file header.