madman411 Posted March 2, 2013 Posted March 2, 2013 I'm attempting to create a "results" panel on one of my forms which is displayed after a find is performed. Getting the foundcount was easy, but I want to also display the foundcount of unique values in the found set. I have a damaged field - the field either contains a "Damaged" or "NotDamaged" value. I want to return the results of each. I have created two fields - _found_count_damaged and _found_count_notdamaged. I'm struggling to find the correct formula to display these results accurately from the found set: Count( _damaged) = "damaged" always returns a result of 0. Can someone please point me in the right direction? I'm also attempting to display the omitted results for each found count. It is accurately telling me what records have been omitted from the entire table, but not just the found count. The value should initially be "0" unless the user actually omits a record from the found count. Is this possible? This option isn't necessary, though I thought it would be interesting to include it. The formula I have so far is: Get (TotalRecordCount) - Get (FoundCount)
Wim Decorte Posted March 3, 2013 Posted March 3, 2013 A couple ways I can think off right off the bat: - use the new ExecuteSQL to do a two counts or - do the search for the "damaged" first, store the found count in a variable, then extend the found set with the "not damaged", the difference in found count will the the count of the not damaged or - after building the found set, fire a looping script to inspect all the records and keep two counters. You can use the GetNthRecord function to avoid actually having to visit each record. Depending on the number of records in the found set this can be very fast
Recommended Posts
This topic is 4282 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