Rock U - Rock Fundamentals - Custom Attributes v13

Transcribed Video Content

If you've ever worked at all with attributes, then that they're a great way to track additional information about something a person or a group beyond what ships with Rock. And so in this video, we're going to take a look at how to add attributes to any entity, and we'll take a look at an example of how to do that. So just because you can add attributes to any entity doesn't mean there's always a place in Rock where you can go to view those attributes or modify their values. Only certain types of entities have a user interface for attributes. What you see here on the screen is just a partial list, and we're likely to add more over time. So it's always a good idea to just check and see if the entity you're working with has a corresponding interface for attributes. But some of the ones at the top of this list, person, group, or group member, have specific user interfaces that make it really easy to add attributes. Some of the others don't have their own user interface for adding and administrating attributes, but there is a general block for doing that. So let's take a look in Rock at adding an attribute to an entity that doesn't have its own user interface for adding and administrating attributes. And so we're gonna look here at the financial account entity to say we want to add a custom attribute to financial accounts. So to do that, we're gonna go to admin tools and system settings and entity attributes. Okay. And so on this page, you can access a list of all the entity attributes that have been configured. They're grouped together by the type of entity, which we can change using the entity type drop down here near the top right of the block. So let's add a new attribute for the financial account entity. So we'll take a look at financial account. And we don't see any financial account attributes here yet, so we're gonna go ahead and add one by adding a row. The first thing that's already filled out for us is the entity type, And this is for financial account. We're gonna add an attribute to a financial account. So, again, that's filled in for us. We can we can leave that as is. Down below, you have the qualifier field and the qualifier value. Now, these won't always be filled in, but let's say you were adding an attribute to the group entity, but you only want the attribute to appear for groups of a certain type. There's an interface that'll let you do this when you're working with group types, But here, you can make that happen by adding group type ID. So in this example, we would do group type ID if we were working with groups, to the qualifier field, and then providing the group type ID you want in the qualifier value field. So we could put one there. And that would apply the attribute to only group type ID of one, again, if we were working with groups. But right now, we're working with financial accounts, and we want this attribute to apply to all financial accounts. And so we're gonna leave these, qualifier fields blank. Then down here, you can give your attribute a name, and we'll call it project ID. So we're gonna associate a project ID with each of the financial accounts. And the field type, so if you again, if you've worked with attributes before, , there's lots of different field types to track all kinds of different stuff. But we're just gonna leave this as text to track the, project ID for an account. So we'll just leave this as is. We'll go ahead and save. And then now we have our entity attribute added here. So if we go over to finance and then accounts, and we've got the general fund here. We'll go ahead and edit that. And if we come down here, you can see that we have our project ID custom attribute. And now we can fill in a value for the project ID, and we can save it and associate it with that account. And so, that's how you add an attribute to an entity. And the process works the same for any entity that you might need to add an attribute for. Just remember that not every entity has a dedicated user interface, a place where you can go to edit the value. So, so you might have to add an attribute first, and then go pull up that entity and see if there's somewhere where you can edit the value. But, for more information on entity attributes, check out our Rock admin hero guide posted to the community website. And thanks for watching.