I have a list control in a UX, based on a mySQL table.
I want to apply server-side filters, as in Selwyn's video http://www.alphasoftware.com/video-l...&search=filter
I am using Action Javascript List Control Actions - Filter list - Server-side.
I 'm having trouble with the filter expression when I try to filter on a column in a joined table. It works fine using a column in the parent table: Status = 'Booked' where Status is the column name and Booked is the value I want to match.
Here is the sql query from the list builder:
The parent table is the loads table and the child is the stops table.
I have unbound date controls on the UX called StartDate and EndDate that are supplying the argument values for :whatStartDate and :whatEndDate.
I want the list to return a loads record if any of the child stops records has a value in the StopDate column that matches the StartDate control.
The filter expression should be something like: stops.StopDate = {StartDate} - but that does not work.
I want to apply server-side filters, as in Selwyn's video http://www.alphasoftware.com/video-l...&search=filter
I am using Action Javascript List Control Actions - Filter list - Server-side.
I 'm having trouble with the filter expression when I try to filter on a column in a joined table. It works fine using a column in the parent table: Status = 'Booked' where Status is the column name and Booked is the value I want to match.
Here is the sql query from the list builder:
Code:
SELECT DISTINCT loads.Load_ID, loads.FreightBillNum, loads.ShipFrom, loads.DeliverTo, loads.Status, loads.DateRec, stops.Stops_PK, stops.PUorDEL, stops.StopDate FROM loads loads INNER JOIN stops stops ON loads.Load_ID = stops.Loads_FK WHERE loads.DateRec BETWEEN :whatStartDate AND :whatEndDate GROUP BY loads.DateRec, loads.Status, loads.Load_ID ORDER BY loads.FreightBillNum
I have unbound date controls on the UX called StartDate and EndDate that are supplying the argument values for :whatStartDate and :whatEndDate.
I want the list to return a loads record if any of the child stops records has a value in the StopDate column that matches the StartDate control.
The filter expression should be something like: stops.StopDate = {StartDate} - but that does not work.
Comment