Coding help needed

rwn102

New Member
I have a smart local query and a smart browse that have identical query

statements:

FOR EACH custom.maintreq NO-LOCK,
FIRST symix.notes WHERE symix.notes.key = custom.maintreq.key OUTER-JOIN NO-LOCK,
FIRST symix.item WHERE symix.item.item = custom.maintreq.item NO-LOCK:

With this as is, the browse works fine.

Now, I want the browse to only show those records that do not have a job-closed date. I remember reading in the SL training that you should never put a where phrase in the smart local query. So I added a where phrase to the smart browse making it look like this:

EACH tt.tt-maintreq
WHERE tt.tt-maintreq.close-date = ? NO-LOCK,
FIRST tt.tt-notes WHERE tt.tt-notes.key = tt.tt-maintreq.key OUTER-JOIN NO-LOCK,
EACH tt.tt-item WHERE tt.tt-item.item = tt.tt-maintreq.item NO-LOCK

When I compile and run this browse, the browse is showing records with and without close dates but only records that have hits to the notes table.

I have also tried to use a state set up in the smart local query with the default state checking the close-date in tt-maintreq with the same results.

Any thoughts?
 
Back
Top