Rock U - People - Person Attributes
Transcribed Video Content
Okay. So let's talk about person attributes. Person attributes are one of the most powerful parts of Rock because it allows you to extend what you track about people in a lot of crazy ways. So before we jump in and look at the behind the scenes of person attributes, let's just note one important fact that when we create person attributes, we put them inside of categories. Now, a person attribute can actually belong to more than one category.
At first that seems kind of crazy but it actually is very powerful because you can use these categories to display person attributes in different places and allowing that single attribute to be in multiple categories allows it to to be seen in different places but yet only stored in one. Okay? And we'll look at that as we create that, but just keep that in mind. So you go to create person attributes under admin tools, general settings, and then person attributes. Now, I want to create a couple person attributes and I actually want to create a new category.
So before I come in here and do the person attribute, I'm actually gonna back back up and go under attribute categories. When I come in here, I'm gonna see all the categories for all the different attribute types and entity types out there. And I really just want to filter just to see the person ones. Okay. So now I see the the categories, just for person attributes and I want to go ahead and create a new one.
So I'm gonna create a new sports ministry category. Give it a little football and of course it's tied to person. Okay. So now that I have my new category, I'm actually gonna jump back out and go to person attributes. Okay.
Scroll down to the bottom, click add. And so maybe I want a store if they're interested in coaching. And the field type here I'll choose, I can choose anything I want. But I'm actually gonna choose, I think, boolean would make the most sense. So that'd be yes or no.
That can require value and I can make a default value. So I'm just gonna go ahead and save that. But before I do that, let's just go ahead and choose my sports ministry as the category. Okay. Let's go ahead and add another one the actual sport that they're interested in.
Now, here I have some options. And there really is no right answer to what field type you might use for this. It could be that it's a single select because you want them to only select one. It could be a multi select because you want them to be able to type two. Either those are gonna give you a list that you can either pick one or many.
So if I choose multi select at this point, it's up to me to enter in these values. Now, looking at this tool tip is is kinda crucial when you're looking at at doing lists. , one way to do it is just to type it in here. Maybe it's baseball, football, and basketball. Oops.
Helps if you spell basketball right. Okay. So I could do that, that'd give me my list. Now, if for any reason in the future I need to change the the text of one of these things, it would actually throw off my data because it's actually stored with these exact values. So it's actually better to come in here and put a little number with a caret.
So that's gonna actually store the value of one for this one and the value of two for that one and the value of three for this one. And these numbers don't have to be consecutive, they can be in any order that you want. But this gives you the ability to come back and actually change this part, bat the baseball part, and not have to worry about messing up all the data you've already entered. So, this is one way to create a list. This is a way to do it kinda quickly.
Another way that you can do it, and and it's one way that I highly recommend is not to use the multi select but instead use a defined type in a different with defined values. Now, by doing that, you're creating a list and go back and and watch the video on defined types. You're basically creating a reusable list in Rock that you can use in several places. So, if I type this list in here, it's only gonna this list is only available for per for this person attribute. But if I wanna use that same list in another place, I have to retype it, which means I have to keep both those lists in sync.
So I highly recommend I'm just gonna go ahead and copy this so I don't lose it. I highly recommend that you come up and just use it and select a defined value. And then you're gonna pick the type that you're gonna make. So you'd make one that says sports options and then pick that. And then you can have allow multiple values, which gives you the same exact interface here.
So this is much more reusable, much better idea. I just picked group type purpose because I didn't go ahead and and create a defined type yet for sports. So for this example, let's just go back and choose the multi select and we'll just paste back our values. Okay. , actually now that I did that, I just realized I did not pick a category.
So let's go ahead and pick the category so those are all together. Okay. So I've created two person attributes and they both have a category. So let's go to the person profile page and see how we can add this to our profile. Okay.
So I don't have a category for that. So what I'm gonna do is I'm gonna add a new block because each one of these is actually just a block. So I'm gonna go over here. I'm probably gonna choose this one. Okay.
And these are actually gonna be under a category called CRM and under a subcategory called person detail, attribute values. Okay. Go ahead and add that. Okay. So now it's blank because I haven't given in any settings.
I'm gonna come in here and pick the category that I want. And I can adjust the order that the attributes show up in here. Typically, when you're when you're making those attributes, can put them in order there, but you can also readjust the order here. So I'm gonna go ahead and hit save there. And now if I reload the page, everything looks good.
There's no values there, but that's okay because I haven't entered any values for her. And now I can go ahead and pick my attributes and everything looks great. Now, we have our attributes, everything's good, but I do want to maybe apply some security to this. And I have a few options. The first option is to secure this block here so only certain people can, view or edit it.
So to do that, you just click on the block settings and hit the padlock. And here, I can adjust the security settings to be what I . You can also do security on the attributes themselves. So if I go under general settings and go back under person attributes and find my person attributes and for ease, I'm just gonna come up here and filter on my category that I created, make it a lot easier just to find those person attributes. And so from here, can actually control security on each attribute also because it might be that one attribute is open to everybody and the other one is not.
So that's person attributes in a nutshell and get in there, play with it. One maybe tip two is just to understand all the different field types that you have access to and it kind of figure out which one's gonna be best for your use case.