* How to create local/embedded note?

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
TSG
Gold
Posts: 21
Joined: 07 Sep 2011 11:52
Family Historian: V6
Contact:

How to create local/embedded note?

Post by TSG » 17 Jan 2012 17:53

Can anyone tell me how to create a local/embedded NOTE as part of a plug-in? If I do, for example:

local ptrNOTE = fhCreateItem('NOTE', ptrSOUR)
fhSetValueAsText(ptrNOTE, 'Some notes in here')

The NOTE is create as an empty *link* with no text.

The same thing happens if I try to create a local multimedia object.

Is this a bug or am I doing something wrong?


ID:5821

User avatar
PeterR
Megastar
Posts: 1129
Joined: 10 Jul 2006 16:55
Family Historian: V7
Location: Northumberland, UK

How to create local/embedded note?

Post by PeterR » 17 Jan 2012 18:10

The following should work OK:

Code: Select all

ptrNOTE = fhCreateItem('NOTE2', ptrSOUR)
This issue is mentioned under Modified Gedcom Tags on the Plugin Help page The Family Historian API.
Peter Richmond (researching Richmond, Bulman, Martin, Driscoll, Baxter, Hall, Dales, Tyrer)

avatar
TSG
Gold
Posts: 21
Joined: 07 Sep 2011 11:52
Family Historian: V6
Contact:

How to create local/embedded note?

Post by TSG » 17 Jan 2012 18:17

Brilliant! Many thanks :)

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

How to create local/embedded note?

Post by Jane » 17 Jan 2012 18:44

I would not recommend creating 'local' media, especially in a project environment, although it's supported, it's not the recommended option and it's better to create media records and then attach the media records to the item you are creating.
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
TSG
Gold
Posts: 21
Joined: 07 Sep 2011 11:52
Family Historian: V6
Contact:

How to create local/embedded note?

Post by TSG » 18 Jan 2012 09:12

I realise that local multimedia are not recommended but I was assured that they would continue to be supported and they better suite my method and organisational structure for source documents.

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

How to create local/embedded note?

Post by Jane » 18 Jan 2012 09:59

Yes they are supported, but if you are creating a plugin for the store, you might want to consider allowing both methods.
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
TSG
Gold
Posts: 21
Joined: 07 Sep 2011 11:52
Family Historian: V6
Contact:

How to create local/embedded note?

Post by TSG » 18 Jan 2012 10:10

Ah I see your point - no worries - I am just creating my own private plug-ins to improve the data entry

Post Reply