Divergent docking
Sometimes, a user wants a docking that is divergent from the rest of the users. The user can get a different [Feature group ID] but that would mean that all changes in all screens would have to be saved twice. Once for the user that wants a different docking and once for all other users.
There is however a smarter way to do this. Start by giving the user a new [Feature group ID] and specify a [Command ID]. In our example, the default [Feature group ID] is and the divergent [Feature group ID] is 101. The command ID in our example is 221.
IF @FeatureGroupID > 100 and @FeatureTypeID <> 'Docking'
begin
set @FeatureGroupID = @FeatureGroupID - 100
end
SELECT
TOP 1 [Data]
FROM [Features]
WHERE (
[User ID] = @UserID
OR [User ID] IS NULL
) AND (
[Control name] = @ControlName
OR [Control name] IS NULL
)
AND [Feature type ID] = @FeatureTypeID
AND [Feature group ID] = @FeatureGroupID
ORDER BY [User ID] DESC
, [Control name] DESC
, [Feature ID]
This ensures that only the docking is saved twice. All other features will be the same for both Feature group ID’s.