Limiting an Adapter

Hi Carl,

Below is an example of filtering using search options and an adapter. In my case, I am using the MemoAdapter to get all memos, and I am filtering on Memo.Key1 = OrderNumber and Memo.RelatedToFile = "OrderHed".

Dim memoAdapter As MemoAdapter = New MemoAdapter(SalesOrderForm)
memoAdapter.BOConnect

Dim opts As SearchOptions = New SearchOptions(SearchMode.AutoSearch)
opts.NamedSearch.WhereClauses.Add("Memo", String.Format("Key1 = '{0}' AND RelatedToFile = '{1}'", ordNum, "OrderHed"))
Dim morePages As Boolean

Dim memoDataSet As DataSet = memoAdapter.GetRows(opts, morePages)

In your case, you'll need to change the Key1 and RelatedToFile to appropriate columns. I would imagine you would use JobNum as one, and that may be the only one you need.

--- In vantage@yahoogroups.com, "CarlH" <carl.heeder@...> wrote:
>
> I hope that someone can help me.
>
> On a PO for subcontracting, I want to give purchasing the ability to add a reference to the material being provided.
>
> I think I need to add an UltraComboBox and link it to the JObMaterailSearchAdapter. This should limit their choices to materials called for on the job. And from there I can get lot numbers, and quantities issued to the job
>
> But what I need to do is to focus the adapter on just the job referenced in the PO line.
>
> How can I tell the adapter to use a specific job number?
>
I hope that someone can help me.

On a PO for subcontracting, I want to give purchasing the ability to add a reference to the material being provided.

I think I need to add an UltraComboBox and link it to the JObMaterailSearchAdapter. This should limit their choices to materials called for on the job. And from there I can get lot numbers, and quantities issued to the job

But what I need to do is to focus the adapter on just the job referenced in the PO line.

How can I tell the adapter to use a specific job number?