BPM Help Please

Remove the Criteria from the ttPOHeader table on the BAQ.

1 Like

How do I do that?

Okay, so here is what happens. On a fresh PO the conditional query works and it shows the message if the vendor is from the USA. BUT, if I change the vendor on an existing PO, the message pops up regardless of which county.

Add a criteria to the to the baq where RowMod=“A” or RowMod=“U” on the ttPOHeader table.

1 Like

In your message box, right click and look for the table query. You can select some fields from the TT table and they will show up in your message. An invaluable debugging tool.

image

That did it! I think we got this figured out!

That doesn’t allow me to add the results of the query only the actual PO record

correct. But it at least helps to know one side of the equation. Knowing that would have helped you figure out that you needed to filter out by the rowmod like @josecgomez suggested.

1 Like

How could I query data and show it in a message box?

That’s tougher. You would have a call a query in code I think to make that work. I’ve never done it , so some of these other guys would have to help.

Sometimes to preview a query in a BPM, I will write the BAQ to make sure that I am getting what I want… then I transfer what I did into the BPM Query. BPM queries do NOT support outer joins, but otherwise, they are basically the same.

1 Like

I hereby endebt all souls who benefit from this!

image

A few things:
This is server-side and so it requires a server (or shared) path
It will output the entirety of the records you use it on (i.e. all fields)
It’s sweet XML
You can do lots of other things. Add a count, include other datasets (other tt’s, a linq query, etc)

var path =@"\\TS1\Users\Public\ChrisRocks.xml";  
        System.IO.FileStream file = System.IO.File.Create(path);  

            System.Xml.Serialization.XmlSerializer writer = null;   
          

foreach(var r in ttPart)
{
        if(writer == null)
        writer = new System.Xml.Serialization.XmlSerializer(r.GetType());
        writer.Serialize(file, r);
        
}
        file.Close();  
        writer = null;