CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Entering Info (Golf Scores) for a Group or Tag via Profile
Pages: [1]

Author Topic: Entering Info (Golf Scores) for a Group or Tag via Profile  (Read 1954 times)

Rick Cunningham

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 3
    • Landings Men's Golf Association
  • CiviCRM version: 4.5.7
  • CMS version: Drupal 7.34
Entering Info (Golf Scores) for a Group or Tag via Profile
October 28, 2013, 04:19:17 am
I'm setting up a site for a golf group with a few hundred players who get together once a week, have a membership fee, have an annual dinner, raise money for charities, etc.

All the normal membership, fundraising and event stuff is of course straightforward. I'm having a hard time figuring out the optimum way to implement the very frequent stuff - a "tournament" once a week, with signup, scores, points earned, etc.

I could implement this as an event for signup purposes, but I don't know the best way to structure the data for scores and points, nor the best way to do the data entry - we have a number of team captains who have 20 - 30 people whose scores and points they track - so they could enter the scores and points on a spreadsheet type view, and maybe some other info like tracking no-shows.

I've tried to use profiles for event signups for members of a group/tag but apparently that's not possible. I thought batch input would be the answer, but that's only implemented for memberships and payments - I could keep adding custom fields but that would get very messy, I think.

So does anyone have any advice here? I'm thinking maybe just a good old Google Docs Spreadsheet that we manually update and link back to our database would do the trick, but the manual synchronization takes away a lot of the value of all this.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Entering Info (Golf Scores) for a Group or Tag via Profile
October 28, 2013, 08:33:45 am

if i had to guess, some custom code and tables along with civicrm might help out quite nicely.

The scores / dates / other info can be kept in a multi-record custom group (or an activity with custom data)

you can then build a custom batch input form to enter these values for a group and expose this form to the captains

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Entering Info (Golf Scores) for a Group or Tag via Profile
October 28, 2013, 09:45:51 am
Hi,

I'd use custom fields on the participant to store points. To make a quick data entry, you'll need to write a bit of custom code, either using the ajax edit in place (if it's only to enter points) or something more advanced like slickgrid (Eileen has started something that could help, but would need some extra coder/budget to finish if I recall properly)

Would be great you share the result.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Rick Cunningham

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 3
    • Landings Men's Golf Association
  • CiviCRM version: 4.5.7
  • CMS version: Drupal 7.34
Re: Entering Info (Golf Scores) for a Group or Tag via Profile
October 30, 2013, 04:49:29 pm
I'll be happy to share the results - I'll probably have to do undergo some "personal growth" to figure out how to do the things mentioned, but with you and Lobo commenting, I think I can stumble through this. I'll report back when I come up for air. Thanks for the pointers.

Rick

Rick Cunningham

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 3
    • Landings Men's Golf Association
  • CiviCRM version: 4.5.7
  • CMS version: Drupal 7.34
Re: Entering Info (Golf Scores) for a Group or Tag via Profile
October 30, 2013, 06:01:38 pm
So let me ask a couple of questions:

With upwards of 40 activities per year, it seems like I need the equivalent of a 2 dimensional array - columns are the date of the tournament (maybe 40 or 50 columns) , the rows are the gross score, handicap, net score, foursome, points earned, etc.

I think you both said to create a custom field set, which I think would contain the row info, for each individual - gross, handicap, net, foursome, points, etc. - but then I'd want 40 or so custom field sets per year, which doesn't seem like the right thing to do. Is there any straightforward way to create a 2 dimensional array of field sets? I realize this is straightforward from a database point of view, but I'm wondering if some element of the UI for defining custom field sets could implement this. And then again, maybe the solution is right here and I'm missing it?

The way I see it is custom field sets allow a number of fields as a group to be associated with an individual, and perhaps I'm looking for custom field set to be associated with every individual/date combo? An outer join of individual/tournament? Please forgive the naiveté of this if it makes no sense!

Thanks,
Rick

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Entering Info (Golf Scores) for a Group or Tag via Profile
October 30, 2013, 08:17:42 pm
i think the suggestion from X was that if you have the fields on Participant Record - one row - then the golfer would participate in 40 events in a year - 40 Participant records = 40 rows

I would probably have gone down the Activity route but with the same intended outcome.

Namely, one item (Activity or Participant record) for each 'tournament'

Then you should be able to wrangle your table out of Views of Custom Report

hope that helps a bit
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Rick Cunningham

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 3
    • Landings Men's Golf Association
  • CiviCRM version: 4.5.7
  • CMS version: Drupal 7.34
Re: Entering Info (Golf Scores) for a Group or Tag via Profile
October 31, 2013, 04:57:34 am
By Jove, I believe I've got it!

I didn't realize that custom fields were so versatile - I've been thinking contact or individual and now I see that I can add fields to activities, events, events by name, events by type, etc. NICE WORK, contributors.

So here goes:
New Event type - name it Golf Tournament
New Custom Field Set, used for participants in Event of Type Golf Tournament - name it Individual Scoring
New Custom fields - Gross Score, Net Score, Special Score (Stableford, Progs, Team, etc,), Points Earned, Pro Shop Credits earned, Notes

Now let me see how to get this into a workflow.

OK I can see that it gives me the desired multiplicity - there's one of these for each participant in each event of the particular type. I need to look at the database structure that this generates to begin to grok it.. and design some custom input and reporting screens. Thanks guys!!
« Last Edit: October 31, 2013, 07:35:49 am by Rick Cunningham »

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Entering Info (Golf Scores) for a Group or Tag via Profile
October 31, 2013, 06:28:05 am
Hi,

Not sure it's what you did already, but you should add the custom fields to the participant, not to the event.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Rick Cunningham

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 3
    • Landings Men's Golf Association
  • CiviCRM version: 4.5.7
  • CMS version: Drupal 7.34
Re: Entering Info (Golf Scores) for a Group or Tag via Profile
October 31, 2013, 07:39:47 am
Thanks X - that's what I had done, but I misstated it - I've corrected it above.

Ciao,
Rick

Rick Cunningham

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 3
    • Landings Men's Golf Association
  • CiviCRM version: 4.5.7
  • CMS version: Drupal 7.34
Re: Entering Info (Golf Scores) for a Group or Tag via Profile
November 01, 2013, 04:10:49 am
Just continuing with setting up scoring, etc. for weekly golf tournaments for lots of folks.

Since this is my first attempt at designing custom input and output forms, requiring custom queries from the civi db, and even though everyone else may already know this, I didn't. It might be helpful for the next newbie who tries something like this.

So a couple of key Civi database tables this has generated or modified are:

civicrm_custom_group - now has another record for the Individual_Scoring custom field group, which extends participant in a golf tournament

civicrm_custom_field - now has records for each of the fields I've set up for this custom group

civicrm_value_individual_scoring_3 A new table that contains the actual values for each field for each participant for each tournament

I think the next step will be to do a query that joins that last table with contact and tournament tables and selects rows for   a particular tournament for individual score info, with columns for name, tournament date, gross score, net score, points, etc. That would be the reporting function, and then I need to make some sort of data input form with the same stuff, but with the ability to edit and fill in some of the columns.

Lobo's post refers to this as a Custom Batch Input Form, and X suggests custom ajax edit in place code, or using slickgrid, so I'll report back when I've figured out what all that means and how best to do this.

I'm only able to spend a small amount of time on this one item, so I'm keeping a bit of a log of the steps here, both to jog my memory as well as to allow others to follow along. Later I'll produce a brief end to end summary. 

Also, even though I started this with the idea of using profiles for data entry, I'm not positive profiles will be involved, so maybe after this is complete (and if it's useful) Dave or Don can tell me where I should re-post this.
« Last Edit: November 01, 2013, 04:23:14 am by Rick Cunningham »

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Entering Info (Golf Scores) for a Group or Tag via Profile
November 01, 2013, 04:47:23 am
Hi,

Do not access directly the table, but use the api that hides the complexity behind (well, most of it anyway).

the wiki should be a good place to start.

I'm not 100% sure it works or not, but you can set the return param of the api call and ask to get the custom fields (return="custom_42,status,..."). It works for getting custom fields of the contact while you get contacts and might a well for participants.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Rick Cunningham

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 3
    • Landings Men's Golf Association
  • CiviCRM version: 4.5.7
  • CMS version: Drupal 7.34
Re: Entering Info (Golf Scores) for a Group or Tag via Profile
November 01, 2013, 04:55:01 am
See, that's what this community is all about!

X knows what I want to do, I tell everyone how I think I should do it, and then X tells me the smart way to do it. Thanks Xavier. I'll pay back by posting the synopsis!!


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Entering Info (Golf Scores) for a Group or Tag via Profile

This forum was archived on 2017-11-26.