dsw.dbo.ttTarget contains three fields relating to target build status - TargetBuiltOn, TargetBuilt, and TargetBuiltBy
If the target already exists, it does not need to be rebuilt (on the Map/Targets Page).
If the target has the incorrect structure, the table could be recreated, or the Synchronize target buttons are available.
The Map/Targets page works fine in this regard.
One is unable to build the Source tables if TargetBuiltOn is Null.
The following change is proposed.
Add the following (or similar) to the onvalidate Routine of the ttTarget Page.
USE [cMap]
CREATE VIEW [dbo].[trTarget_BuildFields_UpdSel]
AS
SELECT dbo.ttTarget.TargetBuiltOn, dbo.ttTarget.TargetBuilt, dbo.ttTarget.TargetBuiltBy, DSW.dbo.List_Table.NAME, GETDATE() AS TargetBuildOnNew, 1 AS TargetBuiltNew,
'ExistedAlready' AS TargetBuildBy
FROM dbo.ttTarget INNER JOIN
Console.dbo.apiConsoleWaveProcessAreaObjectTargetSourceALL_ExtendedSel ON
dbo.ttTarget.WaveProcessAreaObjectTargetID = Console.dbo.apiConsoleWaveProcessAreaObjectTargetSourceALL_ExtendedSel.WaveProcessAreaObjectTargetID INNER
JOIN
DSW.dbo.List_Table ON Console.dbo.apiConsoleWaveProcessAreaObjectTargetSourceALL_ExtendedSel.Target = DSW.dbo.List_Table.NAME AND
Console.dbo.apiConsoleWaveProcessAreaObjectTargetSourceALL_ExtendedSel.DataSourceID = DSW.dbo.List_Table.datasourceid
WHERE (dbo.ttTarget.TargetBuiltOn IS NULL) AND (dbo.ttTarget.TargetBuilt = 0 OR
dbo.ttTarget.TargetBuilt IS NULL) AND (dbo.ttTarget.TargetBuiltBy IS NULL)
GO