The Mad Jammer Posted January 3, 2005 Posted January 3, 2005 I have a file with about 32,000 records in it and a bunch (about 40) of numeric type fields that are formatted as boolean. I wanted to find out how many of each of these field there are in the data base that are turned on, in other words they are marked. So, clever guy that I am, I created a summary field for a few of them and selected "Total of" as my summary function. Since the fields I am counting have either a 1 or a 0 in them, the total of the field is also the number that are marked. That's the clever part. However, after I closed the file and then reopened it, the summary fields I defined began recalculating themselves, and this took quite a long time since there are 32,000 records and each summary field went through the entire file. It was obvious that I could not do this for all the fields I had hoped to calculate because there are about 40 of them I wanted to summarize and it would take all day just to get bring file up. Is there any way to make this more painless. I want to know how many times each of these 40 or so fields has the value 1 in it. Obviously a summary field wont do. Thanks The Mad Jammer
-Queue- Posted January 11, 2005 Posted January 11, 2005 I would use a script to set a number field with Sum(rel::numfield), where rel is a self-relationship based on a calculation field equal to 1. When you want to update the field, run the script again.
The Mad Jammer Posted January 18, 2005 Author Posted January 18, 2005 In the end I defined a calculated field for each total and wrote a script for each that performed a find and populated the calculated field with the Status(CurrentFoundCount) of each. Then I wrote a master script that executed 42 opther scripts that calculated all of the fields I was interesetd in. It takes about 15 seconds to calculate all of the values. Acceptable for now but I'll try your suggestion to see if it works faster. I suspect it will. I gotta tell you this self relationship thing is kinda weird. I get it but still... The Mad Jammer
Recommended Posts
This topic is 7248 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