Jump to content

This topic is 8264 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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)

This topic is 8264 days old. Please don't post here. Open a new topic instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.