Subject Re: [IBO] TIB_Query - Incremental Search
Author Paul Vinkenoog
Hi Marv,

> I have the following TIB_Query. I feed the results to a TIB_Grid
> and want to provide an incremental search capability. The desired
> result is that when the CustomerName column is selected, the
> incremental search will use Complaint.LASTNAME as the search column.
> Is this possible?

Yes, if you set up your OrderingItems and OrderingLinks the right
way. (IncSearch always uses the active ordering.)

Among your OrderingItems, there must be one like this:

LastName=Complaint.LASTNAME[,Complaint.LASTNAME DESC]

Let's say that this is your 3rd OrderingItem. (Attention: the topmost
item is No. 1, not No. 0)

Now, create this OrderingLink:

CustomerName=ITEM=3

That set up, if your user clicks the header of the CustomerName grid
column, the records will be sorted on Complaint.LASTNAME and IncSearch
will search using that ordering.


Greetings,
Paul Vinkenoog


[ left your SQL in for reference: ]

> Select Complaint.cid
> , Complaint.cpid
> , (Complaint.FirstName || ' ' || Complaint.LastName) as CustomerName
> , STREETNAMES.SNAME
> , STREETNAMES.SNAMESORT
> , STREETNAMES.SID
> , Complaint.COMPLAINTTYPE
> , Complaint.LASTNAME
> >From Complaint
> Left Outer JOIN STREETNAMES on STREETNAMES.SID = Complaint.sid
> Where Complaint.OpenDate > :startdate