Page 1 of 1

how to remove alternate names with Clean Unwanted Fields

Posted: 23 Oct 2018 17:56
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!

Re: how to remove alternate names with Clean Unwanted Fields

Posted: 23 Oct 2018 19:13
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.

Re: how to remove alternate names with Clean Unwanted Fields

Posted: 23 Oct 2018 19:26
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!

Re: how to remove alternate names with Clean Unwanted Fields

Posted: 01 Nov 2018 14:28
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.

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.

Re: how to remove alternate names with Clean Unwanted Fields

Posted: 01 Nov 2018 23:22
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

Re: how to remove alternate names with Clean Unwanted Fields

Posted: 02 Nov 2018 16:49
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.

Re: how to remove alternate names with Clean Unwanted Fields

Posted: 02 Nov 2018 20:21
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.

Re: how to remove alternate names with Clean Unwanted Fields

Posted: 02 Nov 2018 20:30
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.

Re: how to remove alternate names with Clean Unwanted Fields

Posted: 02 Nov 2018 20:58
by BillH
Mike,

No harm at all. I'm sure it could be useful at times.

Re: how to remove alternate names with Clean Unwanted Fields

Posted: 05 Nov 2018 08:51
by tatewise
Clean Unwanted Fields Plugin Version 1.2 Date 05 Nov 2018 has exploded into the Plugin Store. :)

Re: how to remove alternate names with Clean Unwanted Fields

Posted: 06 Jan 2019 20:20
by wulliam
Have just used this plugin to great effect - many thanks!!