Drupal 7: Reporting and Visualizing Data
Illustration by John Hersey

Improving data administration with Views Bulk Operations


From:

Drupal 7: Reporting and Visualizing Data

with Tom Geller

Video: Improving data administration with Views Bulk Operations

Our site doesn't contain very many records yet, so when I want to make a change to every record about our company's locations, for example, as I did in our last video, I can just click through and manually edit all three pretty quickly. But what about when the site gets bigger? Then I'll really want to start to have tools that will do bulk edits. Fortunately, such a tool exists for Drupal. It's called Views Bulk Operations. You can get it at drupal.org/ project/views_bulk_operations.
Expand all | Collapse all
  1. 13m 51s
    1. Welcome
      50s
    2. What you need to know
      4m 50s
    3. Using the exercise files
      8m 11s
  2. 12m 58s
    1. A yoga studio
      3m 18s
    2. A national organization
      2m 51s
    3. An entertainment company
      4m 3s
    4. An organization with hyperlocal branches
      2m 46s
  3. 40m 43s
    1. Planning your site's data structure
      3m 31s
    2. Creating record templates
      5m 40s
    3. Understanding Drupal 7's data-template model (entities)
      4m 27s
    4. Creating categories using two methods
      6m 14s
    5. Creating unusual field types
      6m 38s
    6. Reusing and grouping fields
      6m 25s
    7. Looking at Drupal's database
      3m 50s
    8. Migrating custom fields from Drupal 6
      3m 58s
  4. 20m 47s
    1. Connecting two fields using references
      5m 36s
    2. Importing data using Feeds
      8m 48s
    3. Changing the appearances of fields
      6m 23s
  5. 53m 11s
    1. Understanding why views are useful
      5m 1s
    2. Learning from built-in views
      5m 52s
    3. Creating and deleting a simple view
      5m 42s
    4. Diving into the Views interface
      8m 43s
    5. Surveying field types
      6m 16s
    6. Adjusting the settings of individual fields
      5m 31s
    7. Sorting and filtering data
      8m 11s
    8. Changing Views' administrative options
      7m 55s
  6. 33m 33s
    1. Varying how a view appears in different displays
      10m 10s
    2. Formatting views with grid, list, table, and jump menu appearances
      6m 43s
    3. Rewriting field output for interesting results
      4m 21s
    4. Creating multipart views using attachments
      6m 8s
    5. Styling the output of views
      6m 11s
  7. 33m 56s
    1. Importing and exporting views
      6m 21s
    2. Controlling access to data
      6m 44s
    3. Adding dynamic filters to views
      5m 41s
    4. Extending views with relationships
      6m 24s
    5. Improving data administration with Views Bulk Operations
      8m 46s
  8. 29m 43s
    1. Understanding locational data
      4m 43s
    2. Setting up the Location module
      9m 42s
    3. Displaying basic maps with the GMap module
      8m 37s
    4. Displaying custom maps
      6m 41s
  9. 23m 50s
    1. Exporting data in simple text form
      7m 4s
    2. Adding dates and calendars
      8m 32s
    3. Displaying content in a slideshow
      8m 14s
  10. 1m 20s
    1. Next steps
      1m 20s

Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now
please wait ...
Watch the Online Video Course Drupal 7: Reporting and Visualizing Data
4h 24m Intermediate Nov 17, 2011

Viewers: in countries Watching now:

In this course, author Tom Geller demonstrates how to use the Views module and other add-ons in Drupal to present dynamic, data-rich content. This course examines several real-world examples of effective data visualization and describes the Drupal data-storage model. The course also shows how to create, format, and style views; control access to data; improve data administration with Views Bulk Operations; and display content as custom maps and slide shows.

Topics include:
  • Planning the data structure of a site
  • Creating record templates with custom field types
  • Connecting fields using references
  • Sorting and filtering data
  • Varying how a view appears in different displays
  • Formatting views with grid, list, table, and jump
  • Creating multi-part views using attachments
  • Importing and exporting views
  • Extending views with relationships
  • Understanding and using location data
  • Exporting data
Subjects:
Developer Web
Software:
Drupal
Author:
Tom Geller

Improving data administration with Views Bulk Operations

Our site doesn't contain very many records yet, so when I want to make a change to every record about our company's locations, for example, as I did in our last video, I can just click through and manually edit all three pretty quickly. But what about when the site gets bigger? Then I'll really want to start to have tools that will do bulk edits. Fortunately, such a tool exists for Drupal. It's called Views Bulk Operations. You can get it at drupal.org/ project/views_bulk_operations.

I'll download and install it in the usual way. I copy the link for the .GZ file, go back to my site, click Modules, and Install; Paste and Install. When that's done, I enable it. Scroll all the way down until you're in the Views group at the very bottom. Then click Views Bulk Operations. But you can't do it without the Entity Module, so we'll go and get that one as well.

That's at drupal.org/project/entity. Once again, we scroll down and install it in the usual way. Now, when we scroll all the way down, we can turn on Views Bulk Operations and Entity automatically gets turned on. Views Bulk Operations essentially lets you build your own content management page, very much like the one that you get when you click Content.

You might remember that we had earlier filtered this, so we saw only Location types. We can Reset that and show everything. We can also select several of these, make certain Update Options, Unpublish them, Delete them and so forth. There is one thing that I dislike about this page however. When we set up our employee records, we had the Title field show the Employee ID, but when I look through this list, I don't know who employee 213 is. I'd rather see them by name. So that's what we'll do with Views Bulk Operations.

To make that happen, we create a View. Go up to Structure and Views. On this page, you'll notice one of the built-in Views down here is called Content. This was added by Views Bulk Operations. I'm going to clone this and then work with the clone. I'll call it Employees by name and Continue. If we scroll down to the Preview, we see that it looks very familiar. It shows our Title, Content Type, Author, and so forth.

In fact, it looks exactly like our Content page, but it was created in View, so we can now change exactly what it does. I'll go back up to the top, and take a look at the page. I just want to see what path it is. It's /admin/content2; remember that. We'll save it, and then take a look at that page in a new tab. You'll notice once again, we have this Choose an operation, but it has a lot of other options. We can execute an arbitrary PHP script, for example, or Unpublish content depending on what keywords are in that content.

Also, there are additional options up here for filtering. This is all done with Exposed Filters which you learned about earlier in the course. What I'm going to do with this View though is I'm going to add that first and last name. So I go over and I edit the view just like I do any other view. Here, I'll add two fields; First name and Last name. Type name to find them, there is Family name and First name, and add them and configure them. Just for speed, I'll accept the defaults.

If we scroll down to the Preview area, we see how that looks, and actually it's not bad. Now, we see it by Family name and First name instead of just by number, but we can do a little better. First, let's reorder those, and again, this is using things that you saw earlier in the course. We'll go up here to Rearrange and drag First name and Family name back up to the top and Apply. We can also rewrite this so that First name and Family name are altogether in one field.

We click Family name, Rewrite the Results, Rewrite the output, then take a look at our Replacement Patterns. We want field_first_name followed by field_last_name and Apply. Then we'll scroll down and take a look, and we can get rid of this First name. We'll simply hide it from the View, and Apply.

So it looks pretty good. But we still have this title here that isn't really necessary when we're looking at employees. In fact, we want this to just be a list of employees. So first, I'll add a filter to get rid of the other node types, and then I'll find a way to link this, and get rid of this title. So let's go up and change the Type filter. Make it so that it's not exposed and that it shows only Employees and Apply. When you scroll down, yup! Showing just Employees, and as we do that, we don't need to show the Type.

So I'll scroll up to the Filter, and remove the Type. Looks pretty good! Now, let's change that link, and then we're just about done. To do that, we'll have to add a field called Link. Go up to Fields>Add and do a search for link. There it is! And Add and Apply. I'll move that up to the top, and apply once again and see how that looks. That's not bad.

If we continue to play with this View, we could, for example, make this Family name linked to the record instead of having a View link, but let's leave it as it is for now after getting rid of the title since it's now redundant. Go to Title, and Remove. Just for safety, we'll go up and save it. I'm going to do one more thing. I want to change what operations are available from this menu, and that's part of Views Bulk Operations. We go up and edit the view, and then we scroll down to Fields, because the place that those control shows up is in Bulk Operations.

Click it to edit, and then scroll down. Here, we see that we have a lot of operations available to us, and as you add more modules, additional operations might become available as well. For each of these, you have several options. Again, I won't have time to show you those now, but I recommend that you play with them just to get it exactly the way you want. Let's add one, for example, Display a message to the user, and then Apply.

We'll go up and save. So now we're back at that view. We take a look at our operations and we have that Display a message to the user that we had selected before. Let's say that we just selected this one and said Execute. Now, we can decide what sort of message would be shown to the user. You get the idea. This is quite extensible. In fact, it is possible to add your own custom operations to that list. There are a few ways of doing that. If you're a developer, you can write plugins for Views Bulk Operations.

But for those of us who aren't developers, there are some options in the form of a compatible module that takes advantage of Views Bulk Operations. If we go back to the Project page, we see this group of Complementary Modules. All of these work together with Views Bulk Operations to let you change what you can do to those items on that content page. Now I know that I went through that fairly quickly, it's just because there are so many options with Views Bulk Operations.

I like its basic setup, without much customization at all, but of course you could go very far with it. One example would be to show all of the employees' photos on that Content Management page. A more complex example would be to show only those employees who have a birthday coming up in the next week, and then you could set a bulk operation to email them a birthday greeting. Remember, anything you can do in a View, you can do in a Views Bulk Operations page. The only difference is that with Views Bulk Operations, you can change the records that are displayed in that View.

There are currently no FAQs about Drupal 7: Reporting and Visualizing Data.

 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

* Estimated file size

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Drupal 7: Reporting and Visualizing Data.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.