Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Auto populate 'My Matters'
Stu_McHugh
Is there anyway to auto populate users 'My matters' folder with some of my own in house workspaces?
Regards
STU
Find more posts tagged with
Comments
Migrateduser
There is the Shortcut Creator tool from Interwoven. Otherwise I tend to do this via direct SQL
Stu_McHugh
Can you give me an example of the SQL script you would use?
Migrateduser
You need to add a record to the projects table. The example below assumes you have already located the workspace Prj_id you want to add as a shortcut and assigned it to a variable (
@intWSProjID)
. You will also need to get a new SID number for the record to be added into the projects table, the next number is stored in the prjnumdb table.
e.g.
begin tran getPrjID
select
@intNewPrjID
= prjnum from mhgroup.prjnumdb
update mhgroup.prjnumdb set prjnum = prjnum + 1
commit tran getPrjID
You also need to get the left_visit and right_visit fields updated correctly when adding the new shortcut
INSERT INTO MHGROUP.PROJECTS (PRJ_ID, DEFAULT_SECURITY, IS_SECURED, PRJ_PUBLIC, TYPE, IS_EXTERNAL, EXTRNL_AS_NRML, IS_HIDDEN, IS_DOC_SVD_SRCH, IS_PRJ_SVD_SRCH, PRJ_PID, LEFT_VISIT, RIGHT_VISIT, TREE_ID, PRJ_NAME, PRJ_OWNER, PRJ_DESCRIPT, REFERENCE_DATABASE, REFERENCE_PRJ_ID, REFERENCE_TYPE, REFERENCE_SUBTYPE)
VALUES(
@intNewPrjID
,'I','0','N',0,'N','N','N','N','N',
@intMMPrjID
,0,0,
@intMMPrjID
,
@strWSPrjName
,
@strMMPrjOwner
,
@strWSPrjDesc
,
@strDBName
,
@intWSPrjID
, 1, 'work')
-- Fix tree
UPDATE MHGROUP.PROJECTS SET LEFT_VISIT = LEFT_VISIT + 2, RIGHT_VISIT = RIGHT_VISIT + 2 WHERE TREE_ID =
@intMMTreeID
AND LEFT_VISIT > 1
UPDATE MHGROUP.PROJECTS SET RIGHT_VISIT = RIGHT_VISIT + 2 WHERE TREE_ID =
@intMMTreeID
AND (LEFT_VISIT <= 1 AND RIGHT_VISIT > 1)
UPDATE MHGROUP.PROJECTS SET LEFT_VISIT = 2, RIGHT_VISIT = 3 WHERE TREE_ID =
@intMMTreeID
AND LEFT_VISIT = 0
The exact scripts I use depend on where the source data comes from, i.e. where does the information exist as to which workspaces should be assigned to which My Matters folders. This determines how I search for the workspace to allocate to the My Matters
Email me if you want more info.
Paul.
Stu_McHugh
Paul,
That looks great. Thank you very much for your help but I don't have technical knowledge of SQL to do this. I don't suppose you know if the other method is easier to use?
Cheers
Stuart
Migrateduser
The only other method is to use the Shortcut Creator utility from Intewoven. This can be downloaded from their web site as part of the Resource Kit. It allows you to automatically populate My Matters with data from a text file. Hope this helps
Paul.