Send email from SharePoint based on values in an InfoPath form

by S.Y.M. Wong-A-Ton

Learn how you can access InfoPath form fields from a SharePoint Designer workflow and use a condition in the workflow to take action based on the value of a field in the InfoPath form.

You can create a SharePoint Designer workflow to send an email from SharePoint when a document – an InfoPath form in this case – changes or is added to a SharePoint Form Library.

In essence, you can use a SharePoint Designer workflow to monitor values of InfoPath form fields, make decisions based on those values, and then send an email notification to a user or take any other type of action you require.

But before you can do all of this, you first have to make the InfoPath form field available as a column in a SharePoint Form Library, if you want to access a value in an InfoPath form from within a SharePoint Designer workflow. And for this you have to promote InfoPath form fields.

You can promote an InfoPath form field to one of two types of columns in SharePoint:

If you do not pre-create a SharePoint Form Library as described in Set the value in an InfoPath form from a SharePoint Designer workflow, when you promote an InfoPath form field to a SharePoint column, InfoPath will automatically create a new list column on the SharePoint Form Library to promote the form field to.

In the following sample solution and presentation, I’ve created an InfoPath form template with a drop-down list box named managerEmail containing the names (Display Name of the drop-down list box) and email addresses (Value of the drop-down list box) of people who should be sent an email when the InfoPath form is added to a SharePoint Form Library. An email should only be sent if the value of a text field named expenseThreshold on the InfoPath form contains a number greater than 1000.

This means that you’d have to promote both the text field and the field for the drop-down list box to SharePoint columns, so that the SharePoint Designer workflow can access and use the values of the fields in its logic for sending email notifications.

To view the presentation, see Send an email notification from SharePoint based on the values in an InfoPath form.

 Subscribe (RSS | Email)

Related Posts

Comments to this post were closed 30 days after it was published.

Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent of S.Y.M. Wong-A-Ton. Usage of techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author, S.Y.M. Wong-A-Ton.

Working with InfoPath