* Default date for custom event

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
avatar
martinreed
Gold
Posts: 16
Joined: 20 Jun 2012 07:33
Family Historian: V7

Default date for custom event

Post by martinreed »

I would like to create a custom event where the date is pre-filled.
How can I do this
User avatar
Jane
Site Admin
Posts: 8518
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Default date for custom event

Post by Jane »

You can't do this in Work With Fact sets, but there are a couple of options, either create a template person and add an event you can copy. or write a simple plug in to add your event to the currently selected person.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
User avatar
DavidNewton
Superstar
Posts: 464
Joined: 25 Mar 2014 11:46
Family Historian: V7

Re: Default date for custom event

Post by DavidNewton »

I have been using FH for a couple of months and plugins are one of the main attractions and I suggest that that is the option to take. I have custom facts(attributes) for each UK census and a simple plugin to add such an event with date pre-entered. The 1841 effort is below and easily adapted to whatever fact you want. As you can tell I am a beginner at this stuff!

The start of this plugin is taken from Peter Richmond's Clone any Record.

-- ====Get the pointers of the currently selected individuals ====
tRec = fhGetCurrentRecordSel('INDI') -- and check that precisely one individual has been selected
if #tRec ~= 1 then fhMessageBox('You must select precisely one individual') pi=null
else pi=tRec[1]
end
if pi:IsNotNull() then
pif=fhCreateItem('_ATTR-1841_CENSUS', pi)
DefDate= fhNewDate(1841,6,6)
pid=fhCreateItem('DATE',pif)
fhSetValueAsDate(pid,DefDate)
end

David
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Default date for custom event

Post by tatewise »

Martin, can you explain the background to your need for a pre-filled Date in a Custom Event as there may be an alternative solution to your requirements.

Martin, can you please click the User Control Panel at the top of this FHUG page and on the Profile tab select your Family Historian Version so it appears in your side panel against your posting. Then we know which FH you are using and can answer your postings more accurately. Thanks.


David, as an aside, that is an unconventional way of recording Census Events.
Conventionally multiple Standard Census Events are used with their Date and Place indicating which particular Census.
Any particular Census Event can be identified using the special year index, e.g. [year=1901].
BTW: ancestralsources:index|> Ancestral Sources offers a very convenient way of capturing Census records.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
DavidNewton
Superstar
Posts: 464
Joined: 25 Mar 2014 11:46
Family Historian: V7

Re: Default date for custom event

Post by DavidNewton »

Mike

You are correct it is unconventional. However, I was giving it as an example of pre-filling in the date not as a suggestion for a way forward for census events.

David
Post Reply