.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Problem passing local variable for Approvers email in customised Approval workflow

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :SharePoint

I am building an Approval workflow using SPD and have used the Start an Approval Workflow task action.

The workflow works on a change register and looks up different list of approvers assigned to change items.

Using Local Variables, the look up assignment works fine.

My problem is that when I pass the Approvers variable to the email at the end of the workflow (the on Current Item with... part) it appears the variable in empty?

I have used the approach of adding a variable check in the content of the emails - as the workflow sends the emails anyway. The lookup works fine - it’s just the email at the end of the process that does not seem to be able to see the contents of the variables that are shown to be set earlier.

View Complete Post

More Related Resource Links

Approval Workflow does not send Start Email to approvers


We've a SharePoint Server 2007 (which is upgraded from our SharePoint 2003 Portal Server + SP2 ).  

There is a strange problem working with Workflows.

When a standard Workflow is started for a document in an Existing Document Library, The Document's WorkFlow status changes to "In progress" and an Email is sent to the initiator; In the site Task List, also, the tasks are assigned correctly to approvers. but no emails are sent to approvers!!!

I should add that approvers WILL receive a due date warning email on the Task Due Date. 

The only missing part is "Task Started/Assigned" Emails.


Can anybody help? 

Approval workflow is not passing task instructions to workflow task page (WrkTaskIP.aspx)

Hi, Very weird issue. Never happened before. I have Document Approval workflow, based on built-in approval workflow, which is available in document libraries of every site in the site collection. You might know that when you kick off approval (even collect feedback) workflow, you can enter task instructions, which will be passed on to the workflow task page (WrkTaskIP.aspx), and also included in the email, which will be sent to approvers (reviewers in case it is a collect feedback workflow). I know that the users used to enter task instructions, and before, it was appearing in the workflow task page where you approve/reject it. Recently, they noticed that the task instructions textbox was being empty, though the instructions were being entered when the workflow was started. Moreover, it stopped showing task instructions for other tasks that existed for a long time. BTW, this is not the same in every environment we have, but I could not find any difference in the settings when I compared them. Has anybody faced this problem? Please help if you know the solution. Thank you!!! Regards, R.D.M.

Approval Workflow email truncating space in folder name


Hello all-

I am programatically starting the approval workflow on a doc in a document library.  MOSS 2007.

That doc is in a sub folder of the libary.  The sub folder has a space in the name.  For example, the doc library name is Documents.  The sub folder name is 1.0 General.

When starting the approval workflow on a doc in this libary, the link that appears in the email message does not maintain the space in the folder name.  It does maintain the space in the doc library name.  For example, the link appears as http://servername/sitename/Documents/1.0General/Doc1.docx, but it should be http://servername/sitename/Documents/1.0%20General/Doc1.docx.  Any ideas what is happening and how to resolve this.

Email is Lotus Notes server and client.



Trying to generate dynamic link to a document within approval workflow email message


In the out of the box approval workflow, the fields below are used to dynamically create a link within the email for a user to access the item/document to be reviewed:


Review [%TaskProcess:Item Title%].[%Variable: InternetLink%]

If I create an approval workflow and modify the text around what comes out of the box, the link works.  If I add those exact fields (period and space included) via the "Add or Change Lookup" box (field selector), it doesn't work. It displays the title as a link but without a document extension of XML (for Infopath form for instance).


I don't want to have to delete my workflow and recreate it just to get that link to work.

Any ideas on why the "[%TaskProcess:Item Title%].[%Variable: InternetLink%]" only works when it is created out of the box versus building the string manually ?

SharePoint 2010 Approval Workflow email is not showing link to Workflow Task list



I have created an out of box Approval workflow in SharePoint 2010. I am receiving email with below information

Task assigned by Chinna Malipedu on 10/7/2010.

Due by 1/1/0001

Approval started by Chinna Malipedu on 10/7/2010 11:43 AM
Comment: Approve



To complete this task:
1. Review SharePoint2010.
2. Perform the specific activities required for this task.
3. Use the Open this task button to mark the task as completed. (If you cannot update this task, you might not have access to it.)

But I need to go to Workflow Task List by clicking 3 item "Use the Open this Task" , this is not a link here

or I want like "Edit this task to mark the task as completed."  Edit this task should link to Task List

How to do this? do i missing any configuration?

I have successfully done the same  in MOSS 2007.                                                               Is there  any extra&n

Email notifications from Approval workflow

I currently have an issue with an out-of-the-box workflow; in essence it relate to the workflow author/originator NOT receiving an update once an approval or rejection has been committed.

A task list has been set up to receive *status* updates everytime an workflow action is committed whether that be initiation/approval/rejection/completion.  Everything appears to work APART from completion and the issue of an email notification to the workflow owner.

I have checked the logs on the Sharepoint box itself and appear to be fine.

I have checked the logs on the Outbound SMTP server and everything is OK upto to the point of completion.

I need some advice on what else I can do/check to verify IF the email notifications are being created by SharePoint; what in the logs within Sharepoint I can further check (diagnostic is not set to verbose - ALL) and what ELSE can be checked on IIS/Outbound SMTP server...

Any advice would be much appreciated...

More than 10 approvers in a SPD approval workflow




I'm working on a custom approval workflow (using the approval template) in SPD 2010, it works fine...

BUT i need to have more than 10 approvers (fixed approvers) and in SPD 2010 it seems that we can only set 10 approvers manually .

There's probably a way to do this but I can't find it !


Thanks for your help !

Approval Workflow blank status problem.


We noticed an issue in our environments where under certain conditions an approval workflow has a blank status.

I have since been able to replicate this in a vanilla environment, and have tried up to the June 2010 CU. I will be trying on Oct 2010 CU soon.

Steps to reproduce...

1. Create a document library
2. In versioning set Require Check Out to Yes.
2. Create at least one document in the newly created document library and check in.
3. Create an Approval Workflow by using a workflow template (go to Settings -> Document Library Settings -> Workflow settings and then set up an approval workflow). Ensure that this workflow is configured to started when items are modified, and is used for content approval (after workflow is completed, update the approval status).
4. Modify one of the documents contained within the newly created document library. The workflow starts automatically.
5. On the newly created document library page, you will notice that the <workflow name> column is displayed but it does NOT show the status of the workflow.

If you look at the workflow on the item it will show up as "in progress" but on the library is is blank.

So far it looks like this only occurs when required check out is turned on.

Any ideas anyone? Are we missing something?



Multiple Approvers Parallel Approval using Visual Studio Workflow


I have created a Custom Visual Studio WF. I have used the Replicator control and set the executionType to Parallel.As Parallel excution replicator will set the index to last. So after searching i found I need to create custom Sequence Activity and we need to place the activities there.

In my custom Sequence Activities I have placed like this


  • Create Task with ContentType
  • OnTaskCreated
  • While
  • OnTaskChanged
  • OnTaskCompleted
While contain Code Condition. I placed the custom activity in my workflow. Task is created successfully. But when the task get changed, the OnTaskChanged event is not fired. Anybody please help me.







Email Notification for Workflow approvers



MOSS 2007

I have a issue with workflow (out of box) email alerts. We get the email alert for a workflow intiator but not for an approver

Due date alerts are working fine, only the job immediate alerts are not coming,

When approver is trying to reassign the task to some person, even he dont receive any email for his new task.

pls suggest me on this issue.

all the settings are fine,

thanks for the help.


Local variable scoping in C#

In my previous post, Compiler-generated scopes for local variable declarations, I briefly touched on the issue of multiple meanings applied to the same name. In this post, I'll aim to flush out the compiler's rules with regards to binding names in their local scopes.

Compiler-generated scopes for local variable declarations

I was tasked with understanding and fixing a bug on error reporting with foreach iteration variables the other day, and it got me thinking about local variable scoping rules in C# in general. First, the bug.

Foundations: Workflow Services for Local Communication


This month's column describes how to use WCF for communication between a workflow and a host application in Windows Workflow Foundation 3. This knowledge should help developers with their efforts using WF3 and prepare them for WF4, where WCF is the only abstraction over queues (referred to as "bookmarks" in WF4) that ships with the framework.

Matthew Milner

MSDN Magazine November 2009

Trying to send email using Sharepoint Designer 2007 workflow and email enabled list


I have a a list that recieves email. I have few fields that shows me the originator: "E-Mail From" and "E-Mail Sender".

I am trying to create a workflow that will generate an auto reply to the originator but the SPD fails to recognize the email address in these two fields. It's either truncating part of it or uses the html ( href=mailto:Demo@DemoSomething.com) in the To field.

Thank you,


Serial approval workflow keeps running


I have a serial approval workflow created out of the box. The setting cancell this workflow when the document is rejected is selected. But if one of the approvers rejects it the workflow keeps running. After this is it will give acces denied errors for the other approvers.

So for example what is happening. The workflow is started and sends a email to persone 1. This persone approves so the workflow sends a email to persone 2. Persone 2 decided to reject the document. Now i want the workflow to be cancelled, but it keep running and sends a email to persone 3 for approval. If persone 3 opens the workflow he get's a acces denied error, i guess because of the reject.

Anyone has a idea what is happening here?

I can't send email from workflow.


I’ve got strange problem. I’ve created workflow with Visual studio 2008 which works fine. If workflow create task user gets email with alert and it works  - user gets email.   The problem is that I would like to use Workflow component: “SendEmail” for some cases. And if I enter directly into component email address for field: “TO” the message will be delivered. But if I use simple code with the same email address for field ”TO” it doesn’t work (field TO is empty now).

private void sendEmail_ExecuteCode(object sender, EventArgs e)



Sharepoint 2007 Email problem


I've used Sharepoint 2007 to create my website. Within my web pages I've included Forms in order to capture people's contact details, so that when they 'Submit' the form their details are emailed to my email account. The problem is that when I go to Form Properties and insert the email address to which I want the data sent, I receive this message: "This form cannot be configured to send results via email. The web site may be based at a disk-based location, or a location that has not been configured to send email. Contact your system admin or ISP for more info. Would you like to remove the email recipient Yes or No"   

I am satisfied that the settings within the webhosting service are correct. Is this functionality available with Sharepoint 2007 or do I need to switch to alternative software.



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend