Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I am trying to create a script. In the attached file there are fields that list the location names and inspection dates. In some cases there are muptle dates for one location. I want to count Location Names as one inspection and show a total of all inspections. HELP

1-6-200.fp7.zip

Posted

There are 2 ways to do this. The simplest is to create a self-relationship on the Location. Then count via a calculation:

Sum ( self-relationship::Loc Name )

You could also store the Locations in their own table, one record each, with a relationship to the inspections on the Location name, then count from there. More or less the same thing. But more "relational," with the advantage that you would only need to store things like the location address once. Also easier to see an "overview."

The "total" of all inspections is just the found count; you could use a Summary count field of that in a "Subsummary Part" for a report; but otherwise it's just the found count.

I redid your "sub total" field. I couldn't see what the calculation was doing; it was an odd one.

InspectionLocations.zip

Posted

Hi, I've tried to apply the solutions you have suggested without success. The problem is my skill level. I'm pretty much a newbe. While I am a ouick study, I don't seem to be thinking in that database mind-set yet. To arrive at the correct answer, I exported the file as a csv file, opened the file in Excel, used the sub-total function grouping by location name, then running another sub-total on the location names to arrive at a grand total of 31 inspection for the 34 violations, Convoluted, but it worked. I do thank you for help.

  • Newbies
Posted

Another way to count unique values:

Make a value list, "Locations" with the contents of the location field. That will only have one entry per value.

Then to count the values, make a calculation field with:

PatternCount(ValueListItems("Count.fp5", "Locations"),"

Posted

I believe Fenton intended to use Count instead of Sum in the calculation he posted. Summing names doesn't make sense; counting them does.

  • 2 weeks later...

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