I have posted the script below that will send out an email notification with attachments when the user defined field is populated with the value 'In Progress'. The body of the email will contain the Cycle ID number, as well as the project name where the cycle is located. You will need to edit the script to work with your current environment. I also recommend that you test this in a test project before implementing into your production environment.
Add this workflow to the existing Cycle_FieldChange(FieldName) subroutine:
Sub Cycle_FieldChange(FieldName)
'On Error Resume Next
Dim strSubject, strDes, strComment
Dim objTDC, objAttachFact, objAttachment, objAttachment2, objAttachList
Dim objCycleFact, strCycleId, objCycle, objAttachmentList
Set tdc = TDConnection
Set objTDC = TDConnection
Set objCycleFact = objTDC.CycleFactory
strCycleId = Cycle_Fields(''RCYC_ID'').Value
Set objCycle = objCycleFact.Item(strCycleId)
Set objAttachFact = objCycle.Attachments
Set objAttachList = objAttachFact.NewList('''')
For Each objAttachment In objAttachList
If Instr(objAttachment.ServerFileName, strFilterType) then
j = j + 1
End If
Next
If j < 1 Then
Else
ReDim objAttachmentList(j - 1)
End If
For Each objAttachment2 In objAttachList
If instr(objAttachment2.ServerFileName,strFilterType) Then
objAttachmentList(i) = objAttachment2.ServerFileName
i = i + 1
End If
Next
'Replace 'RCYC_USER_01' with the title of the user defined field
If Cycle_Fields.Field(''RCYC_USER_01'').Value = ''In Progress'' Then 'This line used if specific value needs to be used
strSubject = ''Status Change Notification for Cycle #'' & Cycle_Fields.Field(''RCYC_ID'').Value & '' in project '' & tdc.ProjectName
strDes = ''The status for Cycle # ['' & Cycle_Fields.Field(''RCYC_ID'').Value & ''] has changed to [ '' & Cycle_Fields.Field(''RCYC_USER_01'').Value & '' ].'' &_
'' Any documents attached to Cycle # ['' & Cycle_Fields.Field(''RCYC_ID'').Value & ''] have been attached to this email. ''
'the next line sends an email to a single user - multiple users need to be inserted in the quotes separated by semi-colons
tdc.SendMail ''your_email@alm_mail.com'', '''', strSubject, strDes, objAttachmentList
Set TDConnection = nothing
End If
'On Error GoTo 0
End Sub