USE [Actions02_Def]
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Organization' WHERE [tName]='Company_Name' AND [nRelationshipType]=-1
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=713)
	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 (713, N'tblDts', 32, N'Department', 1, 103, 3, N'Department', 0, 0, N'Department', 16, 1, 1, 1, NULL, 1, 1, 0, N'Department', NULL, N'713', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Department');

GO
IF NOT EXISTS(SELECT * FROM [dbo].[tblDtsFields] WHERE nID=714)
	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 (714, N'tblDts', 32, N'Location', 1, 103, 3, N'Location', 0, 0, N'Location', 16, 1, 1, 1, NULL, 1, 1, 0, N'Location', NULL, N'714', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Location');
GO

DELETE FROM [dbo].[tblDtsFields] WHERE nID=4;
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[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'Show In Summary Lists', 0, 0, NULL, 0, 0, 0, 0, NULL, 1, 0, 0, N'Show In Summary Lists', NULL, 
		N'4', 1, NULL, 0, -1, 1, NULL, NULL, NULL, NULL, N'tShowInSummary');

GO


/**************************/
USE [AppraisalSections02_Def]
GO
IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=600)
	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 (600, N'tblDts', 32, N'Company_Name', 1, 103, 3, N'Company Name', 0, 0, N'tblUser', 16, 1, 1, 1, NULL, 1, 1, 0, N'Company Name', NULL, N'600', 1, N'Where ([nID]>0 And [tName] <> '''' And Security_Type=3)', 1, -1, 1, NULL, NULL, NULL, NULL, 'Organization');
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=713)
	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 (713, N'tblDts', 32, N'Department', 1, 103, 3, N'Department', 0, 0, N'Department', 16, 1, 1, 1, NULL, 1, 1, 0, N'Department', NULL, N'713', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Department');
GO
IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=714)
	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 (714, N'tblDts', 32, N'Location', 1, 103, 3, N'Location', 0, 0, N'Location', 16, 1, 1, 1, NULL, 1, 1, 0, N'Location', NULL, N'714', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Location');
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[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'Show In Summary Lists', 0, 0, NULL, 0, 0, 0, 0, NULL, 1, 0, 0, N'Show In Summary Lists', NULL, 
		N'4', 1, NULL, 0, -1, 1, NULL, NULL, NULL, NULL, N'tShowInSummary');
GO

/**************************/
USE [Appraisals02_Def]
GO
IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=600)
	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 (600, N'tblDts', 32, N'Company_Name', 1, 103, 3, N'Company Name', 0, 0, N'tblUser', 16, 1, 1, 1, NULL, 1, 1, 0, N'Company Name', NULL, N'600', 1, N'Where ([nID]>0 And [tName] <> '''' And Security_Type=3)', 1, -1, 1, NULL, NULL, NULL, NULL, 'Organization');
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=713)
	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 (713, N'tblDts', 32, N'Department', 1, 103, 3, N'Department', 0, 0, N'Department', 16, 1, 1, 1, NULL, 1, 1, 0, N'Department', NULL, N'713', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Department');
GO
IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=714)
	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 (714, N'tblDts', 32, N'Location', 1, 103, 3, N'Location', 0, 0, N'Location', 16, 1, 1, 1, NULL, 1, 1, 0, N'Location', NULL, N'714', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Location');
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[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'Show In Summary Lists', 0, 0, NULL, 0, 0, 0, 0, NULL, 1, 0, 0, N'Show In Summary Lists', NULL, 
		N'4', 1, NULL, 0, -1, 1, NULL, NULL, NULL, NULL, N'tShowInSummary');

GO

/**************************/
USE [BugTrk02_Def]
GO
IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=600)
	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 (600, N'tblDts', 32, N'Company_Name', 1, 103, 3, N'Company Name', 0, 0, N'tblUser', 16, 1, 1, 1, NULL, 1, 1, 0, N'Company Name', NULL, N'600', 1, N'Where ([nID]>0 And [tName] <> '''' And Security_Type=3)', 1, -1, 1, NULL, NULL, NULL, NULL, 'Organization');
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=713)
	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 (713, N'tblDts', 32, N'Department', 1, 103, 3, N'Department', 0, 0, N'Department', 16, 1, 1, 1, NULL, 1, 1, 0, N'Department', NULL, N'713', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Department');
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=714)
	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 (714, N'tblDts', 32, N'Location', 1, 103, 3, N'Location', 0, 0, N'Location', 16, 1, 1, 1, NULL, 1, 1, 0, N'Location', NULL, N'714', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Location');
GO

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

GO

/**************************/
USE [ChangeRequests02_Def]
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Organization' WHERE [tName]='Company_Name' AND [nRelationshipType]=-1
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=713)
	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 (713, N'tblDts', 32, N'Department', 1, 103, 3, N'Department', 0, 0, N'Department', 16, 1, 1, 1, NULL, 1, 1, 0, N'Department', NULL, N'713', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Department');
GO
IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=714)
	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 (714, N'tblDts', 32, N'Location', 1, 103, 3, N'Location', 0, 0, N'Location', 16, 1, 1, 1, NULL, 1, 1, 0, N'Location', NULL, N'714', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Location');
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[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'Show In Summary Lists', 0, 0, NULL, 0, 0, 0, 0, NULL, 1, 0, 0, N'Show In Summary Lists', NULL, 
		N'4', 1, NULL, 0, -1, 1, NULL, NULL, NULL, NULL, N'tShowInSummary');

GO


/**************************/
USE [Configuration02_Def]
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Organization' WHERE [tName]='Company_Name' AND [nRelationshipType]=-1
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=713)
	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 (713, N'tblDts', 32, N'Department', 1, 103, 3, N'Department', 0, 0, N'Department', 16, 1, 1, 1, NULL, 1, 1, 0, N'Department', NULL, N'713', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Department');
GO
IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=714)
	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 (714, N'tblDts', 32, N'Location', 1, 103, 3, N'Location', 0, 0, N'Location', 16, 1, 1, 1, NULL, 1, 1, 0, N'Location', NULL, N'714', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Location');
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[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'Show In Summary Lists', 0, 0, NULL, 0, 0, 0, 0, NULL, 1, 0, 0, N'Show In Summary Lists', NULL, 
		N'4', 1, NULL, 0, -1, 1, NULL, NULL, NULL, NULL, N'tShowInSummary');

GO

/**************************/
USE [HelpDesk02_Def]
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Organization' WHERE [tName]='Company_Name' AND [nRelationshipType]=-1
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=713)
	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 (713, N'tblDts', 32, N'Department', 1, 103, 3, N'Department', 0, 0, N'Department', 16, 1, 1, 1, NULL, 1, 1, 0, N'Department', NULL, N'713', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Department');
GO
IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=714)
	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 (714, N'tblDts', 32, N'Location', 1, 103, 3, N'Location', 0, 0, N'Location', 16, 1, 1, 1, NULL, 1, 1, 0, N'Location', NULL, N'714', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Location');
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[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'Show In Summary Lists', 0, 0, NULL, 0, 0, 0, 0, NULL, 1, 0, 0, N'Show In Summary Lists', NULL, 
		N'4', 1, NULL, 0, -1, 1, NULL, NULL, NULL, NULL, N'tShowInSummary');

GO

/**************************/
USE [Installations02_Def]
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Organization' WHERE [tName]='Company_Name' AND [nRelationshipType]=-1
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=713)
	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 (713, N'tblDts', 32, N'Department', 1, 103, 3, N'Department', 0, 0, N'Department', 16, 1, 1, 1, NULL, 1, 1, 0, N'Department', NULL, N'713', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Department');
GO
IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=714)
	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 (714, N'tblDts', 32, N'Location', 1, 103, 3, N'Location', 0, 0, N'Location', 16, 1, 1, 1, NULL, 1, 1, 0, N'Location', NULL, N'714', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Location');
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[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'Show In Summary Lists', 0, 0, NULL, 0, 0, 0, 0, NULL, 1, 0, 0, N'Show In Summary Lists', NULL, 
		N'4', 1, NULL, 0, -1, 1, NULL, NULL, NULL, NULL, N'tShowInSummary');

GO


/**************************/
USE [InventoriedSoftware02_Def]
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Organization' WHERE [tName]='Company_Name' AND [nRelationshipType]=-1
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=713)
	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 (713, N'tblDts', 32, N'Department', 1, 103, 3, N'Department', 0, 0, N'Department', 16, 1, 1, 1, NULL, 1, 1, 0, N'Department', NULL, N'713', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Department');
GO
IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=714)
	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 (714, N'tblDts', 32, N'Location', 1, 103, 3, N'Location', 0, 0, N'Location', 16, 1, 1, 1, NULL, 1, 1, 0, N'Location', NULL, N'714', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Location');
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[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'Show In Summary Lists', 0, 0, NULL, 0, 0, 0, 0, NULL, 1, 0, 0, N'Show In Summary Lists', NULL, 
		N'4', 1, NULL, 0, -1, 1, NULL, NULL, NULL, NULL, N'tShowInSummary');

GO


/**************************/
USE [KnowledgeBase02_Def]
GO
IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=600)
	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 (600, N'tblDts', 32, N'Company_Name', 1, 103, 3, N'Company Name', 0, 0, N'tblUser', 16, 1, 1, 1, NULL, 1, 1, 0, N'Company Name', NULL, N'600', 1, N'Where ([nID]>0 And [tName] <> '''' And Security_Type=3)', 1, -1, 1, NULL, NULL, NULL, NULL, 'Organization');
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=713)
	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 (713, N'tblDts', 32, N'Department', 1, 103, 3, N'Department', 0, 0, N'Department', 16, 1, 1, 1, NULL, 1, 1, 0, N'Department', NULL, N'713', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Department');
GO
IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=714)
	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 (714, N'tblDts', 32, N'Location', 1, 103, 3, N'Location', 0, 0, N'Location', 16, 1, 1, 1, NULL, 1, 1, 0, N'Location', NULL, N'714', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Location');
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[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'Show In Summary Lists', 0, 0, NULL, 0, 0, 0, 0, NULL, 1, 0, 0, N'Show In Summary Lists', NULL, 
		N'4', 1, NULL, 0, -1, 1, NULL, NULL, NULL, NULL, N'tShowInSummary');

GO

/**************************/
USE [LicenseManager02_Def]
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Organization' WHERE [tName]='Company_Name' AND [nRelationshipType]=-1
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Department' WHERE [tName]='Allocated_to_Department' AND [nRelationshipType]=-1
GO


UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Location' WHERE nID=714
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[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'Show In Summary Lists', 0, 0, NULL, 0, 0, 0, 0, NULL, 1, 0, 0, N'Show In Summary Lists', NULL, 
		N'4', 0, NULL, 0, -1, 1, NULL, NULL, NULL, NULL, N'tShowInSummary');

GO


/**************************/
USE [Purchases&Agreements02_Def]
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Organization' WHERE [tName]='Company_Name' AND [nRelationshipType]=-1
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Department' WHERE [tName]='Purchased_For_Department' AND [nRelationshipType]=-1
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Location' WHERE nID=944
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[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'Show In Summary Lists', 0, 0, NULL, 0, 0, 0, 0, NULL, 1, 0, 0, N'Show In Summary Lists', NULL, 
		N'4', 1, NULL, 0, -1, 1, NULL, NULL, NULL, NULL, N'tShowInSummary');

GO

/**************************/
USE [ReleaseMgmt02_Def]
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Organization' WHERE [tName]='Company_Name' AND [nRelationshipType]=-1
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=713)
	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 (713, N'tblDts', 32, N'Department', 1, 103, 3, N'Department', 0, 0, N'Department', 16, 1, 1, 1, NULL, 1, 1, 0, N'Department', NULL, N'713', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Department');
GO
IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=714)
	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 (714, N'tblDts', 32, N'Location', 1, 103, 3, N'Location', 0, 0, N'Location', 16, 1, 1, 1, NULL, 1, 1, 0, N'Location', NULL, N'714', 1, N'', 0, -1, 1, NULL, NULL, NULL, NULL, N'Location');
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[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'Show In Summary Lists', 0, 0, NULL, 0, 0, 0, 0, NULL, 1, 0, 0, N'Show In Summary Lists', NULL, 
		N'4', 1, NULL, 0, -1, 1, NULL, NULL, NULL, NULL, N'tShowInSummary');

GO


/**************************/
USE [Resources02_Def]
GO
IF NOT EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=600)
	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 (600, N'tblDts', 32, N'Company_Name', 1, 103, 3, N'Company Name', 0, 0, N'tblUser', 16, 1, 1, 1, NULL, 1, 1, 0, N'Company Name', NULL, N'600', 1, N'Where ([nID]>0 And [tName] <> '''' And Security_Type=3)', 1, -1, 1, NULL, NULL, NULL, NULL, 'Organization');
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Department' WHERE [tName]='Allocated_to_Department' AND [nRelationshipType]=-1
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Location' WHERE nID=882
GO

IF NOT EXISTS (SELECT nID FROM [dbo].[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'Show In Summary Lists', 0, 0, NULL, 0, 0, 0, 0, NULL, 1, 0, 0, N'Show In Summary Lists', NULL, 
		N'4', 1, NULL, 0, -1, 1, NULL, NULL, NULL, NULL, N'tShowInSummary');

GO

/**************************/
USE [Roles02_Def]
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Organization' WHERE [tName]='Company_Name' AND [nRelationshipType]=-1
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Department' WHERE [tName]='Department' AND [nRelationshipType]=-1
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Location' WHERE nID=799
GO

/************* DELETE OLD tShowInSummary ******************/
DELETE [dbo].[tblDtsFields] WHERE [nID]=813;

GO

IF NOT EXISTS (SELECT nID FROM [dbo].[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'Show In Summary Lists', 0, 0, NULL, 0, 0, 0, 0, NULL, 1, 0, 0, N'Show In Summary Lists', NULL, 
		N'4', 1, NULL, 0, -1, 1, NULL, NULL, NULL, NULL, N'tShowInSummary');

GO


/**************************/
USE [Users_mdb]
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Organization' WHERE [tName]='nCompanyName' AND [nRelationshipType]=-1
GO


UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Department' WHERE [tName]='Department' AND [nRelationshipType]=-1
GO

UPDATE [dbo].[tblDtsFields] SET [tOrigCaption]='Location' WHERE nID=259
GO

IF EXISTS (SELECT nID FROM [dbo].[tblDtsFields] WHERE nID=14)
	UPDATE [dbo].[tblDtsFields] SET [tCaption]=N'Show In Summary Lists', 
		[tLabelCaption]=N'Show In Summary Lists',
		[tBoundControlName]='14',
		[tOrigCaption]=N'tShowInSummary'
		WHERE nID=14;
GO

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


