Page 1 of 1

Attach individuals to note record

Posted: 28 Aug 2018 05:49
by shoshk
Hi,

We have started using note records to manage our research logs. I'm not going to go into detail here on that, but it works really well.

One problem (or frustration) that we have run into is that in order to attach individuals to the note record, we have to go to each person and attach them, one by one.

I was thinking that it would be nice to have a plugin that would allow me to attach people from the note record.

I was thinking of starting with the 'Where Used Record Links' and going from there.

What do you think?

Shoshana

Re: Attach individuals to note record

Posted: 28 Aug 2018 07:15
by Jane
It would be a fairly easy plugin for you to write, just select the note record and then prompt for the people you want to add to it.

Another thought would be to use named lists, you could add both the Note and the individuals to the named list.

Another option would be to put "tags" in the research notes eg #I1 and then write a plugin to read through the note and list the people tagged in the note when you need to access them.

Re: Attach individuals to note record

Posted: 28 Aug 2018 11:03
by tatewise
I echo Jane's suggestions.
You can start either by selecting the Note record, or by selecting Individual records, or by selecting nothing.
The Plugin would use fhGetCurrentRecordSel(...) to obtain any preselected Note or Individual records.
Then prompt using fhPromptUserForRecordSel(...) to obtain any missing selections.
Finally link the Note record to each Individual record (if not already linked).

But don't start with the Where Used Record Links Plugin as that is performing the opposite function and is quite complex.

Re: Attach individuals to note record

Posted: 28 Aug 2018 11:08
by shoshk
Mike,

Thank you for your suggestions. That's what I need to link the individuals. I think that should be pretty straight-forward.

I guess I'm a glutton for punishment, because I would also like to display a list of the currently attached people as well.

As I see it, I would open a window with a list of currently attached people and provide an option to detach them, in addition to adding new people to the note record.

That's why I thought I should take a look at Where used record links.

Shosh

Re: Attach individuals to note record

Posted: 28 Aug 2018 11:33
by tatewise
Where Used Record Links is still too complex for your needs, as it is looking everywhere for linked Note records, etc.

You only need to loop through Individual records looking for top level INDI.NOTE links to the Note record.

I suggest you link the Note record to selected Individual records first.
Then produce a Result Set listing all the Individual records linked to that Note record.
They could be marked as new and old in some way.
Then within that Result Set it is easy to select any old links that you need to be deleted, as that is a standard feature, and thus needs no Plugin script.

Re: Attach individuals to note record

Posted: 28 Aug 2018 11:38
by shoshk
I will take a look. It seems pretty straight-forward.

Thank you