Sorting Information

Request Type: 
General Assistance
Author: 
Neal Greene
Issue/Request: 

We want to be able to sort the PEOPLE section by last name.  Now, the only way is to sort by username.

Hello Neal,

You can sort by Last Name. All you have to do is add the field to the Sort Criteria and remove the Username field. Can you grant me access to the site so that I can go into more detail of how to do this?

Josue

I don’t see a place to do that.

I’ll take a look at it. Can you grant me access to the site? Click People in the Administration Menu and Find my name Josue Rodriguez and edit, then assign me the administrator role save. 

Thanks,

Josue

I don’t see a people section in your site. What is the URL of the page in question? Can you give me the link to your people section?

Josue

Hello Neal,

I don’t see a people section in your page. Typically you can find it under sitename.yale.edu/people. In your case that page is not present. The only page that I see is the /reports/video page. That does have the First Name & Last Name fields. To sort those you’d have to click on the Gear in the top right of the view and select Edit View. Then you go to Format: Table | Settings and select settings. There you can select the Last Name as the default sort. I’ve already done so for you. 

Is this what you were referring to?

Josue

To see the PEOPLE SECTION  you have to log in to the APPROVED TRAINER section.

Since I added Josue as a site builder, he should be able to log in to that section.

-Neal

Hello Neal,

I’ve found a view for the Trainers List. To edit that view you can go to Structure > Views > Trainers List. There you scroll down to Sort Criteria and select Add to add the Last Name field. I’ve already taken the liberty to adding the Last Name field and removing the User field. Your sort should be working now.

Josue

Is there a way to add the LAST NAME as a column on the People Page and then be able to sort them?

-Neal

If by people page you are referring to http://ctmedadmin.nursing.yale.edu/admin/trainers-list, then it is already sortable by default when you click on the term Last Name at the top and it is pre-structured into columns. I’ve reset the settings to their defaults so you can see it in action.

Josue

I’m still not seeing it on the People Page, so here is a screen shot.  As you can see, the first column is USERNAME.  I can click on that and sort them based on USERNAME info.  What I want to see (again, if possible) is a column with the last names and that it needs to be sortable.

Unless my level of access prohibits me from doing/seeing that(???).

The purpose of this is to be able to see duplicate names (with different information) and determine which ones we can delete.  From the STRUCTURE page, I can’t delete a name. (or can’t figure out how to from that page).

Thank you for helping with this.

-Neal

Oh Now I see. That’s the default Drupal User Interface and it cannot be modified or tweaked. You can only sort by the fields that are highlighted in blue, which indicate they are links. Unfortunately there is no way around that option.

Josue

Then if I sort data on the Structure Page, will it display that same sorted way on the people page?

What we want is to see the PEOPLE page sorted by last name.

-Neal

They are two different pages.

The page http://ctmedadmin.nursing.yale.edu/admin/people is the default Drupal User page. It lists all the user’s information such as Username, CAS Username, Status, Role, & member activity. It cannot be modified or re-sorted.

The page http://ctmedadmin.nursing.yale.edu/admin/trainers-list is a page that lists all of the trainers on the site. This one has Sort capability in the Column Names in blue, which are links. Clicking the column name will sort by that column. This is the page that you can sort by last name.

Josue

From the home page, how do you get to this page?

The URL to the Trainer List is not linked anywhere in the site. I was able to find it by going to Structure > Views > Trainers List (Users). There I selected the Page tab and saw the page URL was /admin/trainers-list

Josue

thanks.  I’ll look in to it. And thank you for your efforts.

You’re Welcome Neal.