Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Calculating Totals

Featured Replies

Hi all. I think I have a simple scripting issue. I have a table with three pieces of information: places, dates, and names (each record is one kid's name, the place he attended the workshop, and the date he attended). The idea is, we've been holding workshops at certain places on certain dates and we want to calculate the number of people who attend these workshops.

I'm sorry I'm a real newbie with scripting. I'm currently working on trying to calculate the total number of children who attended workshops on a certain date in a certain place. I'm trying to set up a script that loops - after sorting the records, it goes through all the records and if the place and date are the same, it adds one to the counter. Once the date and place are not the same, it outputs the number to a field. Is there a more efficient way to calculate this? I feel like there should be an easier way.

Thanks in advance for anyone's input.

Create a self-relationship by date and location. With that, you can calculate the count of the related records. You can also use a go-to-related script step to view all records for that date and location, if you want to take the user there.

HTH

  • Author

Wow, Chris. Thank you so much for your quick reply!

I understand what you mean about creating a self-join relationship and have done so, but since there are different "date and location" pairs and thus different counts, I'm not sure how to go about exactly "counting related records." Would I use a script?

OK, create a relationship between Table and Table_self where date = date and workshop = workshop.

In your table, create a calculated field that equals Count ( Table_self::primary_key )

I don't think you'll need a script for anything, here.

  • Author

This is excellent! Thank you so much, Chris and Comment! This forum is so useful. =)

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.