Passing Parameter/Filter in Dynamic Query

I tried your method and I like it. Very powerful, I can do what I need without needing to worry about Epicor’s limitations. However, when I close the Dashboard, I get a “Save Confirmation” dialog popup. Not sure where this is coming from or how to suppress it. Did you have the same problem and how did you resolve it?

I’m glad to have someone else looking at this method, because it does open up a lot of possibilities.

The pop-up save on close is something we experience too, in most cases but oddly not all. I haven’t made a priority of getting to the bottom of it because it doesn’t seem to trouble any of our users, only me! They just click whatever they like and carry on without a further thought.

I assume the generic Epicor form has some kind of “dirty data” flag that activates for any EpiDataView and defaults to true, but I haven’t found it. If I do track down what’s going on then I’ll drop a note back, otherwise I’ll be grateful to know what you find.

I should add, by the way, that if you tick “Don’t show this again” when dismissing that Save Confirmation, you only need to deal with it once, so although it remains a niggle for those of us creating the dashboards that something isn’t quite right, it doesn’t affect anything much in practice.

Again, Thanks for the suggestion. I will update if I find anything more on eliminating the popup.

great code, i want to use it in Normal UI Form (PartRev) , hooked to ‘click’ button, with two ‘And’ parameters PartNum and PartRev, but the problem is that all PartRev existed in the ds, any idea in how can i hook to the current PartRev parameter to be able to filter my dynamicquery to it as well as PartNum.

I’m not familiar with that particular form, sorry.

But my general approach is to find which EpiDataView in the form contains the field data you want to work with, which is easily done in Customization mode by looking at the EpiBinding property of something that shows it. Then you can access that view with

EpiDataView edv = (EpiDataView)oTrans.EpiDataViews["viewname"];

It may have several rows, but the current one will be indexed with .Row, so you can get the field data for whatever is current with

edv.dataView[edv.Row]["columnname"]

It’s advisable to test for edv.Row > -1 to avoid errors with empty views, and if you’re passing the result to a DynamicQuery parameter then adding .ToString() is also sensible.

Apologies if that’s a bit “ABC” in terms of instructions, but you never know who else might want to know the same thing later!

1 Like

You could also use edv.CurrentDataRow[“columnname”]

Since we are on this topic, upvote: Dashboard Pass Silent Parameters to BAQ - Feature Requests and Suggestions - Epicor User Help Forum