Newbies developdba Posted June 12, 2012 Newbies Posted June 12, 2012 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")
Fitch Posted June 12, 2012 Posted June 12, 2012 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?
Newbies developdba Posted June 12, 2012 Author Newbies Posted June 12, 2012 Currently i have 4 units produced yesterday (6/11/2012) the count is showing 0
mr_vodka Posted June 12, 2012 Posted June 12, 2012 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now