BAQ help for finding LAST

To make a long story short…we recently went form 9.05.702A to 10.2.300.5 and I know the BAQs have changed but I am not sure how to do this in E10.

In E9 I last selected on the DMRActn table to pull the last action.image

In E10 I don’t have an option to do that. Do I have to make that table a subquery? How would I pull the last?


What information do you need in your grid? If it’s just one column then this technique works very well.

The other thing that you can do is run a Max() function on your DMR table with your applicable field (that’s a calculated field), then group by everything else on the grid, (That’s assuming that the data in the rows is duplicated only because of the multiple rows in the DMRAction table.)

Let me know if that’s enough help or you need more details. You didn’t give a whole lot of information about the structure of the rest of your BAQ, so I’m not 100% sure what the right answer is.


i was thinking MAX originally but wasn’t sure. I will try that. Does that table need to but a separate SubQuery or can it still be part of the main query?

You can put in in the main query. You just need to make sure that you check the group by for everything else you have displayed. (It will bark at you if you don’t anyways)


1 Like

Ok i will try it and see how it goes…

1 Like

Ok I am really close. My BAQ tested great. I created a MAX on the DMRActn table and then grouped everything. When I tested the resulted it worked.

My issue started when I went to test the BAQ. It will rung but I get this error. I didn’t get this in the BAQ.

Odd it shows this message twice with different controls.

Here is how I have my BAQ set up…

I figured it out. I had the Dashboard tracker date fields on the wrong column. I updated it to the Calc Action date and it fixed it

1 Like

I was just going to tell you that. Good job!

1 Like

thanks for your help.