Re: Determination dates
Is there a tool/add-in/batch update to correct records that have failed revalidation due to having determination dates before observation dates? Looks like I have quite a few.
Biological Survey Data Manager
National Trust
The technical forum of the NBN Trust for use by the Network. It includes discussions and announcements on the NBN Atlas, Recorder 6 and Indicia |
You are not logged in. Please login or register.
Forum → How Do I... & Other Questions → Determination dates
Is there a tool/add-in/batch update to correct records that have failed revalidation due to having determination dates before observation dates? Looks like I have quite a few.
Does this look like it will do the job?
<?xml version="1.0" ?>
<batchupdate menupath="GB_BatchUpdates" description="Update Determination date to match Sample date"
title="Update Checked"
>
<SQL>
Declare @EnteredBy char(16)
Declare @Custodian char(8)
Declare @EntryDate datetime
<Where keytype="Sample">
set @EntryDate = Getdate()
set @EnteredBy <Condition field="" type="CurrentUserID" name="Current User ID" operator="equal" />
set @custodian = (Select[Data] From Setting WHERE [NAME] = 'SiteId')
UPDATE Taxon_Determination set VAGUE_DATE_START= S.VAGUE_DATE_START, VAGUE_DATE_END = S.VAGUE_DATE_END, VAGUE_DATE_TYPE = S.VAGUE_DATE_TYPE, Changed_by = @EnteredBy, Changed_date = @EntryDate
FROM Taxon_Determination TDET
INNER JOIN Taxon_Occurrence TOCC
ON TOCC.Taxon_Occurrence_Key = TDET.Taxon_Occurrence_Key ANd TDET.Preferred = 1
INNER JOIN Sample S
ON S.Sample_key = TOCC.Sample_Key
WHERE TDEt.CUSTODian = @Custodian AND S.sample_Key = '%s'
</Where>
</SQL>
</batchupdate>
Largely stolen from Mike's LCUpdateDeterminer batch update, with the update line changed.
I have no idea if it will actually work as intended, but I will give it a go next week (after a backup).
Looks fine to me. Recorder is happy if the determination date is in line with the sample date.
Did you consider using JNCCTDETDates1CorrectDates.xml or JNCCBDET1CorrectDates.XML via Tools – Run Batch Updates – Updates – TDET_Dates_1 - Corrects Taxon Determination dates? See the comments in the xml files for the changes they make but note that they only work on records which are in the custodianship of the system.
I don't have either of those on the system. Have I missed an update or do I need to download from somehwere? Running 6.17.1.250.
I am not sure why they aren’t in your system so I will email them to you. They are in the new installation of v6.17 I did recently.
Thanks Sally,
Is there anything else I might be missing? I have DATA_Correction1, Pref1, Del1-5, Des1-5, Det1,2,4&5, Loc1 and Change specific recorder all under Run Batch Update and LCUpdateDeterminer on the right click
The batch updates I have in C:\Users\Public\Documents\Recorder 6\User Files\Batch Updates in a recent installation of v6.17 with Windows 7 are:
JNCCAssignTaxonsToDesignation.xml
JNCCBDET1CorrectDates.XML
JNCCDel1TDET.xml
JNCCDel2TCOM.XML
JNCCDel3SENoSamp.xml
JNCCDel4SNoOcc.xml
JNCCDel5Records.xml
JNCCDes1CreateSets.xml
JNCCDes2AssignTaxonsToDesignationRuck.xml
JNCCDes3AssignTaxonsToDesignation.xml
JNCCDes4DeleteSet.xml
JNCCDes5DeleteDesignation.xml
JNCCDet1Determinations.xml
JNCCDet2Determinations.xml
JNCCDet4Determinations.xml
JNCCDet5Determinations.xml
JNCCLoc1Locations.xm
JNCCPref1DuplicatePref.xml
JNCCTDETDates1CorrectDates.xml
Thus it looks as though the only other one you are missing is JNCCAssignTaxonsToDesignation.xml.
Forum → How Do I... & Other Questions → Determination dates
Powered by PunBB 1.4.6, supported by Informer Technologies, Inc.