Before asking for help please read "Requesting Help and Suggestions" by clicking on that tab above here.
  • Page:
  • 1

TOPIC:

How to insert a "common note" to several individuals. 1 week 5 days ago #1

  • Bernat
  • Bernat's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 44
One example.
I have a "common note" with the history of a "surname". I would like all my records that have this surname in the name to generate a "note" entry with this information.
Common Note (e.g. PEPE'S HISTORY)
Order: All records containing the word PEPE record the "common note" entry "PEPE'S HISTORY".

Is this possible?
How could it be done?

Thank you.
______________
Un ejemplo.
Tengo una "nota común" con la historia de un "apellido". Quisiera que en todos mis registros que tengan en el nombre este apellido se les genere una entrada de "nota" con esta información.
Nota Común (por ejemplo: HISTORIA DE PEPE)
Orden: Todos los registros que contengan la palabra PEPE registren la entrada de "nota común" "HISTORIA DE PEPE"

Eso puede ser posible?
Cómo podría hacerlo?

Gracias.

Please Log in or Create an account to join the conversation.

How to insert a "common note" to several individuals. 1 week 5 days ago #2

  • bertkoor
  • bertkoor's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
  • Posts: 2792
The safest way is to do that for each related individual, one by one.

With search & replace and a cunning RegEx it might be possible to add the reference to the shared note to all people with the same surname. But with data spanning multiple lines this gets messy and error prone.
stamboom.BertKoor.nl runs on webtrees v1.7.13

Please Log in or Create an account to join the conversation.

How to insert a "common note" to several individuals. 1 week 5 days ago #3

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 16321
Since SURN does not have any subtags, it should be safe to search for:

2 SURN PEPE

and replace with

2 SURN PEPE
2 NOTE @N12345@
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

How to insert a "common note" to several individuals. 1 week 5 days ago #4

  • Bernat
  • Bernat's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 44
Thank you.

FISHAREBEST's solution seems very logical to me. Let's see if I have understood it and how I should act.

1º I have chosen a note and given it an identification number. In this case I am looking for records with the surname AGULLÓ (I have given it the number 0001).

2* In the control panel -> my tree -> data correction ->search and substitution ->search for text...
and I put 2 SURN AGULLÓ (to search for all the individuals with this surname and I got four).

3º In "substitution text" I don't know what to put because it only admits one line. If I put "only" 2 NOTE @0001@ it will delete 2 SURN AGULLÓ and that is not my goal.

Question: How can I insert the two orders in a row (with semicolon ?)

and which search method do I use? "Regular expression" or other?

Thank you. If I can get it to work it would be very helpful.

Translated with www.DeepL.com/Translator (free version)

Please Log in or Create an account to join the conversation.

How to insert a "common note" to several individuals. 1 week 5 days ago #5

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 16321
> Question: How can I insert the two orders in a row

Use \n to indicate a newline character

Search for:

\n2 SURN AGULLÓ\n

The \n at the end will prevent you from matching other names that start with the same letters. e.g. AGULLÓX

Replace with

\n2 SURN AGULLÓ\n2 NOTE @00001@\n
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

How to insert a "common note" to several individuals. 1 week 5 days ago #6

  • Bernat
  • Bernat's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 44
Oops!
I must be doing something wrong...
let's see. If I put exactly what you tell me, I don't get any records.
If I delete in "search \it does find the four records, but then it doesn't allow me to modify them.

I have experimented with removing and putting \n
I changed the identification number (0001) to the other 1FE34A8E930B4C5DA8D7AE6AFE78169BDF87

but nothing works...

What am I doing wrong?
Attachments:

Please Log in or Create an account to join the conversation.

How to insert a "common note" to several individuals. 1 week 5 days ago #7

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 16321
Works for me...




What are you doing wrong? Don't know. Maybe your data does not contain SURN records?
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
Attachments:

Please Log in or Create an account to join the conversation.

How to insert a "common note" to several individuals. 1 week 5 days ago #8

  • Bernat
  • Bernat's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 44
Well... that's better! :_)

The problem was here
"Matvh booth upper and tower letter YES" (I had "NO")

OK, now on to the next problem. My "surname" has "two" names (Agullo + Femenía) for example.
if I search for \n SURN Agulló\n -> it doesn't find any record.
if I search for SURN Agullo -> it finds 4 records (2 Agullo Femenía and 2 Agulló Pérez), but in the preview I notice that it "removes" Agulló+Femenía" and replaces it with: 2 SURN Agullo + 2 NOTE @0001@ Femenía
How do I have to do it so that it looks for ALL THE RECORDS of SURNAMES that CONTAINS THE WORD TO SEARCH (Agulló), DOES NOT MODIFY THE SURNAMES and INSERT A GEDCOM ORDER of NOTE.

I remember that the order \n2 SURN Agulló doesn't work (could it be because Agulló has an accent?)
Attachments:

Please Log in or Create an account to join the conversation.

Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

How to insert a "common note" to several individuals. 1 week 5 days ago #9

  • bertkoor
  • bertkoor's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
  • Posts: 2792
You can try a search for:
\n2 SURN (Agull.+)\n

and replace with:

\n2 SURN \1\n2 NOTE @00001@\n

With the ( brackets ) you specify this is a group. Dot plus specifies to match one or more "any" character. So be careful, it also matches Agulla for instance.
In the replacing string "\1" refers back to the first group, so this variant keeps your spelling in tact. Maybe $1 instead works as well.
stamboom.BertKoor.nl runs on webtrees v1.7.13

Please Log in or Create an account to join the conversation.

Last edit: by bertkoor.

How to insert a "common note" to several individuals. 1 week 5 days ago #10

  • bertkoor
  • bertkoor's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
  • Posts: 2792

if I search for SURN Agullo -> it finds 4 records (2 Agullo Femenía and 2 Agulló Pérez)

Sometimes the struggle with regular expressions is not worth the headache.
Had you done it manually, you'd already be finished ;-)
stamboom.BertKoor.nl runs on webtrees v1.7.13

Please Log in or Create an account to join the conversation.

Last edit: by bertkoor.

How to insert a "common note" to several individuals. 1 week 5 days ago #11

  • Bernat
  • Bernat's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 44
Thanks for your reinforcements

Now everything seems to be going well... (or almost).
- Find the surnames (ok)
- Does not change the surname (ok)
- Inserts a NOTE in the name of the record

But the annotation appears, NOT THE TEXT OF THE NOTE.

Pd. Sorry for the time you have spent with my doubts. Those of us who have no idea about programming have few friends who can help us. The tests are with the surname AGULLÓ because I have few records in my web with that name. The bad thing is that I would like to enter this type of notes in about 13000 records!!!! that I have at the present time and therefore, this type of help is very interesting and useful to me.
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Bernat.

How to insert a "common note" to several individuals. 1 week 5 days ago #12

  • norwegian_sardines
  • norwegian_sardines's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 2565
The NOTE tag should:
1) Point at a shared note already in your system like @N0001@
2) Probably should start with the letter ‘N’ as in @N0001@

The shared note @N0001@ would contain the text about the surname.
Ken

Please Log in or Create an account to join the conversation.

Last edit: by norwegian_sardines.

How to insert a "common note" to several individuals. 1 week 5 days ago #13

  • hermann
  • hermann's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 637
What is the XREF of your shared note? You have to use this instead of "0001"!

Goto to your note regarding the name name "Agullo". In the address line of your browser there should be the XREF visible. Something like "N01234". Use this XREF instead as the link in

\n2 SURN \1\n2 NOTE @N01234@\n
Hermann
Designer of the custom module "Extended Family"

webtrees 2.1.7 (all custom modules installed, php 8.1, MySQL 5.7) @ ahnen.hartenthaler.eu

Please Log in or Create an account to join the conversation.

How to insert a "common note" to several individuals. 1 week 5 days ago #14

  • Bernat
  • Bernat's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 44
Phew!

Everything works perfectly now!!!!!!!

Thank you both for your help and patience.
(Great trick about looking for the XREF in the browser. I hadn't noticed)
I would like to return the favour.

Good luck and thanks.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum