* Setting Fact notes to null

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
avatar
shoshk
Famous
Posts: 242
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Setting Fact notes to null

Post by shoshk » 22 Oct 2019 06:27

I have a number of notes on facts which I am deleting.

I find the notes by a query which has the criteria 'Exclude if fact.note2 is null' (yes, yes I know that's not the proper syntax; I'm being lazy and using pseudo-code)

Deleting the text of the note does not set the note to null (I guess the note field still exists, but it's blank)

It should be an easy matter to write a plugin that searches for blank notes and deletes them.

Before writing it, however, I thought I'd check and see if something already exists, or if there's another solution.

Thanks,
Shosh
Shosh Kalson

User avatar
Jane
Site Admin
Posts: 8442
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Setting Fact notes to null

Post by Jane » 22 Oct 2019 06:53

If you add the note as a column on your query. You can simply select all the cells in the column and press the delete key.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

avatar
shoshk
Famous
Posts: 242
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Re: Setting Fact notes to null

Post by shoshk » 22 Oct 2019 07:01

My query has both blank and non-blank notes.

Is there a way to filter for blank notes?
Shosh Kalson

avatar
shoshk
Famous
Posts: 242
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Re: Setting Fact notes to null

Post by shoshk » 22 Oct 2019 08:07

Well, I discovered that if I close my project and then re-open it, FH has removed the blank notes.

So, problem solved.
Shosh Kalson

Post Reply