Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

  • Newbies
Posted

let me start by saying i am new to filemaker and i am having an issue with a calculation field. I am trying to get a total count of units produced and the total footage for the previous days production run. I am trying to use the if statements below but its not totaling out correctly. Thanks in advance for the help...

total record count for previous day - If(date=( Get(CurrentDate)-1);(Count(barcode));"0")

total footage for previous day - If(date=( Get(CurrentDate)-1);(Sum(length));"0.00")

Posted

It would help diagnose your problem if you gave an example of actual vs. expected results. That said, if these are calculated fields, and you want them to update based on current date, you'll need to go into the field storage options and select the "do not store" checkbox.

Another possible issue is with the Count and Sum functions. They don't operate on a found set, but rather on related records, repeating fields, or a group of fields. Maybe that is part of the confusion?

Posted

You still havent provided enough info about your structure or how you are trying to aggregate the data. As Tom said, the function would act differently on related records than when referencing a field in the table itself. Perhaps the best bet would be to create a relationship to "yesterday" records:

You can create a calc as such:

cYesterday = Get ( CurrentDate ) - 1

Then have your relationship keyed from this field to the date field ( records creation date field perhaps? )

This will give you all related yesterday records. Then you can either use summary fields or new calcs with Sum ( ) and Count ( ) to get your data.

This topic is 4604 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.