I have a content type with a full person's name in the title, in the format "John Smith". I want to have a view that sorts this content by last name. I've looked at the views interface but I don't see a way to get a substring. (I understand that this won't work perfectly but for our data set, it will work well enough.)

Will I have to add a field of the last name to the content type? Or is there a way I can get views to sort by a substring?

1 Answer 1


Adding a new field for the last name will be the easiest way. Sorting by a substring would mean that you also have to cover the possibility of spaces in first names and/or last names.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.