# Multiple Results on a Simple Search

**URL:** <https://www.epiusers.help/t/multiple-results-on-a-simple-search/66625>\
**Category:** Epicor ERP 10\
**Tags:** customization\
**Created:** [April 23, 2020, 4:50pm UTC](https://www.epiusers.help/t/multiple-results-on-a-simple-search/66625 "2020-04-23T16:50:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![skearney](https://www.epiusers.help/user_avatar/www.epiusers.help/skearney/32/11498_2.png) [@skearney](https://www.epiusers.help/u/skearney)\
**Post date:** [April 23, 2020, 4:50pm UTC](https://www.epiusers.help/t/multiple-results-on-a-simple-search/66625/1 "2020-04-23T16:50:11Z")

</div>

I have a button which launches a Search on UD100. The search will only allow me to select one record at a time. I want to be able to select like 5 or more rows at a time. How can I modify this code to achieve that.

```auto
private void SearchOnUD100AdapterShowDialog()
	{
		// Wizard Generated Search Method
		// You will need to call this method from another method in custom code
		// For example, [Form]_Load or [Button]_Click

		bool recSelected;
		string whereClause = string.Empty;
		System.Data.DataSet dsUD100Adapter = Ice.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "UD100Adapter", out recSelected, true, whereClause);
		if (recSelected)
		{
			System.Data.DataRow adapterRow = dsUD100Adapter.Tables[0].Rows[0];

			// Map Search Fields to Application Fields
			EpiDataView edvMyCustomUD100View = ((EpiDataView)(this.oTrans.EpiDataViews["MyCustomUD100View"]));
			System.Data.DataRow edvMyCustomUD100ViewRow = edvMyCustomUD100View.CurrentDataRow;
			if ((edvMyCustomUD100ViewRow != null))
			{
				edvMyCustomUD100ViewRow.BeginEdit();
				edvMyCustomUD100ViewRow["Key1"] = adapterRow["Key1"];
				edvMyCustomUD100ViewRow["Key2"] = adapterRow["Key2"];
				edvMyCustomUD100ViewRow["Key3"] = adapterRow["Key3"];
				edvMyCustomUD100ViewRow["Key4"] = adapterRow["Key4"];
				edvMyCustomUD100ViewRow["Key5"] = adapterRow["Key5"];
				edvMyCustomUD100ViewRow.EndEdit();
			}
		}
	}

```

---

<div class="post-metadata">

**Author:** ![louis.fequet](https://www.epiusers.help/user_avatar/www.epiusers.help/louis.fequet/32/102245_2.png) [@louis.fequet](https://www.epiusers.help/u/louis.fequet)\
**Post date:** [April 23, 2020, 5:25pm UTC](https://www.epiusers.help/t/multiple-results-on-a-simple-search/66625/2 "2020-04-23T17:25:13Z")

</div>

Instead of all your code. Try this if you are in UD100 Form.

```
    SearchOptions searchOption = new SearchOptions(SearchMode.ShowDialog) { DataSetMode = DataSetMode.RowsDataSet };
    try
    {
        this.oTrans.InvokeSearch(searchOption);
    }
    catch
    {

    }
```

---

<div class="post-metadata">

**Author:** ![skearney](https://www.epiusers.help/user_avatar/www.epiusers.help/skearney/32/11498_2.png) [@skearney](https://www.epiusers.help/u/skearney)\
**Post date:** [April 23, 2020, 8:45pm UTC](https://www.epiusers.help/t/multiple-results-on-a-simple-search/66625/3 "2020-04-23T20:45:02Z")

</div>

That does return all rows but I can’t replace all of the code as I need it to search a particular adapter of UD100 and I need to tell it to return the search result data to a particular field. Are there aspects of this I can integrate into my original code?
