Rock U - Workflows - Custom Grid Actions

Transcribed Video Content

Anywhere in Rock that you see a grid, you can add custom grid actions. So what does that do? It'll take the members of the grid and allows you to perform some kind of action on them. And so, in this video, we're gonna be using the group viewer and the group members grid as an example. But as we go through this, just keep in mind that the same sorts of things that we're doing apply to any grid in Rock. In this example, we'll be using members of a group. So we'll go to people and the group viewer, and we'll check out the Decker group. So from here, you can see we have our grid of group members, and we have all the familiar icons at the top and at the bottom. Our first step for adding custom actions is going access going to be to access the group properties for that block. And we'll go to custom grid options and expand custom actions. Now, you've read up or watched the other video on the workflow launch, then you're already familiar with this piece. But today, we're gonna be focusing on adding custom actions. The first thing that you'll need to do is provide a route. The route will indicate where the person is taken when they click on the icon that we're gonna be setting up in just a second. In this example, we're providing a route that leads to the workflow launch block, the the page that a page that has the workflow launch block on it, which will have the effect of launching a workflow for each person in in the list of group members in this case, since we're working with the group member grid. Again, we're using the workflow launch block for this example, but remember that the route can take you anywhere in Rock. The key is just ensuring that the target page or block that you're going to or working with knows what type of entity it's being asked to handle. So just keep in mind that the grid's contents are passed as an entity set, and you'll need to follow those rules to make sure that it knows what to do with it. Next, we need to provide an icon. The icon that you pick here will appear along with the other icons that you're used to seeing at the top and the bottom of any grid. For this example, kind of at random, we'll go ahead and put in Fafa just as the icon that we're gonna use. Next is the help text. This text, whatever you put in here, will appear whenever a person hovers their mouse over the icon, in this case, the FAFAA adjust icon that we just set up. And so it's a great way to let them know what the icon is gonna do when they click on it. And you'll see what this looks in a second after we save the configuration. I'm gonna put in launch photo request because, incidentally, this workflow type ID that we've plugged in here is associated with the launch photo request workflow. That's number 16. So what that's gonna do, as you'll see in a second, is we're gonna go to the workflow launch block, but we're not gonna be able to pick which workflow we launch because that's gonna be passed in from the route. So now I'm gonna click save. And as soon as I do, you can you might have noticed that we now have a new icon added to our list at the top and the bottom of the grid. And as you can see there, when I hover my mouse over it, it says launch photo request, so I know exactly what it's doing. And I'm gonna go ahead and click that. So note that we can only launch the specified workflow. We put this into our route, and so we don't have the workflow picker that you might otherwise see on this block. Now, just a moment, I want to go back to the group member list block settings just to let that, of course, you can add as many custom actions as you want. And they're totally independent, so they don't have to be related, but you can provide an entirely different route, an icon, and the help and have just as many as you need. And this is a great way to let staff perform a variety of different functions for items in a grid quickly and easily. Again, it's just as easy as clicking the button, hitting launch in this case because we're directing to a workflow, and you're set to go. So again, try not to get too hung up on the examples that we used here. , remember that you can use the the custom grid actions for any grid containing any type of entity from anywhere in Rock to anywhere in Rock. There's a lot of options. You can use it for way more than just launching workflows. And we wanna make sure that that. So get creative. Think about how you might be able to use this to help streamline some of your processes. And thanks for watching.