USE [HelpDesk02_Def]
GO
IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=70)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (70, N'tblApprovals', 32, N'Voters_ID1', 1, 104, 0, N'Approvers Level 1', 0, 0, N'tblUser', 16, 1, 1, 1, NULL, 1, 1, 0, N'Approvers Level 1', NULL, N'70', 12, N'Where ((( [tName]  <> '''') Or [tName]  = ''<User>'') And (Security_Type = 1 OR Security_Type = 8))', 0, 1, 1, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=71)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (71, N'tblApprovals', 32, N'Voters_ID2', 1, 104, 0, N'Approvers Level 2', 0, 0, N'tblUser', 16, 1, 1, 1, NULL, 1, 1, 0, N'Approvers Level 2', NULL, N'71', 12, N'Where ((( [tName]  <> '''') Or [tName]  = ''<User>'') And (Security_Type = 1 OR Security_Type = 8))', 0, 1, 1, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=72)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (72, N'tblApprovals', 32, N'Voters_ID3', 1, 104, 0, N'Approvers Level 3', 0, 0, N'tblUser', 16, 1, 1, 1, NULL, 1, 1, 0, N'Approvers Level 3', NULL, N'72', 12, N'Where ((( [tName]  <> '''') Or [tName]  = ''<User>'') And (Security_Type = 1 OR Security_Type = 8))', 0, 1, 1, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=73)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (73, N'tblApprovals', 32, N'Votes_1_ID1', 1, 104, 0, N'Approved - Level 1', 0, 0, N'tblUser', 16, 1, 1, 1, NULL, 1, 1, 0, N'Approved - Level 1', NULL, N'73', 12, NULL, 0, 1, 1, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=74)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (74, N'tblApprovals', 32, N'Votes_1_ID2', 1, 104, 0, N'Approved - Level 2', 0, 0, N'tblUser', 16, 1, 1, 1, NULL, 1, 1, 0, N'Approved - Level 2', NULL, N'74', 12, NULL, 0, 1, 1, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=75)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (75, N'tblApprovals', 32, N'Votes_1_ID3', 1, 104, 0, N'Approved - Level 3', 0, 0, N'tblUser', 16, 1, 1, 1, NULL, 1, 1, 0, N'Approved - Level 3', NULL, N'75', 12, NULL, 0, 1, 1, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=76)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (76, N'tblApprovals', 32, N'Votes_2_ID1', 1, 104, 0, N'Rejected - Level 1', 0, 0, N'tblUser', 16, 1, 1, 1, NULL, 1, 1, 0, N'Rejected - Level 1', NULL, N'76', 12, NULL, 0, 1, 1, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=77)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (77, N'tblApprovals', 32, N'Votes_2_ID2', 1, 104, 0, N'Rejected - Level 2', 0, 0, N'tblUser', 16, 1, 1, 1, NULL, 1, 1, 0, N'Rejected - Level 2', NULL, N'77', 12, NULL, 0, 1, 1, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=78)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (78, N'tblApprovals', 32, N'Votes_2_ID3', 1, 104, 0, N'Rejected - Level 3', 0, 0, N'tblUser', 16, 1, 1, 1, NULL, 1, 1, 0, N'Rejected - Level 3', NULL, N'78', 12, NULL, 0, 1, 1, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=79)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (79, N'tblApprovals', 32, N'Vote', 1, 103, 3, N'Vote', 0, 0, N'tblYesNo', 16, 1, 0, 1, NULL, 1, 1, NULL, N'Vote', NULL, N'79', 1, NULL, 0, 1, 5, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=80)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (80, N'tblApprovals', 32, N'Approval_Comments', 1, 12, 0, N'Approval Comments', 0, 0, NULL, NULL, 1, 0, 0, NULL, 1, 1, NULL, N'Approval Comments', NULL, N'80', 1, NULL, 0, 1, 1, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=81)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (81, N'tblApprovals', 32, N'Approval_Comments_Log', 1, 12, 0, N'Approval Comments Log', 0, 0, NULL, NULL, 1, 1, 1, NULL, 1, 1, NULL, N'Approval Comments Log', NULL, N'81', 12, NULL, 0, 1, 16, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=82)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (82, N'tblApprovals', 32, N'Approval_Question', 1, 10, 255, N'Approval Question', 0, 0, NULL, NULL, 1, 1, 1, NULL, 1, 1, NULL, N'Approval Question', NULL, N'82', 1, NULL, 0, 1, 1, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=83)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (83, N'tblApprovals', 32, N'Minimum_Voters', 1, 102, 4, N'Minimum Approvers Required', 0, 0, NULL, NULL, 1, 1, 1, NULL, 1, 1, NULL, N'Minimum Approvers Required', NULL, N'83', 12, NULL, 0, 1, 1, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=84)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (84, N'tblApprovals', 32, N'No_Approval_Needed_Level_1', 1, 104, 0, N'No Approval Needed Level 1', 0, 0, N'tblGroup', 16, 1, 1, 1, NULL, 1, 1, NULL, N'No Approval Needed Level 1', NULL, N'84', 12, NULL, 0, 1, 1, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=85)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (85, N'tblApprovals', 32, N'No_Approval_Needed_Level_2', 1, 104, 0, N'No Approval Needed Level 2', 0, 0, N'tblGroup', 16, 1, 1, 1, NULL, 1, 1, NULL, N'No Approval Needed Level 2', NULL, N'85', 12, NULL, 0, 1, 1, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=86)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (86, N'tblApprovals', 32, N'No_Approval_Needed_Level_3', 1, 104, 0, N'No Approval Needed Level 3', 0, 0, N'tblGroup', 16, 1, 1, 1, NULL, 1, 1, NULL, N'No Approval Needed Level 3', NULL, N'86', 12, NULL, 0, 1, 1, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=87)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (87, N'tblApprovals', 32, N'Approval_Needed_By_Level_1', 1, 8, 0, N'Approval Needed By - Level 1', 0, 0, NULL, NULL, 1, 1, 1, NULL, 1, 1, NULL, N'Approval Needed By - Level 1', NULL, N'87', 12, NULL, 0, 1, 1, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=88)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (88, N'tblApprovals', 32, N'Approval_Needed_By_Level_2', 1, 8, 0, N'Approval Needed By - Level 2', 0, 0, NULL, NULL, 1, 1, 1, NULL, 1, 1, NULL, N'Approval Needed By - Level 2', NULL, N'88', 12, NULL, 0, 1, 1, NULL, NULL, NULL, NULL, NULL)

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=89)
INSERT [dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) 
VALUES (89, N'tblApprovals', 32, N'Approval_Needed_By_Level_3', 1, 8, 0, N'Approval Needed By - Level 3', 0, 0, NULL, NULL, 1, 1, 1, NULL, 1, 1, NULL, N'Approval Needed By - Level 3', NULL, N'89', 12, NULL, 0, 1, 1, NULL, NULL, NULL, NULL, NULL)
