Bartender - Multiple Numbers in a field, want to split for labels

Hello~

I have a field of information from my data that is multiple serial numbers listed out in one row.

Is there a way to make Bartender break them up each into their own printed label?

They’re written like FS09531’ FS09532’

I have tried injecting a VB script in OnProcessData, OnPrintJobStart, and All Events, but I have 0 practical knowledge or skill in coding so I mainly relied on ChatGPT. This did not work for me. I also tried assigning the ’ as a Field Separator when choosing the data source, but that also did not work for me.

More information: It’s a calculated field from Epicor reports.

1 Like

I’d ask how you’re printing things in bartender. Are you using a bartender integration and monitoring a location where text files are saved?

If so the text file will create a new label for each row in the text file so all you’d need to do is modify the text file that is getting sent to the network to have a new line for each serial number.

The way we have it set up now is that the report drops a .bt file. Then the integration scans for it. Would I have to do this manually every time?

You should be able to modify the BPM that is creating the.bt file to create a new line for each delimiter in the string. (If you want it done all the time).

If you don’t want it done all the time you could just modify a single .bt file to generate the labels you want.

This is how we have it set up. I am not sure where the .bt file comes into play.

Poking around somehow, I suppose it would be a custom code widget after the auto print.

Now I just need someone who knows C#!

In the bartender template, there are transforms that you can do. There is a section where you can use VB script.

Probably not much easier than C#, but it’s another option if you just need to split a string up. You could probably ask chatGPT to write the code for you.

The hard part is getting a separate label to print out for each value, do you know how to do that?

I was hoping someone would teach us haha, as far as I know you could maybe do this in an integration and/or you’d have to send these as separate print requests and do the split logic on the Epicor side.

sigh… no. I know how to group multiple rows, but not ungroup a single row.