How to create custom fields

What are Custom Fields?

Powerbase is based on a database called CiviCRM, a free/open source database designed generically for non-profit organizations. The database comes with a set of core fields common to all non-profits - such as first name, last name, contribution amount, event date, etc.

However, all organizations are different, and often have very particular data collection needs.

Custom fields allow each organization to create special data collection fields just for you that appear in addition to the common, core fields available in every database.

Designing custom fields

Custom fields like to have friends: you can't create a custom field without first picking an existing custom field set or creating your own custom field set.

To get started, click Administer -> Customize Data and Screens -> Custom fields.

You should see a list of existing custom field sets with entires like the ones below:

Place close attention to the "Used For" column - it is the single most important concept when creating custom fields.

The data in your database has a structure. When adding custom fields it's important to follow the structure - otherwise, you might collect a lot of data but then not be able to pull it out in a search or a report.

The main "Used For" categories

Are you a visual learner? Here's a diagram of these relationships.

  • Contacts: Adding a contact custom field is common and intuitive. If you need to track a characteristic of a person, that doesn't change very often, then you should create a custom field that extends the contact record. Some examples include:
    • Extended demographics: ethnicity, disability
    • Neighborhood information: school district, police precinct
    • External identifiers: VAN ID, drivers license number
    • Personal characteristics: Donation ask range
  • Participant: Sometimes you want to track extra information concerning their participation in a given event. That information might be different depending on the event (a person might need childcare for one event, but not for a different one). Since the information might change depending on the event, you cannot track it as a contact custom field. Some examples include:
    • Dietary preferences
    • Needs childcare
    • Needs ride
    • Pronouns for printing on name tag
  • Contributions: Sometimes you need extra information on a per-contribution basis. Like participation, it might change for the same contact depending on the particular contribution. Some examples include:
    • Allow name to be publicly published
    • Send complimentary t-shirt (or not)
  • Activities: Activities are flexible pieces of dated information you can attach to a contact record, such as a phone call, a door knock or any kind of custom information you can think of, like an application for a scholarshop, participation in an after school program, or filling out an evaluation. You can add custom fields to activities too. Some common examples:
    • Rate the program from 1 - 5.
    • Why do you want to apply?
    • Upload a photo

Event or Participant?

You can add custom fields to events - but keep in mind that the custom field applies to the event, not the participation record. For example, an event custom field might be: Interpretation provided and it will allow you to distinguish between events that have interpretation available from those that have no interpretation available. This field would be useful when evaluating at the end of the year to see what percentage of events had interpretation available.

In contrast, you might have a participant custom field: Requested language that indicates which language each participant requests for this given event. This field would be useful to determine, before the event starts, how many people have requested a certain language so you can confirm or release your interpreters.

Getting the field in the right spot makes a big difference!

What about type?

In addition to the "Used For" field, there is also a type field. The type field is also important! It allows you to further restrict your custom fields. For example, you could have a set of custom fields that are used for Contacts but only Organization contacts, not individuals. Or you could add participant fields that only show up for certain events, but not others. Or, you can have activity custom fields that only appear when creating an activity of a certain activity type.

Choosing or creating your custom field set

Once you know what your field will be "Used for" and whether or not you can restrict it further by "Type" - you can either pick an existing custom field set or you can click the "Add set of custom fields" button at the bottom to create a new one.

Here's what the custom field set form looks like:

In this example, you can see that "Participants (Event Name)" is selected in the "Used For" field to indicate that this set of fields is used for Participants, but limited to the selected Events.

Keep in mind: you can always edit this field set later and add new events that should include these fields.

Adding fields

After you create a new field set (or if you click "Add or edit custom fields" next to an existing field set) you will have the option to add new fields.

Your first three options are the most important:

Be sure to pick a short, yet descriptive name for the field.

The data type describe what kind of data you are storing in this field. Alpha numeric data (data with letters and numbers and punctuation) is the most common. However, if you see a more specific type that matches your data (like money, date, yes/no, etc) then be sure to choose the most accurate type. Also - use "note" if you want the user to type more then one line of data (e.g. a full paragraph or more).

The field input type describes what kind of widget is used to display the field when it is time to enter data. A single line input field is the most common - allowing people to type whatever they want (useful for things like first name, city, etc.). However, be careful! If you plan to count results or reliably search for data based on what people enter in this field, then be sure to choose an option that will restrict the input to a set of pre-defined values. The select list is the most common. Radio buttons restrict the user to picking just one value. Whereas checkboxes and multi-select allow the user to select more then one option.

You can also make your custom field required. Note: we discourage making fields required here - because that requirement will apply to all forms in your database. Instead, you can make a field required just on certain forms, giving you much more flexibility.

And, you can indicate that your field is searchable. You usually want to check this box because otherwise, the field will not be available on the search page or any report pages.

Reduce the overload

When working in a database, nobody likes to be confronted by endless fields! Here are some tips to reduce the overload when adding custom fields:

  1. Carefully consider each field you want to use. Think backwards by asking yourself: once we have this data, how will I use it? When will I search for it or use it in a report? If you don't have an answer, don't add the field!
  2. Limit the scope. Always choose a type! Try to avoid adding custom fields that apply to all contacts, all participant records or all activities (unless you really want them to show up for all those records). Typically we want them to only show up when they are relevant.

It's political

Your decisions on how you design your custom fields can have a political effect.

For example, do you record pronouns on the contact record? If so, why? How do you plan to use them?

We generally recommend recording data in a way that is tightly coupled with how you plan to use it. For example, printing pronouns on an event badge is a useful way to remind people at your event that learning pronouns is important and respectful. So, recording this information at the participation level when the person registers for the event, with an explanatory text that the pronouns you enter will be printed on your badge, is a way of using data in a way that mirrors your values.

In contrast, requiring that people enter their pronouns on a general intake form in a way that adds the information to their contact permanent contact record, with no explanation for how the information will be used or why it is being collected, can easily be construed as a violation of one's privacy.

Customizing PowerBase