# Changing word order in titles



## mfseeker (Mar 23, 2014)

I have a photo collection of about 300 portraits. They are Titled with the person's name in given-name | surname order. I want to be able to sort the collection into surname | given-name order. Is there a way of exporting my current Titles to Excel, using a formula to fill in the same or another field, say Caption, with "surname, given-name", and then importing the processed metadata back into the respective images.? Can this be done with some plugin or combination of plugins? The existing format is {firstname lastname}; the desired format is {lastname, firstname}. I can handle the Excel processing, but I am unsure about the export/import mechanisms.


----------



## clee01l (Mar 23, 2014)

Welcome to the forum.  I would rather be listed in the Title as "Cletus Lee" and not "Lee, Cletus"  I think your Titles are fine. It is just that Title is not the field that you want to sort on.   Perhaps you need a hierarchial keyword to group all of the "Lee's" as "Cletus", "Robert Edward" etc. Then the "Wilde" family grouped as "Jim", "Jane" etc.  Alternately in a flat Leyword List you can use Last Name then First name as a Phrase : "Lee-Cletus" Lee-Robert Edward", "Wilde-Jim" "Wilde-Jane" etc

Where do you want to sort these?  In LR or someplace else?  Sort order is determined by the Operation system sort rules.


----------



## mfseeker (Mar 23, 2014)

*Name order*



clee01l said:


> Welcome to the forum.  I would rather be listed in the Title as "Cletus Lee" and not "Lee, Cletus"  I think your Titles are fine. It is just that Title is not the field that you want to sort on.   Perhaps you need a hierarchial keyword to group all of the "Lee's" as "Cletus", "Robert Edward" etc. Then the "Wilde" family grouped as "Jim", "Jane" etc.  Alternately in a flat Leyword List you can use Last Name then First name as a Phrase : "Lee-Cletus" Lee-Robert Edward", "Wilde-Jim" "Wilde-Jane" etcWhere do you want to sort these?  In LR or someplace else?  Sort order is determined by the Operation system sort rules.


Thanks for the welcome.I use the Title (e.g. "Cletus Lee") as a caption printed under the picture, which will appear with all of the other pictures on a display board. I want a different field to allow me to sort the entire collection alphabetically by surname first (e. g. "Lee, Cletus"). Having the entire collection in surname first order will expedite editing the collection. Consequently, I need to end up with a collection inside LR that is sorted in this manner. The field {surname, given-name} will not be printed, nor do I require it for other uses outside of LR.


----------



## clee01l (Mar 24, 2014)

I'm not seeing any "easy" solutions. Sorting is managed in Grid View on Smart and Static Collections.  The Static Collection permits sorting by "user order" which means that you manually drag the thumbnails into the order that you want.  This might be tedious but it will work. 
I thought another option might be to use a Smart Collection that searches on the "Job" field, however this will not sort except by the limited choices dictated be the sort field on the tool bar.   While it will get you every image that has  a value in the "Job" field, It won't sort the way you wish and you don't even have the manual "User Order" available.  Originally, I thought keyword might have worked, but you should be using Keywords for more than "LName, FName" and you still have to sort using the using the sort field on the tool bar. 

The other option remaining since you want to sort in LR is to use one of the sort field choices that are available on the tool bar.   The only one that seems appropriate is the file name.  You can prepend the "LName, FName"  to the existing file name and then sort on File Name.


----------



## johnbeardy (Mar 24, 2014)

This probably requires a plugin, and the OP also contacted me directly as he already has these plug-ins. Here's my response....



> ListView is designed purely for getting data out of LR, but LrTransporter will probably be your solution as it can import text data into LR. After creating the spreadsheet with ListView, you can use Data > Text to Columns to split the title field into columns. I presume you know that "&" can then add text, so you'd have a formula like =D2&", "&E3. You'd then save the spreadsheet as a CSV file and LrTransporter can import it.



John


----------



## clee01l (Mar 24, 2014)

johnbeardy said:


> This probably requires a plugin, and the OP also contacted me directly as he already has these plug-ins. Here's my response....


While this achieves the original premise of "Fixing" the Title field to be "Lname, Fname", it does not do anything to permit sorting on that field in a collection or anywhere else. The sort options available in LR are:
Capture Time
Added Order
Edit Time
Edit Count
Rating 
Pick
Label Text
Label Color
File Name 
File Extension
File Type
User Order (For Static Collections)

Title is not a sortable field in LR.


----------



## johnbeardy (Mar 24, 2014)

Ah, at the risk of sounding like I'm here pushing my plugins.... ListView allows you to sort by any field in the catalogue.

John


----------



## clee01l (Mar 24, 2014)

johnbeardy said:


> Ah, at the risk of sounding like I'm here pushing my plugins.... ListView allows you to sort by any field in the catalogue.
> 
> John


That would be great. Does ListView sort a Collection?


BTW, I'm more than happy to promote your plugins,  I do this every time I see an opportunity. :hail:


----------



## johnbeardy (Mar 24, 2014)

But it gets very boring, and I think it also sends out the wrong message about LR.

To answer you though, ListView shows the selected items in a list view, which can sort, and can create a new collection whose user order reflects the list's sort order.

John


----------



## mfseeker (Mar 25, 2014)

*Solved:*



mfseeker said:


> I have a photo collection of about 300 portraits. They are Titled with the person's name in given-name | surname order. I want to be able to sort the collection into surname | given-name order. Is there a way of exporting my current Titles to Excel, using a formula to fill in the same or another field, say Caption, with "surname, given-name", and then importing the processed metadata back into the respective images.? Can this be done with some plugin or combination of plugins? The existing format is {firstname lastname}; the desired format is {lastname, firstname}. I can handle the Excel processing, but I am unsure about the export/import mechanisms.



With the help of a couple of John's plugins and Excel, I have been able to get the desired result.


Use ListView to export the collection to Excel. 
Use Excel to create a field and populate, "NameReverse", using "surname, given name(s)" order. 
Use LR/Transporter to import the Excel processed list, putting "NameReverse" into LR's "Label" field. 
Sort the collection on the Label field. 
 Thanks to John for his excellent plugins.

Stan


----------



## clee01l (Mar 25, 2014)

mfseeker said:


> ...
> 
> 
> Use LR/Transporter to import the Excel processed list, putting "NameReverse" into LR's "Label" field.
> ...


While that gets you what you want, you have lost the ability to use the color labels. The default Color Label Set "label" value for the "color label" is red = "Red", yellow = "Yellow", etc. When the "label" value is set to something other than the associated values in the current Color Label Set, the color label associated with these images is the "Custom" color which is white.   If you assign a color label to any of the images that have a "NameReverse" in the label field, then the "NameReverse" value is replaced with the current Label value for the associated color (red, yellow, green, blue or purple).


----------

