<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Kishore's blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/kishore/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/kishore/feed.xml</link>
    <description>I am a developer at Microsoft. I am currently a member of &amp;quot;Global Delivery&amp;quot; team.</description>
    <lastBuildDate>Wed, 17 Apr 2019 04:09:30 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Updating List Item with Task Form Custom Field in SharePoint Approval 2010 Workflow</title>
      <link>https://docs.microsoft.com/archive/blogs/kishore/updating-list-item-with-task-form-custom-field-in-sharepoint-approval-2010-workflow</link>
      <pubDate>Sun, 15 Jan 2012 04:48:00 GMT</pubDate>
      <dc:creator><![CDATA[Kishore Kumar Arvapalli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kishore/2012/01/15/updating-list-item-with-task-form-custom-field-in-sharepoint-approval-2010-workflow/</guid>
      <description><![CDATA[Objective
I have come across a scenario in which I need to add a custom field in Approval Task Form...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: medium; text-decoration: underline;"><strong><span style="line-height: 115%; font-family: 'Calibri','sans-serif'; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-IN; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">Objective</span></strong></span></p>
<p><span style="line-height: 115%; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-IN; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">I have come across a scenario in which I need to add a custom field in Approval Task Form and then the list item has to be updated with the value entered in custom approval task form field. I want to update the list item only when approver approves the item.</span></p>
<p><span style="font-size: medium; text-decoration: underline;"><strong>Solution</strong></span></p>
<p>Let&rsquo;s see the steps that I have followed</p>
<ul>
<li><span style="line-height: 115%; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-IN; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">Open Site in SharePoint Designer 2010, click Workflows on left side navigation. Right click on Approval - SharePoint 2010 workflow, select <strong>Copy and Modify</strong> option. Name new copy as <strong>Custom Approval Workflow</strong>. Select the content type that is used in the SharePoint list. Content Type selection is important as we are updating a specific field through workflow,&nbsp;otherwise custom list fields will not be available in reusable workflows.</span></li>
</ul>
<p style="padding-left: 30px;"><span style="line-height: 115%; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-IN; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/47/79/2678.CreatingWorkflowCopy.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-47-79/2678.CreatingWorkflowCopy.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/47/79/2678.CreatingWorkflowCopy.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-47-79/2678.CreatingWorkflowCopy.png" /></a></span></p>
<ul>
<li>Click <strong>Approval Workflow Task (en-US) Copy</strong>. Click <strong>New</strong> button in <strong>Task Form Fields</strong> section. Name the field as <strong>Bonus Points</strong> of Number data type</li>
</ul>
<p style="padding-left: 30px;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/47/79/5516.AddingTaskFormField.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-47-79/5516.AddingTaskFormField.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/47/79/5516.AddingTaskFormField.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-47-79/5516.AddingTaskFormField.png" /></a></p>
<ul>
<li>Click on <strong>Local Variables</strong> in Ribbon. Add a variable name <strong>BonusPointsVariable</strong> of Number data type</li>
</ul>
<p style="padding-left: 30px;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/47/79/2541.AddingLocalVariable.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-47-79/2541.AddingLocalVariable.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/47/79/2541.AddingLocalVariable.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/300x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-47-79/2541.AddingLocalVariable.png" /></a><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/47/79/7128.AddingLocalVariable.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-47-79/7128.AddingLocalVariable.png"></a></p>
<ul>
<li>Click on <strong>Change the behavior of single task</strong> link under <strong>Customizatoin</strong> section. Hover the mouse inside <strong>If <span style="text-decoration: underline;">Current Task:Outcome</span> <span style="text-decoration: underline;">equals</span> <span style="text-decoration: underline;">Approved</span></strong> condition under When a Task Compltes section and add <strong>Set Workflow Variable</strong> action from the ribbon. Assign the local variable (<strong>Variable:BonusPointsVariable</strong>)&nbsp;with the task form field (<strong>Current Task:Bonus Points</strong>)&nbsp;as highlighted in the below picture.</li>
</ul>
<p style="padding-left: 30px;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/47/79/2541.AssigningWorkflowVariable.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-47-79/2541.AssigningWorkflowVariable.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/47/79/2541.AssigningWorkflowVariable.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-47-79/2541.AssigningWorkflowVariable.png" /></a></p>
<ul>
<li>Navigate back to the Workflow Editor and add a condition - <strong>If any value equals value</strong> from the ribbon at the end of the Step1</li>
<li>Edit If condition to <strong>If Variable:IsItemApproved equls Yes</strong></li>
</ul>
<p style="padding-left: 30px;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/47/79/1261.AddingIfCondition.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-47-79/1261.AddingIfCondition.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/47/79/1261.AddingIfCondition.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-47-79/1261.AddingIfCondition.png" /></a></p>
<ul>
<li>Position mouse pointer in the above If condition and add <strong>Update List Item</strong> action from the ribbon. Set the <strong>List Item field</strong> - <strong>Points</strong> with the <strong>Local Variable: BonusPointsVariable</strong> as shown in the below picture.</li>
</ul>
<p style="padding-left: 30px;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/47/79/4186.UpdatingListItem.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-47-79/4186.UpdatingListItem.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/47/79/4186.UpdatingListItem.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-47-79/4186.UpdatingListItem.png" /></a><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/47/79/7206.AssigningWorkflowVariable.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-47-79/7206.AssigningWorkflowVariable.png"></a></p>
<ul>
<li>Save and Pubilsh the workflow.</li>
</ul>
<p>&nbsp;</p>
<p>Navigate to List Content Types (List Settings --&gt; Content Types --&gt; Select the content type) and click on Workflow Settings. Add a work flow by selecting the above defined workflow. With this, whenever a approver approves a task (Task will be created&nbsp;for each&nbsp;list item), he can provide Bonus points in the Task Form. List Item will be updated with the approver entered bonus points.</p>
<p>&nbsp;</p>
<p>Thats all. Hope this is useful.</p>
<p>Regards, Kishore</p>]]></content:encoded>
    </item>
  </channel>
</rss>