Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Filter on lookup field
Thu, Feb 28 2013 4:26 AMPermanent Link

Beni

Hello,

I have an EDBTable to which I have added a lookup field. Is is possible to filter on this field. If yes then how?

Thanks,
Beni.
Thu, Feb 28 2013 6:41 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Beni

>I have an EDBTable to which I have added a lookup field. Is is possible to filter on this field. If yes then how?

Not really. Filters are restricted to the data in the table. You can filter on the column that the lookup is from. The only other alternative is to use the OnFilter event. That will be slow and requires you to program all options.

Roy Lambert [Team Elevate]
Thu, Feb 28 2013 7:08 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Beni


I've just noticed that this is in the SQL newsgroup so are you referring to a lookup field set up in the field definitions or part of a result set? If the former my previous comments apply - its just like filtering a table. If the latter then the data is there in the result set and you filter it like you would any other column.

Roy Lambert [Team Elevate]
Thu, Feb 28 2013 7:34 AMPermanent Link

Beni

Roy Lambert wrote:

Beni

>I have an EDBTable to which I have added a lookup field. Is is possible to filter on this field. If yes then how?

Not really. Filters are restricted to the data in the table. You can filter on the column that the lookup is from. The only other alternative is to use the OnFilter event. That will be slow and requires you to program all options.

Roy Lambert [Team Elevate]

Thanks for the answer ...
Thu, Feb 28 2013 12:28 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Not really. Filters are restricted to the data in the table. You can
filter on the column that the lookup is from. The only other alternative is
to use the OnFilter event. That will be slow and requires you to program all
options. >>

Just a quick clarification - the OnFilter event in EDB uses an incremental
filter approach, so it will only read as many rows as necessary (in the
current index order) to fill up any attached data-aware controls, or only
one row if no data-aware controls are attached.  EDB will stop reading as
soon as it has found the required number of rows that satisfy the OnFilter
event handler.

Of course, this can be a problem if there is only one row that satisfies the
event handler, and it's at the end of a very large table.  But, if the event
handler is used in conjunction with normal filters/ranges that do the bulk
of the work, it can be effective.

Tim Young
Elevate Software
www.elevatesoft.com
Image