Rock U - Rock Fundamentals - Defined Types

Transcribed Video Content

Alright. So let's talk about defined types. Defined types are a way in Rock that you can have lists of items. And out of the box, we have several different defined types that we use all throughout the system, but you can add your own. So again, think of it as a list. Whenever you need to make a list of things, you might consider using a defined type especially if you need to use that list of things across, multiple areas of Rock. So let's go ahead and look at Rock and see, how we add and support defined types. Now you configure defined types under admin tools, general settings, defined types. And out of the box, you'll see a long list of defined types that we've already provided for you. Now, one thing to note is that defined types generally have a category. This helps you kind of group these lists together. And that makes it really handy in this filter setting to be able to find your defined type. You can kind of filter by the the category and that'll give you a smaller list. In this case, let's just look at one of the examples that comes out of the box. So maybe you look at this audience type. So these are a list of audiences or ministries that your organization might have. If you want to add a new one, you would add what is called a defined value. So again, defined types have defined values and the defined values are those items on the list. So we'll just add singles ministry. Okay. So after adding this defined value, every time we look at a list of audiences, we'll now have our new option. And in most cases, can, control the ordering of your list by just dragging and dropping. Okay. So that's the basics of a defined type. Let's go ahead and add our own new defined type to see what other options we have. Okay. So let's just say we really want to have a list of ministries within the organization and we didn't want to use audiences because those aren't those can sometimes be ministries but sometimes those are just topics. So let's go ahead and add a ministry list. Now I would strongly recommend that you always provide a description. This helps future you to understand why you made this list and also helps those in your organization. Also in some cases when you're looking at defined types, there will be a little help next to it. And this allows the person who's kind of trying to figure out at that point what this defined type might be used for, kind of gives them a reference. So it always provide that. For today's demo, we'll just kind of skip those though. Finally, you pick the category that you want your defined type to be and that helps again group those. So let's go ahead and save that. Okay. So now we have our list. At this point, I could start just adding new items to my list, new defined values. But in this case, let's go ahead and look at adding some attributes to those defined values. So here, I wanna go ahead and add a leader. Who's gonna be the leader of this, ministry area? So I'll just type leader, look at my field types, and I think I might just use a person picker. Now, I kind of this leader to always be shown on grids whenever we look at these defined values. I'm gonna select show on grid. Okay. So if I refresh this page, I'll see a new column with that leader item there. So let's go ahead and add a new ministry. So we're gonna use the men's men's ministry. The description here is it's it's used in different ways. I would always add a description to your defined values but how you use it as you'll see later it's it's sometimes you use the value as a selector, sometimes you can use the description as a selector. So just kind of keep that in mind because that's a very handy extensibility point. And then we have our new attribute. So we'll just use Ted Decker. Okay. So now I can just continue building my list. So that's how you use a defined type.