My company wanted to add and remove columns on the base search for Line/Release on the Receipt Entry form, so I went down the path of setting up a quick search to replace the base search. The problem I ran into is that, from what I can tell, quick search is only capable of returning one column value from the baq results whereas the base search for line/release adds both the selected line and release.
Is there any way to get around this or possibly another solution to this problem?
Hi @cschrempp:
Maybe create a calculated field in the BAQ to concatenate the two columns, and use that new field in your quick search?
You are looking at some Customization. Ditto what @Matthew_Morgan said.
Example:
private void btnJob_Click(object sender, System.EventArgs args)
{
// Quick Search
object selected = ProcessCaller.InvokeAdapterMethod(oTrans.EpiBaseForm, "QuickSearchAdapter", "ShowQuickSearchForm", new object[] {
oTrans.EpiBaseForm, "QS-JobsReadyForABC", false /* multi-select */, new DataTable()
});
if (selected != null)
{
string jobNum = selected.ToString().Split(',')[0];
string partNum = selected.ToString().Split(',')[1];
string partRev = selected.ToString().Split(',')[2];
if (this.CheckRecordExistsByJobNum(jobNum) == false)
{
edvUD100A.dataView[edvUD100A.Row]["ChildKey3"] = jobNum;
edvUD100A.dataView[edvUD100A.Row]["ChildKey4"] = partNum;
edvUD100A.dataView[edvUD100A.Row]["ChildKey5"] = partRev;
}
else {
EpiMessageBox.Show("Job already exists on this Batch.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
Try add “SysRowID” column from the orderrel table into the BAQ. Then, your quick search return column should return “SysRowID”.
This is good…learning something new every day.
Or that return the SysRowID and then do further lookups in your code and get the Rel row which usually contains Head, Line information as well.
That worked perfectly, thank you.
While we’re on the topic is it possible to autofill a value from the form to the quick search? Like autofill the search with the PO, for example, that is currently in the dataview? Currently its a prompt and the user has to enter it every time.