Rock U - Rock Fundamentals - Custom Attributes
Transcribed Video Content
Rock doesn't ship with a field for everything that your church cares about, and it doesn't need to. Here's why. Custom attributes allow you to add new fields to things people, groups, and more all without a developer. Let's talk about what makes a good attribute and how to set up your own custom attributes. There's two ways to add attributes to entities.
We have an entity attribute block where you can easily add an attribute to any entity or some features allow you to add an attribute simply and easily straight from the settings or the configuration on that feature. A good example of that is group types. So let's look at that, go to admin tools up to settings, then look for group types. We're gonna go to a small group, group type and in the sections you can see we have actually multiple different attributes you can add straight from the UI, but something I wanna show you first is that this small group has an ID of 25. Keep that in mind and I'll show you why in a second, but we'll go to group attributes and any group attribute you add here, it says apply to all groups of this type.
We have one called topic and one called small group label. So let's look at another way we could have created this attribute. Go to admin tools, up to settings and type in entity attributes, we'll click on that. We're already filtering to the entity type of group, which is where we were just looking and there's a topic attribute right here. So let's edit that and look at it.
You'll see we've got the entity type of group again, then we've actually got a qualifier field that says the group type ID is 25. And remember I showed you that group type we're looking at had an ID of 25 And what this is saying is we'll only attach this attribute to a group that has a group type ID of 25. So you can get specific about what or how an attribute attaches to an entity. So we're good on this. We know what this looks , the topic attribute.
Let's go add a new one and you can type in here what you want. We'll do financial account. Let's add a new one and we'll just call it bank name. This isn't really a valid attribute to add but we're just gonna add it for the sake of example. This is on the entity type of financial account.
We'll save and now we're gonna actually go to finance, down to accounts. Let's look at an account by editing it. If we scroll down to the bottom, we now have that attribute that we just created attached here and we can type in the bank name and just say test bank. And there we go. Now we've got that attribute added to this entity.
Custom attributes turn a one off need into structured usable data and using the right field types and categories will help you tidy up that data to make it easier for you in the future.