USE [censusweb_mdb]
GO

/*** Delete for the Check in / out view ***/
DELETE [dbo].[tblFieldAttribute] WHERE [nViewID]=72
GO

IF NOT EXISTS (SELECT * FROM [tblFieldAttribute] WHERE nViewID=72)
BEGIN
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 801, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1199, 95, N'fld_switch.htmpl', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 2, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 11, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1004, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1204, 5, N'2', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1204, 68, N'yes', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1204, 82, N'yes', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1204, 95, N'fld_ExchangeAssets2.htmpl', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 9, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1099, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1203, 5, N'2', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1203, 68, N'yes', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1203, 82, N'yes', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1203, 95, N'fld_ExchangeAssets1.htmpl', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 7, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1082, 13, N'Assign To', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1082, 14, N'2', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1082, 60, N'SpanTwoWidthOne', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1082, 81, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 8, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 10003, 5, N'2', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 10003, 62, N'SpanTwoWidthOne', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 10003, 82, N'yes', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1115, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 10006, 95, N'fld_Image_RO.htmpl', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 10001, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 10002, 5, N'2', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 10002, 62, N'SpanTwoWidthOne', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 10002, 82, N'yes', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 10000, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 10004, 14, N'2', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 10004, 60, N'SpanTwoWidthOne', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 10004, 95, N'fld_103_7_RO.htmpl', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 10005, 55, N'</td><tr><td colspan="2"><div class="TabSectionDivider"> </div>', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 10005, 95, N'fld_103_7_RO.htmpl', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 30, 5, N'2', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 30, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 30, 62, N'SpanTwoWidthOne', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 30, 82, N'yes', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1093, 68, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1093, 95, N'fld_Asset-Type_Model.htmpl', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 918, 82, N'yes', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 918, 86, N'yes', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 918, 95, N'fld_NoField.htmpl', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 919, 5, N'2', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 919, 62, N'SpanTwoWidthOne', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 919, 82, N'yes', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 921, 82, N'yes', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 865, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 865, 68, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 865, 82, N'yes', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1078, 1, N'Return Date', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1078, 2, N'2', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1078, 64, N'SpanTwoWidthOne', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1196, 82, N'yes', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1196, 95, N'fld_103_7_RO.htmpl', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 627, 23, N'5', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 627, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1120, 82, N'yes', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 993, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1207, 56, N'never', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1202, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 894, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 894, 95, N'fld_HiddenField.htmpl', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 10007, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 21, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 20, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 886, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 806, 13, N'Allocation Type', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 806, 14, N'2', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 806, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 806, 60, N'SpanTwoWidthOne', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1023, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 907, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1092, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1092, 79, N'yes', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 1121, 56, N'no', NULL)


/*** New Check InOut Person Fields ***/


	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 70, 62, N'SpanTwoWidthOne', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 70, 5, N'2', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 71, 5, N'2', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 71, 62, N'SpanTwoWidthOne', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 72, 14, N'2', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 72, 60, N'SpanTwoWidthOne', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 72, 95, N'fld_103_7_RO.htmpl', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 73, 14, N'2', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 73, 55, N'</td></tr><tr><td colspan="2"><hr class="lineSep" style="width:95%">', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 73, 60, N'SpanTwoWidthOne', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 73, 95, N'fld_103_7_RO.htmpl', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 74, 5, N'2', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 74, 62, N'SpanTwoWidthOne', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 74, 95, N'fld_User_Image_Assets.htmpl', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 75, 14, N'2', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 75, 56, N'no', NULL)
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (72, 75, 60, N'SpanTwoWidthOne', NULL)
END

GO

IF NOT EXISTS (SELECT * FROM [tblFieldAttribute] WHERE [nViewID]=72 AND [nFieldID]=600 AND [nAttributeID]=56 )
BEGIN
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) 
	VALUES (72, 600, 56, N'no', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) 
	VALUES (72, 1, 56, N'no', NULL)
END

GO

IF NOT EXISTS (SELECT * FROM [tblFieldAttribute] WHERE nViewID=86)
BEGIN
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 13, 13, N'Charge To', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 13, 14, N'2', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 13, 60, N'MemoFieldWidth', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 13, 81, N'no', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 30, 5, N'2', NULL)
	
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 30, 56, N'no', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 30, 62, N'MemoFieldWidth', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 798, 14, N'2', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 798, 56, N'no', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 798, 60, N'MemoFieldWidth', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 907, 13, N'For Asset', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 907, 14, N'2', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 907, 60, N'MemoFieldWidth', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 799, 14, N'2', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 799, 56, N'no', NULL)
	
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 799, 60, N'MemoFieldWidth', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 826, 56, N'no', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 10002, 95, N'fld_switch.htmpl', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 800, 56, N'no', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 20, 60, N'TextboxWidth', NULL)

	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (86, 627, 71, N'none', NULL)
END

GO

/*** ASSETS LIBRARY ***/
IF NOT EXISTS ( SELECT * FROM [dbo].[tblFieldAttribute] WHERE [nViewID]=44 AND [nFieldID]=76 AND [nAttributeID]=56 )
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (44, 76, 56, N'No', NULL)
GO


/*** CONTAINER FIELD ***/
/*** Tooltip ***/
UPDATE tblFieldAttribute 
	SET tAttributeValue='If this asset is in, was transported in or belongs to a container, indicate it here.'
	WHERE  nFieldID=1095 AND nVIewID IN (44, 74, 82) AND nAttributeID=91;

GO

/************** USERS MANAGE Services Provided By - Link to user details =no ********************/
IF NOT EXISTS ( SELECT * FROM [dbo].[tblFieldAttribute] WHERE [nViewID]=18 AND [nFieldID]=68 AND [nAttributeID]=81 )
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (18, 68, 81, N'No', NULL);
	
GO

/*** HelpDesk ***/
/*** Add Communication_Received ***/
IF NOT EXISTS ( SELECT * FROM [dbo].[tblFieldAttribute] WHERE [nViewID]=5 AND [nFieldID]=100 AND [nAttributeID]=56 )
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (5, 100, 56, N'no', NULL);
GO

/*** ASSET TYPES MANAGE ***/
-- Hide Location
IF NOT EXISTS( SELECT * FROM [dbo].[tblFieldAttribute] WHERE [nViewID]=20 AND [nFieldID]=882 AND [nAttributeID]=56 )
	INSERT [dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) 
	VALUES (20, 882, 56, N'never', NULL);
ELSE
	UPDATE [dbo].[tblFieldAttribute] 
	SET [tAttributeValue]='never'
	WHERE [nViewID]=20 AND [nFieldID]=882 AND [nAttributeID]=56 ;

GO
