Page 1 of 1

Batch update to source names

Posted: 29 Mar 2021 12:51
by BakerJL75
I am working on updating all my sources to templated. I figured out how to query the records I want and/or make a list of them. All I want to do is add an "x" to the front of the short title. My guess is the search and replace plugin would do what I want, but I can't figure out the LUA pattern to use.

Thanks for any idea's

Re: Batch update to source names

Posted: 29 Mar 2021 13:08
by tatewise
Presumably, the "x" is just to identify which records you want to update.
Have you considered simply putting them in a Named List?

In the Search and Replace plugin I guess that on the Extra Filters tab you have chosen Source Short (SOUR.ABBR) and on the Major Options tab selected a subset of Source Records (SOUR) so only those ones get changed.

The search term will be (.*) to capture everything and x%1 to replace with x and the captured text.
Note that it will only work for Source Records that have a Short Title.

Re: Batch update to source names

Posted: 29 Mar 2021 14:22
by Jane
Another different option if you are making a list of sources to change you could simply save the result set as a named list and delete them from the list as you change them over.

Re: Batch update to source names

Posted: 29 Mar 2021 14:47
by tatewise
I said that?! :D

Re: Batch update to source names

Posted: 29 Mar 2021 15:09
by Jane
Sorry missed the suggestion

Re: Batch update to source names

Posted: 29 Mar 2021 17:20
by BakerJL75
Thanks all. I want the X to show up in the source list so I don't accidentally use them again. I'll backup and try the search and replace

Re: Batch update to source names

Posted: 29 Mar 2021 17:24
by tatewise
I'm not sure I understand what you mean by accidentally use them again.

It is very easy to differentiate old Generic Sources from new Templated Sources.
The former have a Generic Type field value and the latter have a Template field value.
Those fields are both listed in the Sources tab in the Records Window and in any Source selection dialogues.

Re: Batch update to source names

Posted: 30 Mar 2021 13:28
by BakerJL75
True. But if I'm in the source box on the property tab deciding if I need to cite an existing source or make a new one, it's hard to tell what the existing citation is without the x.
Citation.png
Citation.png (50.15 KiB) Viewed 2047 times
Now I can tell right away if it's an old citation I need to replace, or if it's a new one I can leave alone.

I should mention, I'm mostly a lumper. It has it's pro's and con's, but I've been a lumper for many years and it just works for me. So I often want to copy and paste a citation to reuse it.