Rock U - Rock Fundamentals - Core - Custom Attributes

Transcribed Video Content

Okay. So let's talk about custom attributes. Now you can add an attribute on any entity in Rock but that doesn't mean that there's gonna be blocks and user interface that's actually gonna show them. So here's a list of all the different entities that support the viewing of these attributes. So you probably wanna limit your usage to this list. Now we're always adding additional entities, so it's possible in the future that there could be more, but you definitely probably want to at least research it before you start adding attributes to, entities. It won't cause any problems but you probably wouldn't be able to see or edit them. Now, some of the ones on the top of the list person, group, group member, they have specific user interfaces that make that really easy to add those attributes. Some of the others don't have their own user interface for administrating their attributes but there is a general block for doing that. So let's hop under admin tools, system settings, entity attributes. Okay. So when we come in here, we can see all the different entity attributes that are configured. Now, it can be a little overwhelming at times so you can filter by the entity type. So if you wanna filter for just the entity type that you're working on, you can. But in this case, we'll just go ahead and and leave that off. So if I go down to the bottom, I can add a new entity attribute. So I'm gonna go ahead and add a new attribute to, let's say, a financial account. So at the top, I need to pick, which entity I'm gonna be working on. So I'm gonna pick financial account. Below that are some qualifier fields. Now, for the most part, you typically don't need to worry too much about that. But just to give you a high level overview what that means is sometimes, there'll be a specific entity where you don't want the attribute to show up on all the entities of that type but just specific ones. So, for instance, again, there's a custom user interface to do this so you don't need to do it in here but if you wanted to put, a custom attribute on a group but only of groups of a certain type, you could come in here and add the qualifier field of group type ID and then give it a specific group type ID. And then in that case, the attribute would only show up on groups of that type. Now, for financial account, there really isn't anything there that we'd want to have a qualifier for. We want that attribute to show up on all financial accounts. So we just leave it blank. And that's really the common use case. So here I give my project, I'm sorry, my attribute a name so we'll call it project ID. And I can pick my field type which I'll just keep as text and it won't require it or show it on the grid. So just hit save. And now I have a new, extended attribute on financial account. And if I were to go over to those screens, would be able to view and edit those settings. So again, you only really need to do this, for certain entities, and you wanna make sure again that you check before you add this to any entity that there is gonna be a user interface for you to, view and edit those values. But that's how you would add an extended attribute.