mattc Posted June 19, 2002 Posted June 19, 2002 In my two database files (Contract) & (Contract Log), I need to be able to count the number of related Contract Logs per Contract, which fall in between two date fields (defined in Contract). At the momemt this isn't working because I suspect I'm miss-using the count command. The two files are related via a (Contract Ref No). This is the calculation field i've been trying within Contract which returns a number, however, it seems to count all records in Contract Log, not just the ones within the date range: Case(contract log::log date >= date1 and contract log::log date < date2, count contract log::contract ref no)) What is the correct way to do this? Thanks
AndriesV Posted June 19, 2002 Posted June 19, 2002 In the Log file create a calc.field "cWithinContractDateRange": If((log-date >= contract::date1) and (log-date < contract::date2), 1, 0) Now in the Contract file create a calc.field "cLogCount": sum(contract-log::cWithinContractDateRange)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now