Highlighted
Absent Member.
Absent Member.
356 views

due_date Workflow help


Sub DueDateExceeded

Dim myreq
Dim reqFilter
Dim Reqlist

set myreq = tdc.reqfactory
set reqFilter = myreq.Filter

reqFilter.Filter("Due_date") = ">=" & Date

Set reqlist = reqFilter.NewList

select case reqlist.FieldName

    Case "RQ_REQ_AUTHOR"

    If DateDiff("d",Date,Req_Fields.Field("RQ_USER_21").Value)<0 Then
          set objReq = TDConnection.ReqFactory.Item(Req_Fields.Field("RQ_REQ_ID").Value)
           mailTo=Req_Fields.Field("RQ_REQ_AUTHOR").Value
           mailCC=""
           mailopt=2
           subject="Requirement No. "& Req_Fields.Field("RQ_REQ_ID").Value & " Due_Date Exceeded "
           comment=Req_Fields.Field("RQ_DEV_COMMENTS").IsNull
           objReq.Mail mailTo,mailCC,mailopt,subject,comment
      End if
End Select

 

End Sub

0 Likes
4 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

What is your question?

[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
0 Likes
Highlighted
Contributor.
Contributor.

are you not getting the email when req got passed the due date?
0 Likes
Highlighted
Absent Member.
Absent Member.

no am not getting any email.... i need help on where it is wrong


@Jagath wrote:
are you not getting the email when req got passed the due date?

 

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Try:

1) check the filter column name.

reqFilter.Filter("Due_date") = ">=" & Date

 

you use "Due_date" but I think filter object must use the DB name of field not the label.

 

2) thin about the condition here:

reqFilter.Filter("Due_date") = ">=" & Date

 

you use ">=" then the current date and futher you use"<0"

If DateDiff("d",Date,Req_Fields.Field("RQ_USER_21").Value)<0 Then

 

so think what is wrong.

 

3) If you do not no try to add debug messages MSGBOX and uncommnet on error statement to see any errors if stated.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.