* how to remove alternate names with Clean Unwanted Fields

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
User avatar
BillH
Megastar
Posts: 2245
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

how to remove alternate names with Clean Unwanted Fields

Post by BillH »

I am trying to remove alternate names using the Clean Unwanted Fields plugin.

I added the data reference %INDI.NAME[2]% to the data reference fields in the plugin, but when I ran the plugin it said the data reference was not used and the output file still has the alternate names in it. What am I doing wrong?

Thanks!
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: how to remove alternate names with Clean Unwanted Fields

Post by tatewise »

You are doing nothing wrong Bill.
I just never expected that specific instances of data items would be required - Sorry :cry:
Also, it finds a flaw in the Plugin that accepts the data ref as valid, but does not then act on the [index].

Try the attached Clean Unwanted Fields Plugin Version 1.1.1 Date 23 Oct 2018 that does cater for instances.
[EDIT: Attachment deleted as V1.2 now in Plugin Store.]
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
BillH
Megastar
Posts: 2245
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Re: how to remove alternate names with Clean Unwanted Fields

Post by BillH »

Mike,

Thanks for the quick fix. I wanted to get rid of all the alternate names and keep just the primary name. I added INDI.NAME[2] thru INDI.NAME[10] which would cover the most alternate names any individual had. This new version of the plugin worked great.

Thanks!
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: how to remove alternate names with Clean Unwanted Fields

Post by tatewise »

I was about to publish this revision in the Plugin Store, but realised it did not cater for instance indexes everywhere it should.
The further I inspected, there were a few other minor amendments also needed.

So try the attached Clean Unwanted Fields Plugin Version 1.1.2 Date 01 Nov 2018 that fixes all those features.
[EDIT: Attachment deleted as V1.2 now in Plugin Store.]

It should allow an [index] on any of the tags, and ensure it is a valid numerical index.
If applied to the left-most record type tag then the [index] identifies the [Record Id].

It would be good if you could apply some tests of your own.
Try some invalid index syntax using other types of brackets and non-numeric values and 0.
Try some valid index values, even on multiple tags in one data ref, and check the correct items get deleted.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
BillH
Megastar
Posts: 2245
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Re: how to remove alternate names with Clean Unwanted Fields

Post by BillH »

Mike,

I tried a variety of valid and invalid instances on a variety of facts and attributes and it worked in all the situations I tried.

Thanks
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: how to remove alternate names with Clean Unwanted Fields

Post by tatewise »

Bill, that sounds good, but would a Result Set be useful?
Not for every deleted item, as that will often be too many, but just a sample of up to 9 per Data Reference.

Try the attached Clean Unwanted Fields Plugin Version 1.1.3 Date 02 Nov 2018 that adds a Result Set.
[EDIT: Attachment deleted as V1.2 now in Plugin Store.]
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
BillH
Megastar
Posts: 2245
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Re: how to remove alternate names with Clean Unwanted Fields

Post by BillH »

Mike,

Not sure on this one. I don't see myself using this very often. Usually when I use the plugin I am deleting hundreds or even thousands of items so having only the first 9 of each type wouldn't really tell me much. Not sure if others would find it useful or not.
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: how to remove alternate names with Clean Unwanted Fields

Post by tatewise »

I thought it might give some confidence that the desired classes of data were being deleted.
Does it do any harm to keep producing the Result Set even if not used?

BTW: The Export Gedcom File Plugin has a similar Result Set that only lists first 9 examples of each export Rule used.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
BillH
Megastar
Posts: 2245
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Re: how to remove alternate names with Clean Unwanted Fields

Post by BillH »

Mike,

No harm at all. I'm sure it could be useful at times.
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: how to remove alternate names with Clean Unwanted Fields

Post by tatewise »

Clean Unwanted Fields Plugin Version 1.2 Date 05 Nov 2018 has exploded into the Plugin Store. :)
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
wulliam
Famous
Posts: 150
Joined: 03 Oct 2009 10:29
Family Historian: V7
Contact:

Re: how to remove alternate names with Clean Unwanted Fields

Post by wulliam »

Have just used this plugin to great effect - many thanks!!
William
Post Reply