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

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

Recommended Posts

Posted

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.

Posted

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

Posted

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?

Posted

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.

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