Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8797733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:54:51+00:00 2026-06-13T23:54:51+00:00

Can somebody advise whether there’s a good built-in way (= AppleScript command) to pull

  • 0

Can somebody advise whether there’s a good built-in way (= AppleScript command) to pull out statistics for a DB:

I need to count the number of occurrences of a string in a particular field over all records.

E.g. for a record that has

  • Name
  • Phone
  • Town

the script would return how many records exist with identical towns.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:54:53+00:00Added an answer on June 13, 2026 at 11:54 pm

    Step 1 – Create a relationship.
    – File > Manage Database > Define Database
    – Relationships tab
    – Duplicate your table occurance and name it (I used related_towns)
    – Drag a relationship between the two from town to town
    – Click OK.

    This is what your relationships tab should look like

    Step 2 – Create a calculated field that counts the instances of the related (duplicative) town name.

    • File > Manage Database > Define Database
    • Fields Tab
    • Type in the name of your new field (I used number_of_related_towns) at the bottom of the screen
    • Select “Calculation” from the field type list
    • Count the times that the town appears in your relationship with this calcuation:

    This is what your calculation field should look like

    Be sure that “Evaluate this calculation in the context of” is set to the name of your base table (what your layout is based on). Replace related_towns with whatever you named your new table occurance.

    Step 3 – Write a script to display your data.

    • Scripts > Manage Scripts
    • New button (bottom left)
    • Rebuild the screenshot below. I added comments, which hopefully explain?

    enter image description here

    Let me know if you have any questions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hoping somebody can advise on an issue I have with simplexml. I need to
Can somebody help me with this. There is HTML code: <h3> <label> <input type=checkbox
I have quick question about jQuery plugins, hope somebody out there has some advice.
Can somebody please advise a very advanced book on the architecture of the web
Can somebody advise me what this code does and how can I convert it
Hi guys can somebody please advise how to cure the memory leaks in the
Please somebody advice me how i can run external application from web browser on
Hopefully I can find some words of advice from somebody. Is it possible to
Can somebody tell me what is the meaning of Installs: 100-500. What Google Play
can somebody paste me deploy.rb file with configuration for LOCAL MACHINE ? Whenever i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.