Enforce Business Rule In SharePoint List
A SharePoint Workflows tutorial by Peter Kalmström
To
enforce a business rule in a SharePoint list, you can let
a workflow both undo the forbidden action and send an automatic
e-mail to the user who tried to do something that was against
the rule.
In the demo below Peter Kalmström, CEO and Systems Designer
of kalmstrom.com Business Solutions, shows how to stop users
from setting a task to completed without filling out the
"Minutes worked" field in the task form. Peter uses the
default tasks list from the kalmstrom.com product
Kanban Task Manager, but the idea can of course
be applied to any list.
Kanban Task Manager has no "Minutes worked" field,
so Peter first adds this field to the list and sets the
default value to 0. Then he can create a SharePoint 2013
workflow that sends reminder e-mails to users who have tried
to complete a task without entering a value in the "Minutes
worked" field. The e-mail contains a link to the task and
information that the field has to be filled out.
Workflow for mandatory field reminder
- Open the list in SharePoint Designer.
- Create a new SharePoint 2013 workflow that is run
every time an item is changed.
- Set the first Condition: if the Status of the task
is Completed.
- Set the second Condition: if "Minutes worked" is
0.
- Set the first Action: update the list item so that
the Status is set to In Progress.
- Set the second Action: send an e-mail to the person
who last modified the task.
- Add text and a link to the task in the e-mail.
- Set the workflow to end.
- Check, publish and test the workflow.
|