This content has been marked as final. Show 1 reply
Don't actually need a script for this.
- Open Manage | Database | Fields and select Table B.
- Double click the County field and specify the Unique values, validated always options.
- Now you can use Import records to copy all the data from Table A to Table B. The validation options from the previous step will automatically filter out the duplicates. (Note: even one small typo that adds a space or punctuation will not be filtered out.)
- You can relate your fields by their County fields and then a calculation field in Table B can use Count ( TableA::County ) to count all records in Table A with that County name.
There's another way you can get a count of all your county records without creating a second table and importing the data.
- Define a "count of" summary field in table A that counts your county field.
- Create a layout to this table and place a sub summary part "when sorted by" the county field. Place the county name and the summary field in this sub summary part.
- Delete the body from this layout.
- Show all records and sort them by County to see a list of all your counties and their counts.