Batch editing elements

The script was REALLY easy to adapt.

Here, I’ve gone into the Notes category and created a Custom Filter for “Source Note” type Notes.

(Using the Example.gramps tree, this filtered to 2 of that tree’s 19 Notes. Always learn a new technique using a fresh import of the Example.gramps file into a new blank tree.)

Then with the Notes category active, open Isotammi’s SuperTool addon tool and use FileOpen to load the script transcribed below. Test the script with the Execute… but make certain to set the “Filtered objects” radio button and have “Commit changes” deselected until after successful testings. After confirming the list shows the correct records would update, enable the “Commit changes” and Execute a final time.


The Filter gramplet actually needs to be in the sidebar, not the bottombar. This Notes view mode has the Privacy column displayed using the ViewConfigure options


Save the following as text file named : SuperTool-Notes Privacy.script

[Gramps SuperTool script file]
version=1

[title]
SuperTool-Notes Privacy

[category]
Notes

[initial_statements]
# A simple script to change the Gramps Privacy "padlock" Oct2022 # of filtered Notes to locked
# completely UNSAFE. Make a backup before running
# source:    https://gramps.discourse.group/t/how-to-set-private-record-for-multiple-people/2885/3

[statements]
myinitprivacy = note.get_privacy()
note.set_privacy(True)
myendprivacy = note.get_privacy()

[filter]

[expressions]
 note, myinitprivacy, myendprivacy

[scope]
filtered

[unwind_lists]
False

[commit_changes]
True

[summary_only]
False