Rock U - Rock Fundamentals - Defined Types

Transcribed Video Content

Defined types in Rock are really important because they're a structural part of how things work. Defined types actually allow you to build your own vocabulary in Rock for a bunch of different things and Rock will have many defined types out of the box such as record sources, connection statuses, school grades, and more. So let's look into when you'd wanna set up a defines type and how to do that in Rock. Defines define types, you'll start by going to admin tools up to settings and we'll start typing in defines types. Now once this is loaded up, you'll notice there's a lot of defined types that are already out of the box in Rock. And there's so many places where these defined types are used because they're so flexible and helpful. So So let's look at one that's already been created. We're gonna look at the audience type. Now when you click on it, you'll start to see the structure of these defined types which below a defined type, there will be a list of values that may have attributes defined already. In this case, we're showing the highlight color. We can't see that in grid right here. But if we click on one of these, we can see the highlight color associated with that audience type. We can see the value and the description. And this is something really helpful. We've described what this defined type is for and we can use this to determine which audience a content channel item should be targeted towards. Meaning, we're probably gonna be accessing this defined type through an attribute on a content channel item. Now let's look at what it looks if you were to add a new defined type and add some defined values to it. So we'll head back to the defined types page and click the plus button. Let's say we wanna add a ministry list to find type. Just gonna give it a name and the description can be really helpful for other staff members or people that come across this so they know what this is used for because it can be confusing if you don't put in the effort to add a description. Then in addition, there are some places in Rock where you get a tool tip or an eye icon. You can hover over that and you'll see whatever you put here in the help text. So that can also be something helpful you include just to help other staff or other people that come across this in the future. Also picking a category will help you be really specific about what this is used for so that you can categorize your defined types, but we're gonna skip that for now. Another interesting thing is categorized values, which allows you to add categories to the actual values, not just the type and you can categorize values. So if you have a long list, it's easier to sort through those values. We're gonna go ahead and save it this. And you'll notice this empty attributes for defined type section. Let's add an attribute right now and we'll just name it leader. So this is something else that it's helpful to add a description for and there are cases in Rock where you can actually list a defined type attribute by its description rather than just the name. So it's always helpful to fill this field out. You can pick whether we want to show it in grid. We're gonna say yes for now. I'll show you what that means in a second. And the field type will just be person. So we'll have a person picker and we can pick a leader for each of the values in this ministry list. So I'll save it and you'll see that we now have this attribute at our disposal and let's add a new value for the ministry list. Let's just call this ministry Children's. And for the leader, we'll just pick Ted Decker as we know he'll be the head of this ministry. And you can see right here, we have the children's value shown. And I wanna check on something. So I'm gonna refresh this page and you can see now that this attribute which has show in grid checked is also showing in the grid here. So really helpful. We can see exactly what value we have in the ministry list, who the leader is and more all from the defined type detail. Now we've covered some important Rock vocabulary. Don't forget the importance of defined types. And as you're creating systems in Rock, remember to use defined types so that you can set something and forget it. Instead of having to remember a list of values, you'll always have it handy for you. Thanks for watching this video.