USE [HelpDesk02_Def]
GO

DELETE from tblDtsFields WHERE nDataViewID=2
GO

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=90)
	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 (90, N'tblDts', 32, N'Approval_Path', 1, 103, 50, N'Approval Path', 0, 0, N'tblApprovalPath', 64, 1, 1, 1, NULL, 1, 1, NULL, N'Approval Path', 
	NULL, N'90', 1, NULL, 0, -1, 1, NULL, NULL, NULL, 2, N'Approval Path');

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=91)
	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 (91, N'tblDts', 32, N'Subcategory', 1, 103, 50, N'Subcategory', 0, 0, N'Subcategory', 64, 1, 1, 1, NULL, 1, 1, NULL, N'Subcategory', 
	NULL, N'91', 1, NULL, 0, -1, 1, NULL, NULL, NULL, 4, NULL);

GO

IF NOT EXISTS(SELECT * FROM [tblDtsFields] WHERE nID=100)
	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 (100, N'tblDts', 32, N'Communication_Received', 1, 103, 50, N'Communication Received', 0, 0, N'tblYesNo', 16, 1, 1, 1, NULL, 1, 1, NULL, N'Communication Received', 
	NULL, N'100', 4, NULL, 0, -1, 1, NULL, NULL, NULL, 2, NULL);
	
GO
	

