I had a request to be able to notify a group when a folder has been created and include the folder card data in the notification.
Is this possible?
If PDM Pro - use a template.
Also you can try Dispatch and autotransition of Workflow.
Still you can look in API.
OK, I'm not a seasoned admin, can you provide a little more detail?
Tried to look for?
If tried and did not find - I will look a little later (it seems to me I have something like that).
for now - only the link:
how to create a notification of new project or folder ?
I can't think of a way to send a notification when a folder is added using a template?
While templates can be used to create folders and populate the folder data card, there is no way to send a notification within the context of a template.
The Notify Me when feature only apply to files. Files move in a workflow, folders do not.
Use the Folder Notification dialog box to add or edit automatic notifications for all files in a folder.
In Dispatch, the Add condition only applies to files, so, you couldn't use that.
Use the Add condition dialog box to specify the paths of files that trigger the Dispatch action when they are added to the vault.
Technically, Dispatch can do it, but you'd have to create the folder via the dispatch script and that would also involve getting all the card attributes and writing them to the datacard. It would be a Frankenstein script :-).
The best 'clean' method would be an add-in where you would have an add-in listening on the "edmcmd_postaddfolder" command.
Probably, it will be simpler to review the plans and instead of folder notications to use files notifications and it will be the best solution.
My goal is to notify the group when a new project is created to they can add their files.
I understand Dave -
Many customers don't allow users to create new folders in the vault.
That responsibility typically falls to an admin or project lead.
The 'cheapest' way to achieve your goal is to have them send the notification as part of the process.
I know many don't like the way I setup in the Admin tool
Since we use folders to category our parts/assemblies, so it's important to have a good folder structure
I don't allow users add new folder - so if they need one, I create it and send notice everyone
You can trigger very detailed notifications from SQL Server Agent using a Job, but you're going to need to know a fair amount of SQL to get it to work. Here's an example that might help get you on the right track. It first checks the last time the job successfully ran, then finds all folders created after that time and looks for an 'Owner' on the folder datacard and emails that person. The while loop is there to aggregate all the new folders together so users don't get one email per new folder.
Declare @LastRun datetime
Declare @email varchar(255)
Set @LastRun = (select top 1 DATEADD(minute,DATEDIFF(minute,GETDATE(),GETUTCDATE()),msdb.dbo.agent_datetime(run_date, run_time)) as [RunDateTime]
JOIN msdb.dbo.sysjobhistory sh
ON sj.job_id = sh.job_id
sh.run_status = 1
sj.name = 'Fill in Name of SQL Job Here'
order by RunDateTime desc)
Select u.email, p.path as msg
inner join Projects p on hp.ProjectID = p.ProjectID
inner join VariableValue vv on vv.ProjectID = p.ProjectID
inner join variable v on v.VariableID = vv.VariableID and v.VariableName = 'Owner'
inner join users u on u.Username = vv.ValueCache
hp.Time > @LastRun
DECLARE recipient_cursor CURSOR FOR
(select distinct email from #Results)
fetch next from recipient_cursor into @email
WHILE @@FETCH_STATUS = 0
DECLARE @tableHTML NVARCHAR(MAX) ;
SET @tableHTML =
N'<H1>New Project Folders</H1>' +
N'<table border="1">' +
CAST ( ( SELECT td = msg
WHERE email = @email
FOR XML PATH('tr'), TYPE
) AS NVARCHAR(MAX) ) +
EXEC msdb.dbo.sp_send_dbmail @recipients=@email,
@subject = 'Work Order List',
@body = @tableHTML,
@body_format = 'HTML' ;
FETCH NEXT FROM recipient_cursor INTO @email
I think that the question needs to be considered in a complex, but not in parts.
For creation of the new project in my opinion the best option is a template.
As to configure it there is a set of examples.
At the same time, the project as a rule has some documents which can be managed through Workflow (for example - Workflow - Project Doc-s).
It is possible to include the document in a template of the New Project - for example Initiation at which Check In (automatically or manually) through Workflow notifications will be sent.
There are no problems with folder structure, moreover, in a template it is possible to configure also the rights of users / groups (including creation of folders, etc.) and variables, etc.
In my opinion, for the specified purpose it is the best option.
Why it is necessary to invent the bicycle?
Or I did not understand something?
Retrieving data ...