* Force DEA to run without setting required fields

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
User avatar
sbell95
Famous
Posts: 107
Joined: 14 Feb 2021 06:04
Family Historian: V7
Location: Australia

Force DEA to run without setting required fields

Post by sbell95 » 19 Jul 2022 00:09

Hi all,

Is it possible to force a DEA (such as the Record Census Data (UK) DEA) to run from a prepared citation window without setting the required fields (region, year, head of household, location)?

Screenshot 2022-07-19 100254.jpg
Screenshot 2022-07-19 100254.jpg (209.79 KiB) Viewed 1223 times
I ask because I have settled on using Kai Chandler's Freeform Citation Source Templates (with minor modifications), and I do not want to add extra fields to the source template in order to keep it generic for different source types. I am happy to edit the plugin manually if required to work with my source template (and have already done so in order to get the DEA to show up from the prepared citation menu) -- or is it possible to add the missing fields (region, year, head of household, location) once the DEA has been activated? I want the automatic event creation functionality, but for it to work with my existing source template!

Thanks!
Sarah Bell – Australia
View my tree on Wikitree

User avatar
ColeValleyGirl
Megastar
Posts: 4853
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Force DEA to run without setting required fields

Post by ColeValleyGirl » 19 Jul 2022 06:07

In the census DEA, delete or comment out lines 55 to 70. In other DEAs, it will be other lines but well commented so you should be able to spot them.

User avatar
sbell95
Famous
Posts: 107
Joined: 14 Feb 2021 06:04
Family Historian: V7
Location: Australia

Re: Force DEA to run without setting required fields

Post by sbell95 » 19 Jul 2022 07:08

I was excited about your simple fix, Helen, but then I got this error (after deleting said lines and then trying to run the DEA from a prepared citation):
Screenshot 2022-07-19 170817.jpg
Screenshot 2022-07-19 170817.jpg (19.91 KiB) Viewed 1128 times
Sarah Bell – Australia
View my tree on Wikitree

User avatar
ColeValleyGirl
Megastar
Posts: 4853
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Force DEA to run without setting required fields

Post by ColeValleyGirl » 19 Jul 2022 07:32

Ok -- I should have checked. You'll need to initialise the values that are derived from the required fields -- dtDate, sRegionName, sPlace (lines 71 to 100). If your template supports them in different fields, use those fields otherwise set them to sensible defaults (not sure what you'd set dtDate to as a default). You'll also have to decide how to handle sHead in line 163 if you don't have a Head of Household field.

sRegion and sDate need to correspond to one of the entries in the table starting at (old) line 890 (Census Definitions). e.g 'England' and '1851'.

User avatar
sbell95
Famous
Posts: 107
Joined: 14 Feb 2021 06:04
Family Historian: V7
Location: Australia

Re: Force DEA to run without setting required fields

Post by sbell95 » 19 Jul 2022 23:37

Hmm... okay. Is it possible to have pop-ups appear instead that ask for this information and assign that to the relevant variables/fields?
Sarah Bell – Australia
View my tree on Wikitree

User avatar
ColeValleyGirl
Megastar
Posts: 4853
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Force DEA to run without setting required fields

Post by ColeValleyGirl » 20 Jul 2022 06:34

That's a bigger job. It's the approach I'm taking in the new DEAs I'm writing but they're not ready for testing yet.

User avatar
sbell95
Famous
Posts: 107
Joined: 14 Feb 2021 06:04
Family Historian: V7
Location: Australia

Re: Force DEA to run without setting required fields

Post by sbell95 » 29 Jul 2022 07:30

ColeValleyGirl wrote:
19 Jul 2022 07:32
Ok -- I should have checked. You'll need to initialise the values that are derived from the required fields -- dtDate, sRegionName, sPlace (lines 71 to 100). If your template supports them in different fields, use those fields otherwise set them to sensible defaults (not sure what you'd set dtDate to as a default). You'll also have to decide how to handle sHead in line 163 if you don't have a Head of Household field.

sRegion and sDate need to correspond to one of the entries in the table starting at (old) line 890 (Census Definitions). e.g 'England' and '1851'.
OK, I'm struggling with what I have to change on which lines -- would it be too onerous to ask you to instruct me?!
Sarah Bell – Australia
View my tree on Wikitree

User avatar
ColeValleyGirl
Megastar
Posts: 4853
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Force DEA to run without setting required fields

Post by ColeValleyGirl » 29 Jul 2022 08:43

Ok.

A couple of questions:

Do you have fields in your template for: the Date of Census, and the Region (Country) and Place of the census.

If so, what are they called.

Ditto for a Head of Household field.

User avatar
sbell95
Famous
Posts: 107
Joined: 14 Feb 2021 06:04
Family Historian: V7
Location: Australia

Re: Force DEA to run without setting required fields

Post by sbell95 » 29 Jul 2022 10:20

No to all of these — although the date (year) of census is always the first four characters of the “Head” and “Short” fields. And I don’t expect to use any censuses outside of England, so that can be hard coded. You can see my fields (and the template I’m using, albeit slightly modified) in the OP.
Sarah Bell – Australia
View my tree on Wikitree

User avatar
ColeValleyGirl
Megastar
Posts: 4853
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Force DEA to run without setting required fields

Post by ColeValleyGirl » 30 Jul 2022 15:41

I'm sorry, but this is a much bigger rewrite than I first thought.

Post Reply