Rock U - Rock Fundamentals - Properties and Attributes
Transcribed Video Content
Every record in Rock has two kinds of fields, and mixing them up can cause some real confusion. Properties come out of the box in Rock to track common things such as a person's name or birth date. And when Rock doesn't include a property that fits your needs, use custom attributes to extend Rock and create your own custom fields. So let's really illustrate what properties and attributes really look when it comes down to it. So properties are columns on an entity and rows are people for example.
So these are all different entities, Ted Decker, Cindy, and Noah, and we have different properties associated with different fields. So we have an ID, we have a first name, a last name, an age, and an email. These are the things that we store right on the entity and Rock has shipped out of the box. So these are the things that we expect or know that most organizations will need for an entity we've decided are something that's worth actually storing on the entity. So when you hear the word column, think of a property.
Then attributes extend the entity. So there's no column for a t shirt size on a person for example. So it's to store... It is stored beside the entity and tied back using an ID. So we have the person entity box here, then we have an attribute value and we're tying using the actual entity ID as in the person ID here.
We can take an attribute and a value we've set for the person. So say Ted Deckers, t shirt size is large. We can connect those things and make both the entity box clean. So the person isn't just littered with all kinds of information, but you can actually extend your entities as much as you want to add things that sort of act as properties, but really aren't, they're a separate value. Those attributes that help you tailor entities to your organization's needs.
And attributes can be stored in all different forms. There's tons and tons of them. Rock makes it so easy. You can do things a person picker. So an attribute can actually be a person.
You can use an email, a defined value, which is another concept really worth digging into as you understand Rock's architecture, then you can pick even a numeric range, a date and a way, way more. Then let's look up close at two different entities and properties and their attributes. So we have a person entity here and we have all sorts of different properties that Rock stores again, first name, last name, nickname. Then at the bottom, we have attributes that churches often end up adding such as a baptism date, allergy, t shirt size, employer, and school. Then for groups, properties will actually always be name, description, group type ID, much, much more.
Then attributes that organizations will often add are things curriculum, whether childcare is provided, a coach for a group, or even the cost to enter a group. Properties give every Rock install a shared foundation and custom attributes let you expand that foundation. Knowing how each one works will help you understand where new information should go.