Thoughts on Approach to "Pass Parameters Silently" on Dashboard

This is something that has bothered me for years and I know it is something that many other users have wanted. Additionally, there are lots of good ideas out there to implement this type of functionality through customization on this site. None of the approaches that I have seen really got me excited (but I think that is because I did not understand C# and coding as much as I do now).

I have come up with the following approach and am interested in getting some feedback on it. Thanks in advance.

Create a BAQ and set up the filters you want on the tables. Don’t use Parameters, just select the field and have it equal an empty string.

image

Now that the BAQ is done, create the dashboard and just put in a grid view. Deploy the dashboard. Open up the dashboard in Developer Mode. Add in a sheet and whatever tool is needed to select the filters. I used two dropdowns.

image

Bind the fields to CallContextBPM fields. Now, go to Method Directives and put a Pre-Processing BPM on Ice.DynamicQuery.Execute. A condition can be put on it to call out the specific Query. Then I entered the custom code.

var ttQueryWhereItemRow = queryDS.QueryWhereItem.Where(Q=>Q.TableID == "PlantWhse" && Q.FieldName == "WarehouseCode").FirstOrDefault();

if(ttQueryWhereItemRow != null)
{
  ttQueryWhereItemRow.RValue = callContextBpmData.Character16;
}

var ttQueryWhereItemRow2 = queryDS.QueryWhereItem.Where(W=>W.TableID == "PlantWhse" && W.FieldName == "PrimBin").FirstOrDefault();

if(ttQueryWhereItemRow2 != null)
{
  if(callContextBpmData.Character11 == "")
  {
    ttQueryWhereItemRow2.CompOp = "<>";
  }
  else
  {
    ttQueryWhereItemRow2.RValue = callContextBpmData.Character11;
  }
}

Now, when you run the dashboard with the refresh button, you will send specific filters to the query without any Parameter box pop up.

One of the things that I see as a problem right away, if you go this approach and use it on a lot of dashboards, the BPM will become monstrous with conditions. Not sure if that is a significant impact or not.

1 Like

Note that it is my understanding that the latest version of BAQ/Dashboard now supports sending values into the parameters without a popup. :wink:

1 Like

We are on 10.2.600 and it only supports mapping parameters to a list of Epicor constants. Has this changed in 10.2.700?

John - The list of values you can map a parameter against includes the list of Epicor constants and it also includes any “Publishers” setup in the dashboard. This is the same as how the Filter configuration worked in previous versions but Parameters values are sent to the Server as criteria while Filters are executed on the Client against the returned data. Generally more efficient to pass as a parameter…

Published values passed as parameters came in at 10.2.600.

4 Likes

@Rich Thanks so much! It looks like you can’t use the same Parameter Names in the parent and child queries.

Is there a simple way to bind a parameter to a text box and suppress the parameter popup?

Simple way to suppress the popup - not currently. Have you tried BAQ Markup instead?

I will look at the same Parameter name issue - sounds like a coding oversight.

Tim,

I’m working in a MT environment and see what you mean. This is a good start, but we can only select from a list of constants for the value. We need to be able to have something on the dashboard pass it’s value to the Parameter filter to run.

I have started a UBAQ that is using a UD table
In one case - I wanted to return invoices between two dates.

Created a UBAQ using UD10 - updating the Key1 value with the UserID by default.
Date01 and Date02 then are used to capture the dates.

In my second query - I add a subquery that uses UD10 to filter the records through a join - Company to Company with a criteria on InvoiceDate >= UD10.Date01 and InvoiceDate <=UD10.Date02

Put both queries on the dashboard
For the UBAQ - deploy a tracker view and get rid of the grid view

So, the silent parameters works when I am in the ‘Dashboard’ menu. I have 1 ‘parent’ BAQ and 2 ‘child’ BAQ which have their parameter set to one of the published column of the ‘parent’ BAQ

However, once I deploy my Dashboard and open the menu where I added it, I still have the parameter window opening for each of the BAQ that has a parameter. Is that normal or did I miss a setting somewhere?

Did you get any solution for the same?

1 Like

No solution unfortunately :frowning: