How to define a dataset in a BPM?

So I want to be able to grab some information from various tables in E-10 to populate an E-mail template. I can fill a table by query, but I can’t figure out how to use anything other than the context data sets. How do I define the columns in the DataSet under variables so I can fill it by a query?

I can tell you how to do it in code - but that doesnt answer the question proper.

I’m wondering if that is the “proper” way… I imagine you have to run a custom code block to build the DataSet?

My other option is just hijack a duplicated DataSet and just use the fields for what I want. It’s pretty messy that way, but it would be easier.

edit, no that won’t work for what I want to do because I need a table formatted nicely enough to drop into an e-mail. Using an Epicor data set doesn’t give me any control over the order of fields when I do a field query in a message/email. ughhh

I found that the EASIEST way to create the dataset is to first define where you will use it…
For example, I made an updatable BAQ BPM that needed to check-out a part to the Engineering Workbench… it calls the method called “EngineeringWorkbench.Checkout”… when you load that business object, you will see it demands a bunch of parameters… one of which is the Engineering Workbench tableset. When you click on that Combo box, there is an option to “Create New Variable”… when you do, it seems to create the dataset you need. You can then use that dataset in other widgets like the Fill table widget (if I remember right… this was a long time ago).
image

1 Like

It looks like that method is creating the new data set that goes with the BO/has the BO required columns. Which is essentially what this does in the variables.

I’m trying to figure out how to the use generic DataSet option that shows up on the one that I created called “Email”

So I figured out how to call a BAQ and write to an XML, not exactly what I need, but I used this post to help me figure out how to do this.

This is what I end up with,

It writes an XML file based on the Pack number of the record you are modifying.

Now I would like to know if it’s possible to store that Data Set temporarily instead of an XML in order to display it in a message/e-mail??

Would I just have to build the string with a foreach loop on the data set?