#form.OccurrenceNotes# IF NOT EXISTS (select * from syscolumns where id = object_id ('[dbo].[emOccurrenceSource]') and name = 'PreferredReferenceFlag') ALTER TABLE [dbo].[emOccurrenceSource] ADD [PreferredReferenceFlag] [bit] SELECT TOP 1 OccurrenceSourceId, SourceNumber FROM emOccurrenceSource WHERE OccurrenceFk = #url.OccurrenceId# AND PreferredReferenceFlag = 1 //if (PreferredRef.RecordCount eq 1) session.PreferredRef = PreferredRef.OccurrenceSourceId; if (PreferredRef.RecordCount eq 1) session.PreferredRef = PreferredRef.SourceNumber;

Create new occurrence record for
#OnePT.FullNameCache# Edit distribution status for
#OnePT.FullNameCache#  and  #OneArea.EMCode#: #OneArea.Unit#

Area
Status Unknown Multi: #OneOccurrence.StatusUnknown# POSS: S
Native Multi: #OneOccurrence.Native# POSS: S
Introduced Multi: #OneOccurrence.Introduced# POSS: S
Cultivated Multi: #OneOccurrence.Cultivated# POSS: S
World Dist. Compl. Multi: #OneOccurrence.WorldDistCompl#
POSS Occur.  :   #OneOccurrence.Occurrence#                         checked DISABLED>Resolved value="on" value = "off" >                                                 
OccurrenceNotes

References for this new occurrence

References for this distribution status

Source(#OneOccurrence.sourceNumber#): #OneOccurrence.RefCache# preferred Set as preferred reference Del
OldNameInThisSource
#Distribution.oldName#
Del     Add   Add
Add New Source (in this case the source number cannot remain empty)
Source number
Source #oneRef.refcache#
Select reference Select new reference
Full reference Remove value=#factrefid# />