1

I want to create a workflow that will email users when a question that was posted on the discussion board has gone unanswered for 48 hours. I can't seem to figure it out and have tried searching but all i see are setting workflows for

1

A little background info to get this working:

  1. Discussion boards have two content types: Discussion and message.
  2. Messages are the replies
  3. Like all items in SP, Discussions and messages both have an ID property
  4. Messages have a ParentItemID property, which is the id of the discussion that the reply is connected with.

With the above, you can create the following workflow:

First, set the workflow to run for each new item, but only for items of content type "discussion". (both of these are set on the workflow settings screen in spd). Also, create two workflow variables: DiscussionID and ReplyID. Then:

  1. Pause for 48 hours
  2. Set DiscussionID = CurrentItem:ID
  3. Set ReplyID = workflow lookup: data source: current list field from source: ID where field: parent item id = value: variable: currentitemid
  4. if ReplyID = 0, then send notification that there were no replies

To translate the above, for each new discussion, the workflow waits 48 hours, and then queries the list for any replies that have a parent item id of the original disucssion. If there are 20 replies, this step only returns the first. But we don't care how many replies there are, only whether or not there are any replies. If there are no replies at all, then the replyid variable will be 0.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.