In a message dated 98-06-01 10:15:11 EDT, you write:
Lisa wrote:
I have a key field named Job that is tied to multiple Date fields. Is
there a
way to filter all Job fields that have an specific Date field?
Ex:
Job Date
1111 1/7/98
1/20/98
2/15/98
2222 1/3/98
2/2/98
6666 1/21/98
4444 1/7/98
4/11/98
I want to filter out all jobs work on 1/7/98 resulting in:
Job Date
2222 1/3/98
2/2/98
6666 1/21/98
Any suggestions? Thank in advance for any and all help!
Lisa,
What you will do is create a filter. Instead of selecting the values from the list you will need to define what values to select with a a function. Bring up the filter panel and add the field you want to filter on, in your case date. Then choose the edit button. What you need to do is then create a function to select the values you want to see. You function will look something like this:
= <> ‘1/7/98’
This is a tricky question. Glenn, in your answer you will remove rows that have a date of ‘1/7/98’, but you won’t remove all of the jobs that have any work done on that date… which if I am reading the question correct is what is desired. Look at the desired result set and you will see that job 4444 has been totally eliminated, not just the row showing work on 1/7/98. Ditto for job 1111.
Lisa, what you are looking for is essentially a sub-query on a report. In other words, show me all of the jobs that are NOT IN LIST of jobs with work on a particular date. I played with this a while and have not come up with a solution for you to use with a Filter. It may be possible, but the more obvious solution to me is to use a Sub-Query instead.
Your initial query could be the same as what you have now. You would add a condition on Job, use the “Not In List” operator, and create a sub-query.
The sub-query would contain the Job as a result object, with a condition for the particular date that you want to eliminate. Something like:
Date Different From ‘1/7/98’
The sub-query returns a list of jobs that don’t have work done on the particular date, which is then used as a list of jobs to report on for the outer query. This solution will eliminate all of the job records that have any work done on a particular date. You could also easily change the date condition from ‘Equal to’ to ‘In List’, ‘Between’, or any other supported operator on the query panel. Use a ‘Prompt’ for the date and you have a fairly flexible report set up.
Any other conditions that you may have on the outer query would also continue to be applied, of course.
The drawback to this solution is that you have to “refresh” the report (requery the database) each time you want to change the date. Depending on the speed of the query this could take a while.
If the sub-query solution does not work for you for one reason or another, please post another question and I will continue trying to work out a Filter solution!
Regards,
Dave Rathbun
Integra Solutions
www.islink.com
See you in Orlando in '98!
Listserv Archives (BOB member since 2002-06-25)