if (StructKeyExists(URL,"NameFactId") And URL.NameFactId neq 0) { session.NameFactId = URL.NameFactId; isExistingNameFact = true; } else isExistingNameFact = false; if (StructKeyExists(URL,"newRefFk")) Session.NameFactRefFk = URL.newRefFk; jsOnLoad = "initrefs();"; // save everything to session variables to repopulate form after the user adds a reference session.NameFact = form.NameFact; if (StructKeyExists(Form,"DoubtfulFlag")) session.DoubtfulFlag = 1; else session.DoubtfulFlag = 0; if (StructKeyExists(Form,"PublishFlag")) session.PublishFlag = 1; else session.PublishFlag = 0; if (form.NameFactNotes eq "") session.NameFactNotes = "NULL"; else session.NameFactNotes = "'" & Replace(form.NameFactNotes,"'", "''", "All") & "'"; if (form.RefId eq "") session.NameFactRefFk = "NULL"; else session.NameFactRefFk = form.RefId; if (form.Details eq "") session.Details = "NULL"; else session.Details = "'" & Replace(form.Details,"'", "''", "All") & "'"; UPDATE NameFact SET NameFact = '#session.NameFact#', NameFactRefFk = #session.NameFactRefFk#, DoubtfulFlag = #session.DoubtfulFlag#, PublishFlag = #session.PublishFlag#, Updated_Who = '#Session.UserName#', Updated_When = GETDATE(), Notes = #PreserveSingleQuotes(session.NameFactNotes)#, NameFactRefDetail = #PreserveSingleQuotes(session.Details)# WHERE NameFactId = #session.NameFactId# SELECT ISNULL(MAX(NameFactId) + 1, 1) AS Id FROM NameFact INSERT INTO NameFact (NameFactId, PTNameFk, NameFact, NameFactCategoryFk, NameFactRefFk, DoubtfulFlag, PublishFlag, Created_Who, Created_When, Notes, NameFactRefDetail) VALUES (#session.NameFactId#, #URL.Name#, '#session.NameFact#', #URL.NameFactCategoryId#, #session.NameFactRefFk#, #session.DoubtfulFlag#, #session.PublishFlag#, '#Session.UserName#', GETDATE(), #PreserveSingleQuotes(session.NameFactNotes)#, #PreserveSingleQuotes(session.Details)#) SELECT * FROM NameFact WHERE NameFactId = #URL.NameFactId# session.NameFact = NameFact.NameFact; session.NameFactNotes = NameFact.Notes; session.DoubtfulFlag = NameFact.DoubtfulFlag; session.PublishFlag = NameFact.PublishFlag; session.NameFactRefFk = NameFact.NameFactRefFk; session.Details = NameFact.NameFactRefDetail; session.NameFactId = ""; session.NameFact = ""; session.NameFactNotes = ""; session.DoubtfulFlag = 0; session.PublishFlag = 0; session.NameFactRefFk = ""; session.Details = ""; SELECT NameFactCategory FROM NameFactCategory WHERE NameFactCategoryId = #URL.NameFactCategoryId#

CreateEdit "#LCase(NameFactCategory.NameFactCategory)#" for
#FullName.FullNameCache#

Name fact notes checked >Doubtful name fact         checked >Publish name fact
Reference Select new reference
Remove value=#session.NameFactRefFk# />
Reference detail