3

Apologies if this isn't the best place to ask, I'm completely new to CiviCRM and could do with some advice on the best way to store custom data.

I'm building a database of churches. For each church I want to record the denomination. Depending on the denomination, there are other details I also want to record. For example, for anglican churches I want to record the diocese, and for some dioceses I want to record further administrative subdivisions that churches belong to. But other denominations don't have those structures, and might have completely different ones. And some churches belong to more than one denomination, so might need the full structure details for two or even three of them.

As far as I can see there are three different ways I could organise that data:

  1. Using custom fields. I could create a multiple record fieldset allowing me to record more than one denomination for each church. But then how would I store the different structures for the different denominations?
  2. Using tags. I could create tags for every different level of every denomination in the database, so for example a church could be tagged with 'Anglican, Leeds Diocese, Bradford Episcopal Area'. But then the tags would exist for any contact in the database, not just churches, which could lead to a lot of clutter and confusion among users, particularly as the database grows.
  3. Using relationships. I could create organisational contacts for denominations and dioceses, and then use a relationship to associate, e.g. X church is a member of Methodism, or Y church is a member of Southwalk Diocese which is a member of Anglicanism. But I think that will also be confusing for users, particularly when adding a church from a new diocese/denomination, and could lead to lots of shadow contacts that only exist for the purpose of categorisation rather than as actual contacts.

I'm leaning towards custom fields, but the only way I can see of getting the result I want would be to have a different contact type for each denomination, and then a fieldset for the relevant structural information on each contact type. Which would mean the denomination would have to be filled in by users in a box headed 'Contact Type' instead of a box headed 'Denomination', and that it would be mixed in with other non-church contact types.

What would be the best practice method?

3
  • 1
    is this Drupal or WP or Joomla. Asking because Webform Drupal lets you side step a lot of constraints in civi about creating complex relationships etc in a single form
    – petednz - fuzion
    Commented Oct 9, 2018 at 18:38
  • I'm on Drupal. Complete novice at that too though! Commented Oct 12, 2018 at 9:14
  • 1
    I would say it is definitely worth wrapping your head around what webform_civicrm lets you do - has been a lifesaver for us so often
    – petednz - fuzion
    Commented Oct 12, 2018 at 23:33

1 Answer 1

0

The best architecture would be to create Organisation sub type and then have relationship with subtype contacts. This would be easy to related contacts such as in your case. Adding relationship will be consistent and easy to add custom ACL.

If you want to use custom fields than you will need to create multi-value custom field of type contact reference for each contact sub type. This field will pull contact(s) from specific contact group which can be smart group or normal group having contacts of specific contact type. In this way you can create hierarchy of relationship using contact type.

But i believe you will need to add some custom code i.e either building custom report or restricting contact CRUD operation for user belonging to specific denomination.

2
  • Thanks. So you're saying the best option is not to use custom fields, just relationships? I can set that up for the existing data. Is Webform Drupal that petednz mentions then the thing I need to learn to build a more friendly interface for my users, so they can choose from a drop down of the denomination organisation subtype and have the relationship created automatically? Commented Oct 12, 2018 at 9:33
  • Both are good options to implement. Its your call based on how much you want to customize screen like make the UI form simpler so that user don't have to follow 10 steps when he wants to create/update a contact., Reports. So using combination of Custom fields and relationship will be an good idea. Custom fields will be easily available on screen and relationship will be useful to structure your org and also to have historical logs about relationships. But you may need to add bit of coding to make simple for user. Commented Oct 12, 2018 at 10:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.