Adding Approval Workflow Comments to the Workflow Task

An OOB SharePoint 2010 Approval Workflow routes items in a SharePoint site to specified people for approval. When the approver Approves or Rejects the item, they are able to enter a Comment that is sent to the content creator so they have some more information as to why item was approved or rejected.

The default task list does not contain a column to store the Comment. If you click on the specific task after it has been completed, you will see the comments that were entered by the approver. The Comments are not stored in the Task list though and is not easily accessible in a view of all tasks.

Reject or Approve

Recently I was asked to create a report of all tasks that have been Approved or Rejected. The easiest thing was to use the Task list as is. Of course, the client wanted to see the comments that were set by the approver.

These are the steps I took to add the Comments to the Task list so that they could be included in the report.

  1. Add a Comments column to the Tasks list that is associated with the workflow.
  2. For someone with both Erectile Dysfunction (ED) and Benign Prostate Hyperplasia (BPH). purchase levitra online It is a popular ED treatment purchase cheap viagra http://appalachianmagazine.com/2018/09/10/could-hurricane-florence-be-another-hugo-for-appalachia/ solution for men of all ages who are suffering from the disease. A partner who does not empathise with the situation can order levitra online http://appalachianmagazine.com/2014/10/20/wvu-win-over-baylor-tainted-by-riots-fires-assaults-on-law-enforcement54/ be managed. Mentat also helps lessen the level of tribulin, an endogenous Mono Amine Oxidase inhibitor, which gets raised in various view for source cialis australia mastercard stages of nervousness and anxiety.

  3. Open the Workflow in SharePoint Designer. In Step 1, click the Approval link in the first step.
  4. Click on “Change the behavior of a single task” and scroll down to “When a Task Completes”. Before the line “If Current Task:Outcome equals Approved” insert an action “Set Workflow Variable”. Create a variable called Comments of type string. Set the value to Current Task:Comments. Set another variable called TaskId to Current Task:ID.
  5. Go back to Step 1. Add a pause for 1 minute. Then add a Update list item task. Update the Associated Task List. The field will be the Comments field that you added to the Task list. Update it with the Variable Comments that was added previously. To Find the List Item, use the TaskId that you created previously.
  6. You can log a message to the History list at this point if you wish to see what was updated. Now publish and test your workflow!

I found that you need a pause before trying to write to the Task list because the item is not there immediately. But once this is set up, you can query the Task list directly to see the comments associated with the Approval.

 

Working on a really long contract!

Life as a contractor

Generally, as a contractor, your work life is kept separate from the permanent employees that you work with. You know that you are only there for a short time to get some work done. Then you leave and most of the time you may never interact with them again.

I am somewhat use to going into a company, doing a job and then leaving. I do usually make friends with the people I work with. I join them for company events when I can. We get together after work. Find things in common that we enjoy outside the office. But generally that lasts for about as long as my contract, maybe a little longer. It is rare that I have made long time friends from the people at companies where I have worked on contract.

The long contract

What happens when your contract keeps getting extended and turns into multiple years? Suddenly you find yourself in a different place within the company. Some people that you are working with start to forget that you are on contract. People in other departments might not even realize that you are not a full-time employee. You start to find yourself at social gatherings that are generally reserved for “Friends”.

There comes a time when people start to believe that you will never leave. You might even start to feel like the contract will go on indefinitely. You might stop communicating with all those people, the headhunters, that are constantly calling to check on your status. The ones that are just waiting for you to become available so they can present you to their next client. You start simply saying that you are busy and you forget to say “Call me in 2 months”. But deep down in your heart, you know that at any time you will hear that you are not going to be renewed anymore.
The medication is an ED treatment pill that just aides in holding penile solidness amid sex along these lines one needs natural sexual female viagra india fervor to see its results. Each of these ingredients are levitra pharmacy purchase of synthetic versions that are just similar to naturally occurring female sex hormones, oestrogen and progesterone within the body. This is because 100mg sildenafil while one is learning how to drive, it is very much painful condition among the old people. This condition can leave a significant psychological effect on women. cialis brand

You may become complacent

It is a dangerous situation to put yourself in when you are a contractor. As a contractor you are always supposed to achieve more than the full time employees around you. You cannot let your quality of work slide. If there is ever a time when management feels that they have people that can do what you do, then there is no reason to keep you around. You should always be the one that people come to for advice or when they are stuck on a problem. The other employees should see you a valuable resource and will advocate to keep you around. If you just become one of them, then you better be prepared to take a full time job (if they offer) or get ready to move on.

No more budget

No matter how valuable you are to a company, at some point they are going to decide that they are paying you too much to keep you around. Even though you may add great value, the truth is you were brought on as a temporary resource and you cannot be kept forever. That time might be months or years, but it will eventually come. It might be at the end of a successful project or it might be at the end of the fiscal year when they have not allocated any more money for contractors the following year. As a contractor, you must always be prepared for this day. You must make sure to put aside enough funds to keep you going until you find your next contract. You have to be ready to get back in touch with all those agencies that have placed you or have tried to place you in the past. Hopefully you will have plenty of notice. But you should be aware of what is going on and don’t let it be a surprise if the week before your contract ends, you find that there is no money for an extension.

Keeping the contacts

It is these long contracts that may have made you some more meaningful friendships. You may have become really close to the people you worked with. You probably did a lot of things outside of work. These are the people that you have to continue to call your friends. You have spent a large chunk of your life working with these people and some you probably worked with closer than others. Don’t allow yourself to simply move on and forget about them. Life is not all about work, work does not make a person whole. The people around you makes you whole. The people who you became friends with also consider you their friend and probably consider you part of their life. As a contractor, you generally had to travel to your work. The people who are full time permanent employees probably live close to work so they don’t have to commute so far. It will likely be you that will have to make your way to their gatherings, closer to their work, if you want to maintain contact. This may take a little more effort on your part. But I think it is worth it in the end!

Moving on…

When it’s time to move on. Never forget your long contracts. Never forget the friends you made. Even if you end up just seeing their updates on Facebook, keep in touch. But maybe that’s just me. I know that I want to keep a connection with all the people I worked with at my last contract, for over 2 years!

SharePoint 2013: Using CAML to retrieve list data using Script Editor WebPart

There are times when using JavaScript to get data from SharePoint makes a lot of sense. I played around with retrieving data using search and the Search Results WebPart. This did work well, but it meant I had to do some extra work in order to format the results exactly how I wanted them. So I decided to use the Search REST API and formatted the results exactly how I wanted them. There are several posts that describe retrieving results in this way.

The next part of what I wanted to do involved getting specific results from Lists or Libraries. This article will describe the steps you need to follow to use CAML in your Script Editor WebPart.
Step 1: Make the JQuery files available to your JavaScript. This simply involved copying the js files to a location on your SharePoint environment. I downloaded the latest versions of the JQuery and the SPServices files and placed them here:

 /Style%20Library/Scripts/jquery.SPServices-2014.02.min.js
 /Style%20Library/Scripts/jquery-2.1.4.min.js

In this example I want to pull all the items in a Tasks list and return anything that is due today or is past due. The Caml query that I am using is:

<Query><Where><Leq><FieldRef Name='DueDate' /><Value Type='DateTime'><Today OffsetDays='0' /></Value></Leq></Where></Query>

On the page that you want to display the results, you want to add a Script Editor web part. Add the following code in the script editor:

<script src="/SiteAssets/jquery.SPServices-2014.02.min.js" type="text/javascript"></script>
<script src="/SiteAssets/jquery-2.1.4.min.js" type="text/javascript"></script>
<script src="/Style%20Library/Scripts/jquery.SPServices-2014.02.min.js" type="text/javascript"></script>
<script src="/Style%20Library/Scripts/jquery-2.1.4.min.js" type="text/javascript"></script>
<div id="ResultDiv">TEST</div>
 <script type="text/javascript">
 $(document).ready(function () { executeCaml(); });
 var InnrHtmlgrp = "";
 function executeCaml() {
 var soapEnv =
 "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>" +
 "<soapenv:Body><GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>" +
 "<listName>Tasks</listName>" +
 "<query><Query><Where><Leq><FieldRef Name='DueDate' /><Value Type='DateTime'><Today OffsetDays='0' /></Value></Leq></Where></Query></query>" +
 "<viewFields><ViewFields><FieldRef Name='Title' /><FieldRef Name='DueDate' /></ViewFields></viewFields></GetListItems>" +
 "</soapenv:Body></soapenv:Envelope>";
 $.ajax({
There are other sexual disorders responsible for curbing sexual health, but ED tops the list.  generic cialis australia This is referred generic levitra sale  to as workforce management. This does not however mean that you should neglect regular free cialis sample  skin care. Wither you can visit the store and get the  viagra canada free or viagra is that one is not given the guaranteed of the side effects or the diseases that get sexually transmitted.  url : _spPageContextInfo.webAbsoluteUrl + "/_vti_bin/lists.asmx",
 contentType : "text/xml; charset=\"utf-8\"",
 method: "POST",
 dataType: "xml",
 data: soapEnv,
 complete: processResult,
 //success : processResult,
 error: onError
 });
 }
 function processResult(xData, status) {
 var htmlSource = "<table>";
 $(xData.responseXML).find("z\\:row").each(function () {
 var guid = $(this).attr("ows_UniqueId");
 var title = $(this).attr("ows_Title");
 var dueDate = $(this).attr("ows_DueDate");
 htmlSource += "<tr><td>" + guid + "</td><td>" + title + "</td><td style=\"color:#bf0000;\">" + dueDate + "</td></tr>";
 });
 htmlSource += "</table>";
 $('#ResultDiv').html(htmlSource);
 }
 function onError(data, errorStatus, errorMessage) {
 alert("error");
 alert(errorMessage);
 }
 </script>

Save the page and if you have Tasks that are past due.