Dashboard and BAQ parameter from "Open With ..."

UPDATE: After seeing a few posts about now direct way to pass dashboard params to the BAQ, I can settle for a way to just prevent a refresh with a blank partnum filed on the tracker. Or is this really bad as the BAQ would still run full out (selecting part trans for every part - and just filter what is returned to the dashboard?

I have two related issues.

  1. Using BAQ’s that have parameters setup in their BAQ
  2. Having a dashboard launch from the “Open with …” context menu

The dashboard is similar to the Part Transaction History tracker, and is based on the user supplied partnum (either by typing it into the tracker filed, or passed via the “Open With…”.

To keep it from returning all PartTran records, I added a Parameter for the PartNum in the BAQ

The dashboard has a tracker view to use as filter inputs.

The dashboard still prompts me for the parameter I defined, when I want it to use the value from the tracker pane in the dashboard. Setting the BAQ param to ‘Skip condition when empty’ allows me to ignore the pop-up for the param value (I leave the value blank and just hit cancel), and the results are as desired.

If I remove the Param from the BAQ, a user might hit refresh with the PartNum field on the tracker being blank. This would then try to return the entire PartTran table.

Whats the best way to prevent the BAQ from running if the filter field param is blank?

Secondly, whats the best way to make a dashboard launchable from the “Open with…” AND have it preload the connected value (PartNum in my case)?

Hmmm … found a problem with trying to use the tracker field as the filter.

My BAQ has an unusual join, and the PartNum column in the query result, can contain values different than the input Param.

Using the Tracker as the input, limits the dashboard to display only that value.

For example: PartNum XCHM#8 was replaced by CB-0001. Entering ‘CB-0001’ in the BAQ param, will return PartTran records for PartNum = CB-0001 OR XCHM#8


Leaving the BAQ param blank, but entering CB-0001 in the tracker pane yields no XCHM#8 records.


Notice that the recs for XCHM#8 are missing (should be inserted where the arrows are)

In your BAQ can you make another column with the originating part, then filter by that column instead of your display one? You don’t have to show it to filter by it.

1 Like

You set your parameter to filter on null.

this works now. You can just hit ESC when the Param prompt pops up - because I set it to “Skip Condition…”

You could just remove the parameter altogether then, and make the tracker value filter on null. (edit: I guess it’s called “honor null”) Then it won’t return anything if they don’t have anything in the tracker.

Except for the way my BAQ works.

It has a union of two sub queries to return a row for the initial P/N entered and a row for every other parts that uses the initial one as an alternate.

The param is the common criteria.

I couldn’t figure out any other way to get the PartTrans for the desired part plus the PartTrans for any part that the desired part is a sub for.

If that’s the case, then this:

shouldn’t work. Because you are running it without parameters when you do this.

I’m confused…

edit: I think if you aren’t using aggregate functions in your BAQ, the tracker filters will parameterize the BAQ, essentially filtering through the sub queries like a parameter. Where you run into problems is with the aggregate functions because it can’t filter through those. It doesn’t look like you are grouping anything in your BAQ right? You should be able to get by without parameters, and just filter on the calculated fields.

Param in BAQ:

Param in use (2 places)


Dashboard with Tracker Prompt field entered (before hitting refresh)

Hit Refresh, leave param field blank, and click Cancel:

I get results based on the tracker value:

right. Try this once. Remove the parameter criterias, then in your dashboard check the box below in the tracker criteria.


Tell me if that works the way you want it to.

No Aggregate functions used in BAQ.

But what I do have is two sub queries that each contain a single table. See the picts in post 9.

these two subQ’s are unioned together. I added a filed that will always contain the criteria value to each of these subs.

The top level SubQ is joined to the union of the other two, and that column that always shows the param value is include in the fileds displayed on the top level. The Dashboard filters on this column (the one that always shows the param value)

If you are skipping the parameter, it runs like you don’t have it there at all. If it works like you want it with just the tracker in the dashboard, then you don’t need it.

Looks like that works.

But now my BAQ runs REALLY full out. Is that bad?

Your dashboard tracker will throttle it. That’s why you want to set the part number filter in the tracker to honor null. Then they can’t run it wide open.

it was doing that when you skipped the condition in the parameter already.

Maybe I’m not understanding the relationship between the dashboard filter and the BAQ…

My BAQ currently has no params. So running it obviously throws the “Too many results” warning and stops.

When the dashboard is refreshed, the BAQ runs a modified version of itself, using value in the tracker as extra criteria?

My BAQ has a Union that depends on a common value (PartSubs.Sub_Part = Part.PartNum). I just figured that this union had to occur before any filtering, as the tracker filter refers to a column on the top level subQuery.

Yup. That’s what I mean by “parameterizes it”. If you aren’t using aggregate functions, Epicor will drive those filters through your BAQ. Aggregates and CTE’s are really where you need the parameters. So techniques to limit things in the RAW BAQ are slightly different than what you may need in your dashboard. So the parameters in the BAQ will help you to test, but you can take them out in this case when using it in the dashboard.

I have lots of BAQ’s that I can’t run as the raw BAQ, but they work in my dashboards because they are filtered there.

You notice that when you add a bunch of filters in a dashboard, the results come back faster right? That’s what the system is doing for you.

If you throw in a subquery criteria on the top level, I think this is the same as the dashboard filter. I’d be curious to see how your BAQ runs if you just put one hard typed criteria on the top level only and see if it runs.

1 Like

Do you know how to launch a dashboard from a “Open with…” right click, and pre-populate a tracker field on the dashboard with the linked context?

  1. Right click on a PartNum filed in a standard form, see “Open With -> My cool dashboard”
  2. Selecting “My Cool Dashboard”, launches that dashboard
  3. My Cool Dashboard appears with the PartNum tracker field already populated with part number that I right clicked on in step 1.

Having it automatically refresh would be sweet, But I’m okay with having to manually refresh.

Edit: Of course there is a point of dificulty, in the fact that the filter on the dashboard actually links to a calculated field - and not just a PartNum from another table.

I think if you set your field properties on the calculated field to be like Part.Partnum, you should be able to set a filter on the BAQ as a primary browse. Then when you do the open with, it will populate that part number. I’d have to play with it to see if I could get it to work.

There might be more setup to get it to work. I end up making those with a little too much trial and error, and I’m not always sure what ends up working why, I just quit when it does.

1 Like

My method too!!!

1 Like

And thinking about this, you may not even need primary browse. Just make sure the likes are set up and it might populate it on it’s own.