USE [Actions02_Def]
GO
IF NOT EXISTS(SELECT nID FROM [tblDtsFields] WHERE nID=65)
	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], [tOrigCaption], [nRevisionNumber]) 
	VALUES (65, N'tblDts', 32, N'Due_Date', 1, 8, 50, N'Due Date', 0, 0, NULL, NULL, 1, 1, 1, NULL, 1, 1, NULL, N'Due Date', NULL, N'65', 28, NULL, 0, -1, 1, NULL, NULL, NULL, NULL, 2);
GO
IF NOT EXISTS(SELECT nID FROM [tblDtsFields] WHERE nID=64)
	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], [tOrigCaption], [nRevisionNumber]) 
	VALUES (64, N'tblDts', 32, N'Amount', 1, 5, 50, N'Amount', 0, 0, NULL, NULL, 1, 1, 1, NULL, 1, 1, NULL, N'Amount', NULL, N'64', 28, NULL, 0, -1, 1, NULL, NULL, NULL, NULL, 2);
GO

IF NOT EXISTS(SELECT nID FROM [tblDtsFields] WHERE nID=4)
	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 (4, N'tblDts', 32, N'tShowInSummary', 1, 10, 255, N'tShowInSummary', 0, 0, NULL, 0, 0, 0, 0, NULL, 1, 0, 0, N'Show In Summary', NULL, N'4', 1, NULL, 0, -1, 1, NULL, NULL, NULL, NULL, N'tShowInSummary');

GO
IF NOT EXISTS(SELECT nID FROM [tblDtsFields] WHERE nID=67)
 INSERT [Actions02_Def].[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 (67, N'tblDts', 32, N'Action_Category', 1, 103, 3, N'Action_Category (Action Tab)', 0, 0,'tblCategory', 64, 1, 1, 1, NULL, 1, 1, 0, N'Category', NULL, N'cbo_800_Action_Category', 28, NULL, 1, -1, 1, NULL, NULL, NULL, NULL, NULL);
	
GO
IF EXISTS(SELECT nID FROM [tblDtsFields] WHERE nID=13)
	Update  [Actions02_Def].[dbo].tblDtsFields set nDestinationTabID = 28 where nID = 13