Creating a Part Search for BAQ

Recently, I’ve created a BAQ to view a indented BOM, and currently I use a single paramater, which can be difficult for people that don’t know the part name. I have it so they can use a ‘’ for multiple parts, but I wish it would be more like some of the default searches for epicor applications, and I was wondering if I could implement that. Ideally, I would like them to do two things. 1. Be able to use the parameter I already have, so that if they want multiple parts they can use the '’ to call back multiple top level parts. 2. Have a search function where they can start typing out a part and it will return multiple parts from all parts table. Kind of like this…

Just want to get a handle on what the best way is to do this.

Just wanted to bump this up again and see if anyone has any knowledge on this.

If you are wanting to use the parameter, I would look into customizing a form with an ultragrid,
and using the dynamic query adapter and the part search adapter to update it.

Many ways to skin this cat.

Now that seems to be a little outside my experience there. Where can I find this? I don’t necessarily have access to everything, but if there is another menu item I need besides BAQ stuff I can get it.

Bumping this up again as I am still confused at how I can acheive this? I’ve tried looking into a tracker view/advanced search but it doesn’t seem to be what I want.

If I understand you correctly, for your indented bom, you have a recursive query working in your BAQ. I guess I’m a bit confused as this is pretty advanced, yet you are asking about wildcards, which are relatively simple. So maybe I’m missing your issue?

I’m sorry if my question comes across as confusing. I already have the option for them using a wildcard. The issue is, they want to be able to also search for a part if they do not know the part. So like a basic search with a little menu that pops down with the parts that start with what they searched. Essentially like the Part search thats in every other application within epicor. I just want to make sure I keep the ability to manually type in a part number with a star after it so it picks up multiple parts.

Oh you want like a search button on a dashboard.

So if the dashboard is set up with a tracker and a Dashboard Browse filter, the Search icon in the toolbar will load the relevant quick search screen:


You can customize that quick search screen if you need.

You can also embed the dashboard in an existing forms. So when they search for something on the form (eg find a part number), the dashboard is on a tab, and uses the form’s part number to filter the BAQ.

Or you could customize the dashboard to add a button, add code to make it work.

Terry, I think is this almost getting right where I want it. Now, is there a way that I can make a button like you said called “Search” and it brings up the part search, so users don’t have to click the binoculars button? Then, once they have a list of searched parts, the part they select auto fills in my tracker?

The pain and suffering you want to put this man through… :rofl:

Use a BAQ and the Quick Search functionality built in? No code needed.

Do you agree then I should use Terry’s suggestion? Just need to know how to put that search functionality into a button then instead of the binoculars

Use a quick search a BAQ as your data filter.

You can customise the Quick Search to return data to your dataView on the Dashboard.

Here is the code to launch a Quick Search

//launch special search to retrieve pending PO receipts r
			object ret = ProcessCaller.InvokeAdapterMethod
						(oTrans.EpiBaseForm, "QuickSearchAdapter", "ShowQuickSearchForm", new object[] 
						{oTrans.EpiBaseForm, "YourQuickSearchIDHere", true/* multi-select */, new DataTable() });
			  
			// user cancelled
			if (ret == null) return;			
			ArrayList list = (ArrayList)ret;

What is ‘oTrans’? It gives me an error that it doesn’t exist in the current context.

Are you in a dashboard or entry screen?

I’m in the dashboard editor editing the code for the button

Or am I supposed to add this button within my BAQ Paremeter screen and get rid of the tracker view?

Just double checking you’re not in customisation layer of the tracker?

You’ve deployed the dashboard and added it to the menu then gone and customised the code?

I am in the customization layer of the tracker, should i do it after I deploy dashboard?

Yes, save the dashboard and deploy it.
Add it to your menu under Dashboard Assembly.

image

It will allow to you do stuff like this.

So I assume what you mean, is to leave the button off during the dashboard deployment, and then add it as a customization with a click event where that code is used, and then set it in the menu to use that customization?

Trying it that way gets me some errors within the compile as well. Not sure what I’m doing wrong, but I’m also really noob at this.

Also not sure if its related but when I try customizing it, I get this error. It still brings up the customization screen after though.

image

Here is the code: