Collaboration and Content

Business productivity through improved communication, collaboration, content, and social

    Building Charts in SharePoint 2013 using JavaScript and REST

    May 7, 2013 9:48 AM by Bart Towery

    In a recent project, we were tasked with building a custom dashboard with different types of charts.  The Chart web part previously available in SharePoint 2010 is no longer available in SharePoint 2013.  Excel Services and PowerPivot are good options, but wouldn’t work on this project due to the need to summarize data from multiple lists.  As a result, we decided to create charts via JavaScript querying the data using REST.

    The completed solution contains a pie chart, a bar chart, and a stacked bar chart.  The final product generates the following dashboard:

    file

    In this post, we will discuss the following:

    • The structure of the data in the SharePoint lists
    • How to Retrieve the Data via REST
    • Selection of a JavaScript Charting Tool
    • Building a Pie Chart in SharePoint 2013 using JavaScript and REST
    • Building a Bar Chart in SharePoint 2013 using JavaScript and REST
    • Building a Stacked Bar Chart in SharePoint 2013 using JavaScript and REST

    Summary of the Lists

    As mentioned above, multiple lists contained the information we needed to summarize.  Our goal is to make a pie chart detailing the number of engagements by type.  For our example, we are going to be aggregating the data from three different lists.

    The first list called Empire Engagements is a list of all engagements of the type Empire.  It contains the title of the engagement as well as the current status and leader of the engagement.

    file

    The second list called Rebel Engagements is a list of all engagements of the type Rebel.  It also contains the title of the engagement as well as the current status and leader of the engagement.

    file

    The final list is called Independent Engagements.  This list contains the title, status, and leader of the engagement just the previous lists, but also contains an Engagement Type column.  The Engagement Type column is a choice column that allows multiple selections.

    file

    Retrieving the Data

    Two options exist for retrieving the data from SharePoint for our project: representational state transfer (REST) and the client-side object model (CSOM).  While CSOM has been around since SharePoint 2010 and is currently better documented around the web, the preferred approach is to use REST as it is a standard that can be understood by multiple technologies.  There are certain tasks that require CSOM as they can’t be performed via REST, but the simple retrieval of items is not one of those tasks.

    Using REST, we can easily query the data from the Empire Engagements list using a simple URL:
    http://sitename/_api/web/lists/getByTitle('Empire%20Engagements')/items?$select=ID,Title,Status

    This returns our data in an XML format that can be read in the browser or through our JavaScript code.

    file

    If we wanted to filter the data to only show items with an Active Status, we can change the URL to:
    http://sitename/_api/web/lists/getByTitle('Empire%20Engagements')/items?$select=ID,Title,Status&$filter=Status eq 'Active'

    To query the data via JavaScript we can use the following code:

    $.ajax({
    url: _spPageContextInfo.webServerRelativeUrl +
    "/_api/web/lists/getByTitle('Empire%20Engagements')/items?$select=ID",
        type: "GET",
        headers: {
            "accept": "application/json;odata=verbose",
        },
        success: function (data) {
            //Manipulate the data
        },
        error: function (err) {
            alert(JSON.stringify(err));
        }
    });
    
    
    


    While querying the data isn’t problematic using the pattern listed above with one list, it quickly becomes unmanageable when multiple sources of data are called. 

    $.ajax({
        url: _spPageContextInfo.webServerRelativeUrl + "/_api/web/lists/getByTitle('Empire%20Engagements')/items?$select=ID",
        type: "GET",
        headers: {
            "accept": "application/json;odata=verbose",
        },
        success: function (data) {
            $.ajax({
                url: _spPageContextInfo.webServerRelativeUrl + "/_api/web/lists/getByTitle('Rebel%20Engagements')/items?$select=ID",
                type: "GET",
                headers: {
                    "accept": "application/json;odata=verbose",
                },
                success: function (data) {
                    //Manipulate the data from both calls
                },
                error: function (err) {
                    alert(JSON.stringify(err));
                }
            });
        },
        error: function (err) {
            alert(JSON.stringify(err));
        }
    });
    

    In cases where we need to gather information from three different lists, each additional $.ajax call would need to be made inside the previous calls success function.  In order to prevent "spaghetti" code, we turn to the concept of promises or deferreds.

    Using jQuery Promises

    In order to implement promises in the JavaScript, we will use jQuery Deferreds.  Using the Deferred object, we can make multiple asynchronous calls to the SharePoint REST API at the same time rather than waiting for each individual call to complete prior starting the next call.  Using deferreds also allows us to create a much cleaner structure in our code.

    "use strict";
    
    $.when(
        //Empire Engagements Query
        Engagements.RESTQuery.execute("Empire%20Engagements", "$select=ID"),
        //Rebel Engagements Query
        Engagements.RESTQuery.execute("Rebel%20Engagements", "$select=ID")
    ).done(
        function (engagements1, engagements2) {
            //Manipulate data
            //engagements1 contains results from Empire Engagements
            //engagements2 contains results from Rebel Engagements
        }
    ).fail(
        function (engagements1, engagements2) {
            //Capture error and display error message
            alert("An error has occurred");
        }
    );
    
    var Engagements = window.Engagements || {};
    
    //Executing a REST query
    Engagements.RESTQuery = function (listTitle, query) {
        var execute = function (listTitle, query) {
            var restUrl = _spPageContextInfo.webServerRelativeUrl +
                "/_api/web/lists/getByTitle('" + listTitle + "')/items";
            if (query != "") {
                restUrl = restUrl + "?" + query;
            }
            var deferred = $.ajax({
                url: restUrl,
                type: "GET",
                headers: {
                    "accept": "application/json;odata=verbose",
                    "X-RequestDigest": $("#__REQUESTDIGEST").val()
                }
            });
    
            return deferred.promise()
        };
    
        return {
            execute: execute
        }
    }();
    

    This code also contains some refactoring through the use of a generic function to retrieve data from lists via REST calls.

    JavaScript Charting Tool

    There are several good JavaScript charting libraries available on the internet.  We decided to use a library called Highcharts because of the look and good documentation.  Their website is http://www.highcharts.com/.  This sample uses the highcharts.js and exporting.js libraries.

    Loading the Charts on the Page

    Although there are several different ways to add the JavaScript and HTML needed for the charts, we took the simplistic approach of adding to a page via the Script Editor web part (under the Media and Content category).  All of the common JavaScript files are added via one web part and the HTML and JavaScript to create each chart is contained within its own web part.  All of the JavaScript files are uploaded to the SiteAssets library.

    Building a Pie Chart in SharePoint 2013 using JavaScript and REST

    Now we will discuss the creation of the pie chart within our dashboard solution. 

    Retrieving Data

    As mentioned above, we are using jQuery promises using the when, done, fail pattern to retrieve our data via REST.  We are querying data from the Independent Engagements list, the Rebel Engagements list, and the Empire Engagements list.  The data is returned respectively into the engagements1, engagements2, and engagements3 variables.

    To build the pie chart, we need our data as an array of names and counts such as the following:

           [["Rebel", 3], ["Empire", 4], ["Independent", 1]]

    We will store these values in the countArray variable.

    Retrieving the data from the Rebel Engagements and Empire Engagements lists is easy, we simply need to count the number of results retrieved.  The following lines of code take the counts and put them into the countArray.

    //Add count of Rebel Engagements list
        countArray.push(["Rebel", engagements2[0].d.results.length]);
        //Add count of Empire Engagements list
        countArray.push(["Empire", engagements3[0].d.results.length]);
    


    Retrieving the data from the Independent Engagements lists is a little more difficult as we need to determine which category (or categories) the list item is assigned to.  To temporarily hold the data, we place the data into a temporary data array called dataArray.  This will simply be an array of all of the values, we are not worrying about counts at this point.

       var results = engagements1[0].d.results;
       for (var i = 0; i < results.length; i++) {
           var engagementType = results[i].Engagement_x0020_Type.results;
           for (var j = 0; j < engagementType.length; j++) {
               dataArray.push(engagementType[j]);
           }
       }
    


    With the code, we are looping through each of the list items in the for loop using the i counter variable.  The value in the Engagement Type column can be retrieved through the following code:

    results[i].Engagement_x0020_Type
    

    This works perfectly for single choice or single value items, but in our case, we are using a choice column that allows multiple values.  This information is returned as an array of data.  In order to retrieve each selected choice, we must loop through the values.  This is done in the for loop using the j counter variable.

    Now that we have all of the selected values, we need to determine a count for each of the engagement types and merge it with the countArray where we stored our counts from the Rebel Engagements list and the Empire Engagements list.  The following code includes these counts into the countArray variable:

        if (countArray == undefined) {
            countArray = [];
        }
    
        for (var i = 0; i < dataArray.length; i++) {
            var currValue = dataArray[i];
            var found = false;
            for (var j = 0; j < countArray.length; j++) {
                if (countArray[j][0] == currValue) {
                    found = true;
                    var newCount = countArray[j][1];
                    countArray[j][1] = newCount + 1;
                }
            }
            if (!found) {
                countArray.push([currValue, 1]);
            }
        }
        if (countArray == undefined) {
            countArray = [];
        }
    
        for (var i = 0; i < dataArray.length; i++) {
            var currValue = dataArray[i];
            var found = false;
            for (var j = 0; j < countArray.length; j++) {
                if (countArray[j][0] == currValue) {
                    found = true;
                    var newCount = countArray[j][1];
                    countArray[j][1] = newCount + 1;
                }
            }
            if (!found) {
                countArray.push([currValue, 1]);
            }
        }
    

    Creating the Chart

    Now that we have the data in the format we need, we can create the chart.  The chart will display in the engagementPieChart div on our page.

    $('#engagementPieChart').highcharts({
           chart: {
                plotBackgroundColor: null,
                plotBorderWidth: null,
                plotShadow: false
           },
           credits: {
                enabled: false
           },
           title: {
                text: 'Engagements'
           },
           tooltip: {
                pointFormat: '{series.name}: <b>{point.y}</b>',
                percentageDecimals: 0
           },
           plotOptions: {
                pie: {
                   allowPointSelect: true,
                   cursor: 'pointer',
                   dataLabels: {
                       enabled: false
                   },
                   showInLegend: true
                }
           },
           series: [{
               type: 'pie',
               name: 'Engagements',
               data: countArray
            }]
        });
    

    Building a Bar Chart in SharePoint 2013 using JavaScript and REST

    Next we will discuss the creation of the bar chart within our dashboard solution. 

    Retrieving Data

    We are using jQuery promises using the when, done, fail pattern to retrieve our data via REST.  We are querying data from the Rebel Engagements list and the Empire Engagements list.  The data is returned respectively into the engagements1 and engagements2 variables.

    To build the bar chart, we need our data separated into 2 arrays with the category name and the corresponding count in the same position within each array such as the following:

           ["Luke Skywalker", "Darth Vader", "Yoda", "Princess Leia"]
           [2, 4, 1, 1]

    To temporarily hold the data from the Rebel Engagements and Empire Engagements lists, we place the data into a temporary data array called dataArray.  This will simply be an array of all of the values, not worrying about counts at this point.

    //Get data from Rebel Engagements list
        var results = engagements1[0].d.results;
        for (var i = 0; i < results.length; i++) {
            var leader = results[i].Leader;
            dataArray.push(leader);
        }
        //Get data from Empire Engagements list
        var results = engagements2[0].d.results;
        for (var i = 0; i < results.length; i++) {
            var leader = results[i].Leader;
            dataArray.push(leader);
        }
    


    With the code, we are looping through each of the list items in the for loop using the i counter variable.  The value in the Leader column can be retrieved through the following code:

    results[i].Leader
    


    Keep in mind that the above code only works for single choice or single value items.  We discussed the handling of choice fields with multiple values in the previous article of this series.

    Now that we have all of the selected values, we need to summarize the data into leaders and counts.  The following code includes these counts into the countArray variable:

    if (countArray == undefined) {
            countArray = [];
        }
    
        for (var i = 0; i < dataArray.length; i++) {
            var currValue = dataArray[i];
            var found = false;
            for (var j = 0; j < countArray.length; j++) {
                if (countArray[j][0] == currValue) {
                    found = true;
                    var newCount = countArray[j][1];
                    countArray[j][1] = newCount + 1;
                }
            }
            if (!found) {
                countArray.push([currValue, 1]);
            }
        }
        if (countArray == undefined) {
            countArray = [];
        }
    
        for (var i = 0; i < dataArray.length; i++) {
            var currValue = dataArray[i];
            var found = false;
            for (var j = 0; j < countArray.length; j++) {
                if (countArray[j][0] == currValue) {
                    found = true;
                    var newCount = countArray[j][1];
                    countArray[j][1] = newCount + 1;
                }
            }
            if (!found) {
                countArray.push([currValue, 1]);
            }
        }
    


    Now we need to separate the data into the two separate arrays with category name in one array and corresponding counts in the other as mentioned above.  This is done with the following code:

    var seriesData = [];
        var xCategories = [];
        for (var i = 0; i < countArray.length; i++) {
            xCategories.push(countArray[i][0]);
            seriesData.push(countArray[i][1]);
        }
    

    The categories are now in the xCategories array and the counts are in the seriesData array.

    Creating the Chart

    Now that we have the data in the format we need, we can create the chart.  The chart will display in the engagementsByLeaderChart div on our page.

    $('#engagementsByLeaderChart').highcharts({
            chart: {
                type: 'bar'
            },
            credits: {
                enabled: false
            },
            title: {
                text: chartTitle
            },
            xAxis: {
                categories: xCategories
            },
                yAxis: {
                min: 0,
                title: {
                    text: yAxisTitle
                }
            },
            legend: {
                enabled: false
            },
            plotOptions: {
                bar: {
                    dataLabels: {
                       enabled: false
                    }
                },
                series: {
                    animation: false
                }
            },
            series: [{
                name: yAxisTitle,
                data: seriesData
            }]
        });
    

    Building a Stacked Bar Chart in SharePoint 2013 using JavaScript and REST

    Finally we will discuss the creation of the stacked bar chart within our dashboard solution. 

    Retrieving and Manipulating Data

    As mentioned in the previous sections, we are using jQuery promises using the when, done, fail pattern to retrieve our data via REST.  We are querying data from the Rebel Engagements list and the Empire Engagements list.  The data is returned respectively into the engagements1 and engagements2 variables.

    To build the stacked bar chart, we need our data separated into a complex structure of objects and arrays such as the following:

           ["Luke Skywalker", "Princess Leia", "Yoda", "Darth Vader"]
           [{"Completed", [1, 0, 0, 1]},{"Active", [1, 1, 1, 2]},{"Pipeline", [0, 0, 0, 1]}]

    The first array holds the leaders' names or categories which will be displayed on the y-axis.  The second array contains the status value (Pipeline, Active, Completed) within our chart along with an array containing the values corresponding to the leader names.

    In order to hold the data we will retrieve, we create a function that contains the leader name, status, and count.

    EngagementChartBuilder.StatusByLeader = function (name, status, count) {
        var leaderName = name,
            statusName = status,
            statusCount = count
    
        return {
            leaderName: name,
            statusName: statusName,
            statusCount: statusCount
        }
    }
    


    Then we retrieve the data and place it into an array incrementing the counts when both the leader and status are matched.

    //Get results from Rebel Engagements
        var results = engagements1[0].d.results;
        for (var i = 0; i < results.length; i++) {
            var found = false;
            for (var j = 0; j < data.length; j++) {
                if (data[j].leaderName == results[i].Leader &&
                    data[j].statusName == results[i].Status) {
                    data[j].statusCount = data[j].statusCount + 1;
                    found = true;
                }
            }
            if (!found) {
                data.push(new EngagementChartBuilder.StatusByLeader(results[i].Leader,
                         results[i].Status, 1));
            }
        }
        //Get results from Empire Engagements Engagements
        var results = engagements2[0].d.results;
        for (var i = 0; i < results.length; i++) {
            var found = false;
            for (var j = 0; j < data.length; j++) {
                if (data[j].leaderName == results[i].Leader &&
                    data[j].statusName == results[i].Status) {
                    data[j].statusCount = data[j].statusCount + 1;
                    found = true;
                }
            }
            if (!found) {
                data.push(new EngagementChartBuilder.StatusByLeader(results[i].Leader,
                         results[i].Status, 1));
            }
        }
    

    Now we have the data in the following format:

    [{"Luke Skywalker", "Active", 1}, {"Luke Skywalker", "Completed", 1},
    {"Darth Vader", "Active", 2}, {"Darth Vader", "Pipeline", 1}, …]

    Next we separate out the categories (i.e. the leader names) into the xCategories array and the status values into the xStatus array:

    //Get Categories (Leader Name)
        for (i = 0; i < data.length; i++) {
            cat = data[i].leaderName;
            if (xCategories.indexOf(cat) === -1) {
                xCategories[xCategories.length] = cat;
            }
        }
        //Get Status values
        for (i = 0; i < data.length; i++) {
            stat = data[i].statusName;
            if (xStatus.indexOf(stat) === -1) {
                xStatus[xStatus.length] = stat;
            }
        }
    


    Then, in order to have a place to update the counts, we create the complex structure of objects and arrays needed for the stacked bar chart.  As a start, we are creating all of the counts as zero so we just have a placeholder for each value.

    //Create initial series data with 0 values
        for (i = 0; i < xStatus.length; i++) {
            var dataArray = [];
            for (j = 0; j < xCategories.length; j++) {
                dataArray.push(0);
            }
            seriesData.push({ name: xStatus[i], data: dataArray });
        }
    


    As the final step of manipulating the data, we loop through all possible combinations of leaders and status values while counting up matching records in our data retrieved from the REST calls.  This data goes into our seriesData array.

    //Cycle through data to assign counts to the proper location in the series data
        for (i = 0; i < data.length; i++) {
            var leaderIndex = xCategories.indexOf(data[i].leaderName);
            for (j = 0; j < seriesData.length; j++){
                if (seriesData[j].name == data[i].statusName){
                    seriesData[j].data[leaderIndex] = data[i].statusCount;
                    break;
                }
            }
        }
    

    Creating the Chart

    Now that we have the data in the format we need, we can create the chart.  The chart will display in the engagementsByStatusChart div on our page.

    $('#engagementsByStatusChart').highcharts({
            chart: {
                type: 'bar'
            },
            colors: ['#339933', '#903b3b', '#583596', '#447088', '#5a7952', '#838843'],
            credits: {
                enabled: false
            },
            title: {
                text: 'Engagements by Status'
            },
            xAxis: {
                categories: xCategories
            },
            yAxis: {
                min: 0,
                title: {
                    text: 'Total Engagements'
                }
            },
            legend: {
                backgroundColor: '#FFFFFF',
                reversed: true
            },
            plotOptions: {
                series: {
                    animation: false,
                    stacking: 'normal'
                }
            },
            series: seriesData
        });
    

    For more details on the parameters and options used to create the chart, please look at the Highcharts API reference at http://api.highcharts.com/highcharts.

    Conclusion

    This blog post has described how to build a dashboard in SharePoint 2013 using JavaScript and REST.  We have included a pie chart, a bar chart, and stacked bar chart.  The full source is available at Github https://github.com/CardinalNow/ChartsInSharePoint2013

    Manage the Work Day Through Office 365

    April 11, 2013 8:22 AM by Cory Williams

    Have you ever missed a deadline or forgotten about a task because your tasks reside in multiple locations? Have you wished for a better way to share one version of a document with those outside of your organization without having to rely on email? Do you feel like you could improve your productivity if you just had the right tool to do so?

    Microsoft has been pushing the cloud for a couple of years now and recently released an updated version of Office 365. The key improvements I want to point out have to do with SharePoint Online, Exchange Online, and Lync Online.

    Managing Tasks

    SharePoint Online includes a site type known as a MySite. This capability existed in SharePoint 2007 and SharePoint 2010 as well, but has been drastically improved. A new feature called Work Management is now included with the product and essentially aggregates all of your tasks into one location. When I say all of your tasks, I am referring to tasks that exist in Outlook, SharePoint Task lists, and even Project Online Projects. This functionality allows you to organize your tasks in the one location, mark tasks as important, add them to a personal timeline, and modify the task details all from this site. 

    file



    You can also view these tasks in the Outlook Web App as well as below.

    file

    Working with Documents

    New to SharePoint is SkyDrive Pro. This replaces the Shared Documents and Personal Documents libraries that existed in previous versions of the SharePoint MySites. Similar to the task aggregation capability, SkyDrive aggregates the most recent documents you have worked with, any documents you have chosen to follow, and documents that have been shared with you. All new versions of SharePoint include the ability to drag and drop documents into SharePoint.

    Other capabilities that come with some of the online plans are improvements to the Office Web Apps, which provides greater capability to view and edit documents in the browser. A new feature called Office on Demand allows you to run a full version of software (Excel, PowerPoint, Word, etc.) on any Microsoft computer without actually installing it, making it easier to work with the documents you need while you are on the go.

    file

    A mobile app is in the works for iOS and Windows 8. This functionality is already available in the Windows Phone Office Hub. See here for more information on these apps.

    SkyDrive Pro in SharePoint Online provides more functionality than the on-premise version of SharePoint. For starters it comes with 7GB of storage per user. Most organizations would probably hesitate at giving users that much storage space with on-premise installations, as it could have significant cost implications per user. The biggest feature that comes with the cloud version is the ability to share documents with users outside of the organization. These users do not require licenses.  

    An employee can simply click on the lock icon for the file they want to share in the SkyDrive to open up a sharing invitation. Here they can type any email address and select if the user will be allowed to edit or view only. If 'Require sign-in' is selected the user invited will need to use a Windows Live account or create a new one to gain access. Otherwise the link can be shared anonymously. This will now enable us to work with one version of the document in a common location. Those external users will have the ability to view and edit the document in the browser if they do not have the office software.

    file


    When an external user is invited to share the document, they receive an email similar to the one below.

    file

    Sharing externally is a configurable option. Administrators can disable this at an enterprise level.

    Communication

    Messaging systems have been proliferating across organizations and have greatly improved productivity over the past few years from an internal standpoint. With Lync Online we can add users from across other messaging platforms; this includes people in other organizations that use Lync, Windows Live, and Windows Live Messenger. Lync presence shows up almost everywhere inside Microsoft products with its tight integration with Office 2013, SharePoint Online, and Exchange Online. How cool would it be to open up a word document to make some changes and see that someone else is already there making changes? You can instantly communicate with the user from the office applications to discover what they are doing.

    Lync doesn't stop there. It also includes web conferencing, HD video, PC to PC calling. It also gives you the ability to join meetings directly from your smartphone.

    Outlook web access now includes a connector for LinkedIn giving you the ability to pull in all of your contacts for quick access.

    file

    SharePoint Online has also introduced more comprehensive Enterprise Social features that also allow for enhanced communication. For more information, see our Communities in SharePoint 2013 post to learn about the Communities aspect. Microsoft has recently released a SharePoint Newsfeed app for viewing the social features in 2013 allowing you to always keep up to date on the go.

    There is always more…

    The services are all great to get started in the cloud and with the new release you have the ability to add apps from the Microsoft Online stores for SharePoint, Outlook, Word, Excel, and Project, or you can create your own.

    In addition to SharePoint Online, Exchange Online, and Lync Online additional services are available in Office 365 including:

    • Office Professional Plus
    • Visio Professional
    • Project Online
    • Project Online with Project Professional
    • Exchange Online Protection
    • Azure Active Directory Rights Management
    • Exchange Online Archiving
    • Microsoft Dynamics CRM Online

    We recommend the Office 365 E3 plan for organizations. Visit Microsoft's site for more details.

    It is worth noting that a lot of the functionality discussed in this post works with the On-Premise versions of the software. The one exception is sharing content externally from SkyDrive Pro, this is only available in SharePoint Online at this time.

    Ways to Brand SharePoint 2013 Sites

    April 4, 2013 7:25 AM by Bart Towery

    With the release of SharePoint 2013, there are several different ways to brand your SharePoint 2013 site. The goal of this post is to discuss the options available, what skills are necessary to make the change, and what the level of difficulty is for the change.

    The easiest way to change the look and feel of a site is by going to the Change the look link on the Site Settings page or by selecting the Settings gear and selecting Change the look.  This gives you a display of all created Composed Looks in the site collection. About 40 Composed Looks are available out of the box.

    file

    Once a starting point is selected, easy customizations can be made by changing the background image, the basic colors of the site, the site layout (i.e. the master page), and the fonts used by the site.

    file

    While this allows a quick change of the site look, there are several additional ways to perform real-world branding within SharePoint 2013.

    Composed Looks

    Composed Looks is a new feature of SharePoint 2013. Each Composed Look contains a link to a master page URL, theme URL, background image URL, and a font scheme URL. A considerable amount of branding changes can be made by reusing out of the box master pages, themes, and font schemes to create a new Composed Look. Creating a Composed Look based on pre-existing assets is not a difficult task and could easily be done by a power user or site collection administrator. As each of the pieces that make up a Composed Look can be customized, there are endless possibilities.  Next we will discuss each of these pieces.

    file

    Create Custom Themes

    Themes are greatly improved in SharePoint 2013.  Themes as they are defined within the Composed Look are nothing more than a color palette.   This color palette is nothing more than an XML file with a .spcolor extension.  It contains 89 color slots with names such as BodyText, SuiteBarBackground, and SelectionBackground.  Opacity is also supported on each color.  Microsoft mentioned the release of an upcoming Theme Slots tool to help with the creation of color palettes at SharePoint Conference 2012 in November, but it still hasn't been released as of this writing.  The color palettes can easily be created by a designer or power user.

    file

    Custom Font Schemes

    Custom font schemes are another new feature of SharePoint 2013. The font scheme is also an XML file with a .spfont extension. There are 7 font slots with names such as title, navigation, and small-heading.  Web fonts are now supported within font schemes by including four web font files (EOT, WOFF, TTF, and SVG) along with large and small preview images.  Font schemes can also easily be created by a designer or power user.

    file

    Custom Master Pages

    Creating custom master pages is clearly the most difficult and time consuming method of branding a SharePoint 2013 site.  There are two ways to create a custom master page and accompanying css style sheet file: Design Manager and through Visual Studio or SharePoint Designer.

    Custom Master Pages with Design Manager

    Design Manager is only available in publishing site or sites where the publishing features have been activated.  Branding for regular collaboration or team sites would require the development of master pages within Visual Studio or SharePoint Designer.

    Design Manager walks through a seven step process that allows for the creation of master pages and page layouts. 

    file

    For master page creation, HTML and CSS design files can be uploaded to SharePoint.  Design Manager converts the design files to a SharePoint master page.  The Snippet Gallery (shown below) can be used to add SharePoint components to the master page such as Top Navigation, a search box, or the site title.  When the design file is converted into a master page, these snippets are converted to the proper control with properties set as requested on the master page.

    file

    While it is much easier to create master pages and page layouts via the Design Manager as opposed to using Visual Studio and SharePoint Designer, it is not something that a typical designer can undertake despite the fact Microsoft says so.  A considerable amount of SharePoint knowledge is needed to properly create a master page.

    Custom Master Pages with Visual Studio or SharePoint Designer

    Creating custom master pages with Visual Studio or SharePoint Designer hasn't changed much from SharePoint 2010. Creating custom master pages in this manner requires a SharePoint developer skilled in HTML and CSS with a considerable knowledge of SharePoint components and styles. Creating a custom master page is one of the more complex tasks within SharePoint development. By investigating what is produced when snippets are converted into master pages, it is much easier to determine what components to add to a custom master page.  One additional item to consider when building a custom CSS style sheet file to work with a custom master page is whether to make it Themable.  A Themable style sheet allows the CSS to be overridden by theme color changes and font changes.  Any style sheets outside of the Themable folder in the Style Library will not themed.

    Conclusion

    SharePoint 2013 brings many options for customizing the look and feel of a SharePoint site.  These options range from the relatively simple menu option Change the look and using Composed Looks to the more complex solution of generating custom master pages through Visual Studio or SharePoint Designer.  The easier solutions offer the least ability of customization while the more difficult solutions offer the largest ability of customization.

    Development Changes With SharePoint 2013

    December 3, 2012 4:13 PM by Bart Towery

    At the recent SharePoint 2012 conference, I was able to gain more insight about changes and new capabilities in SharePoint 2013 from a developer perspective.

    Design Manager and Theme Roller

    Microsoft is very vocal about a new tool for branding SharePoint sites called Design Manager.  The Microsoft story behind the Design Manager is that a designer can take HTML, CSS, and other assets created in any web editing tool (including Dreamweaver) and import into SharePoint.  Then, the designer can add snippets of code that Design Manager translates into SharePoint components such as the search box, navigation menu, etc.  While it is definitely an improvement, it is still complex enough that I feel it will be too difficult for most designers.  Plus, Design Manager can only be used on sites with Publishing activated.  This means that branding for team sites must still be done via custom master pages and CSS.

    Retrieving Snippets via the Design Manager

    file

    The Theme Roller is greatly improved in 2013 over the Themes functionality in 2010.  Changing background images and using web fonts are now available.  However, I have never worked with any company that wanted to create their own themes and most companies actually want to prevent their users from using themes.  The Theme Slot Tool, coming soon from Microsoft, is a tool that will allow you to start with a color, have SharePoint auto generate colors for the SharePoint elements (e.g. font colors, background colors, button colors, etc.), then be able to preview and tweak those colors.

    Theme Slots Tool

    file

    Between using what is generated from the snippets via Design Manager and the Theme Slot Tool, it should be much easier for those of us creating custom master pages and CSS.

    Design Templates

    List views and list forms (both edit and view forms) will be customizable via Design Templates.  The design templates are created using JavaScript files that are attached to the web part via the JSLink property replacing the old XSLT functionality.  The possibilities of this client-side rendering functionality are limitless with functionality such as displaying list item attachment images, changing background colors, and changing fonts.

    Search Based Design

    Search is another huge focus for Microsoft.  The Content Search web part is a new addition that everyone will come to love (the Content Query web part is no longer available).  The Content Search web part allows the setting of a query and customized display of results across site collections and web applications.  Custom search results pages can also be created. An example custom search results page would be a page that displays the sites or site collections a person is allowed to view or edit.

    Note: FAST no longer exists as a separate product.

    App Model

    The App Model is Microsoft's preferred method of development for SharePoint 2013.  App Model applications are entirely client-side based and are submitted to an app store.  This app store may be Microsoft's app store or an internally run corporate store.  Applications properly created via the app model could be used on both an on premise and SharePoint online.

    JavaScript, JavaScript, JavaScript

    One thing I heard over and over at the SharePoint Conference - if you want to customize something, you do it in JavaScript.  JavaScript and jQuery knowledge are now required for SharePoint developers.  If you are rusty, only know enough to barely get by (like me), or don’t know Javascript and jQuery, I recommend that you start learning now.

    Developing SharePoint Talent

    Finally, I should mention the talent problem that SharePoint has faced. SharePoint deployments have been held back by organizations not being able to find enough qualified SharePoint developers. This has been a global issue as I understand it -   no one is finding enough SharePoint developers.  Often, in my experience, many .NET developers seem to think that SharePoint developers are second class developers.  I think much of it relates to a fear of the unknown.  Certainly with SharePoint's inclusion of more commonly used web standards such as REST, JSON, JavaScript, and jQuery, I think that more .NET developers will reconsider their stance on SharePoint development.  The increase in use of JavaScript and jQuery should also increase the potential number of people that could succeed as SharePoint developers (not that knowledgeable JavaScript developers are any easier to find).  Of course, the differentiation between good and great SharePoint developers is how well the developer knows the existing functionality of SharePoint and how to best extend that functionality.

    Licensing Changes with SharePoint 2013

    December 3, 2012 4:11 PM by Bart Towery

    Many companies deploying SharePoint globally struggle with whether to buy the Standard or Enterprise license. Although SharePoint takes advantage of User CALs (Client Access Licenses), previous versions required an entire organization to either have the enterprise CAL or the standard CAL (all or nothing). One area that this impacted, for example, was Business Intelligence. Frequently, departmental solutions looked to take advantage of the powerful Team BI capabilities provided out of the box; but these small solutions did not necessarily "tip the scales" for the entire organization to move from standard licensing to enterprise licensing.

    Starting with SharePoint 2013, Microsoft is providing the ability to mix and match license types (i.e. Standard, Enterprise, Project, and Office Web App Edit licenses) within the same site collection.  Using PowerShell, people in various AD groups can be assigned to the different license types.  This changes the functionality that different users see within a site.  Changes can even be made on the fly (i.e. without logging out and back in).  For example, a user with an Office Web App Edit license would see a link to edit within Office Web Apps where a user without a license would not see the link.

    This change would allow a company to start with Standard, then have Enterprise license upgrades approved on a user by user basis through approved projects. It also enables the departmental BI solution.

    Another note on licensing… It seems that at least one additional server will be required in most Enterprise farms for Distributed Caching. Office Web Apps will need to be on its own server outside of the SharePoint farm.

    At the 2012 SharePoint Conference, Microsoft also announced licensing around the social Yammer product. Microsoft is clearly pushing to move more and more customers to the cloud, which is evidenced by the fact that enterprise Yammer licensing will be included in the existing Office 365 E1 plan (at no additional cost).  For on-premise customers, enterprise Yammer licensing will cost $3/user/month. 

    Search in SharePoint 2013

    November 19, 2012 2:00 PM by Cory Williams

    We consume more and more information every day. We work with documents, interact with colleagues, and review reports. As the quantity of information continues to explode, the ability to quickly search and locate relevant information becomes more and more critical to the user. Despite its popularity and dominance as a corporate intranet and collaboration solution, previous versions of SharePoint left a lot to be desired with respect to Search. Users frequently waded through pages and pages of results, and still struggled to find the most relevant information. Some organizations purchased FAST Search or custom search applications to offset some of these limitations, but this required significant effort and cost. The good news is SharePoint 2013 provides significant enhancements to Search out-of-the-box, which we will highlight in this post. Please note: The Office 365 / SharePoint 2013 Preview is a beta product. Items discussed in this post are subject to change when the final product is released.

    Enhancements:

    1. Improvements to refinements and search navigation
    2. Visual results with item preview
    3. Search hints
    4. Search availability
    5. Search administration

    file

    Improvements to refinements and search navigation

    Search refiners have been vastly improved since 2007 and while 2010 was a step in the right direction, you still needed FAST search to get full functionality. Since FAST search has now become 2013 enterprise search we now have a deeper level of refinement out of the box. These refiners are easily configurable to be expanded or limited as needed. Users can now work with graphical representations of these refiners as well as through dates created or modified, or by monetary values for example. You can equate this to searching sites like Best Buy.

    The search results page gives you five scopes/sources by default, Everything, People, Conversations, Videos, and Reports; this is known as the Search Navigation. Why is this powerful? Let's say you need to research more on the term, SharePoint. You enter SharePoint in your site's home page search to look through everything and get taken to the results page showing the most popular content. You can quickly move through the search navigation to see what people, conversations, videos, and reports pertain to SharePoint as well. This enables the ability to quickly find information throughout your organization giving you greater insight to your research.

    Visual results with item preview

    This is one of the biggest areas of improvement for end users - item preview capability. In previous versions of search, this type of capability required FAST search, third party add-ons, or custom development. Visual previews are available, at this time, for Microsoft Word, Excel, PowerPoint, images, and video.

    file

    Users can scroll through their documents by rolling over the results. They can see the number of times the document has been viewed in the top right corner. For word documents, users can quickly jump to sections with headers through the "Take a look inside" section of the preview. For excel, scroll through the named areas such as charts and graphs. For PowerPoint, click through the slides.  

    file

    Other options available from the office document previews can be:

    • Download a copy
    • Print to PDF
    • Copy embed code (so you can place this on any SharePoint page)
    • View in Full Screen
    • Follow Document
    • Edit Document
    • View Library that document resides in
    • Send to others

    Search results for communities are another example of the preview. These show the amount of members, discussions, and replies occurring in the community. From these results users can see the popular discussions and have the opportunity to visit the community or choose to follow the community directly from the results views.

    file

    These item previews are essentially HTML templates. The templates are customizable by administrators for all types of information.

    Search Preferences

    Search is more focused on the user. Users can select their owner search preferences to improve their experience. Some of the settings available have to do with search suggestions. Users have the option to show system generated search suggestions, but can choose to go one step further by choosing to be shown suggestions and favorites based on their personal query history. What this essentially means is that if a user works in HR and types in the word policy, the results given to them will come from the HR department first instead of policies regarding the compliance department. It may also show them documents that they have searched for before even as they are typing in the new search query. Other options in the preferences include choosing when they want to clear their history, managing any alerts they may have set up for search results, and managing the language with which they want to use search. Language is based on configuration for on-premise but is available immediately in SharePoint Online.

    Search availability

    There are two aspects that can fall into search availability. The first is what is called "Continuous Availability", this means that as soon as a document or item is added to SharePoint it will immediately appear in any search queries before it has been entirely indexed. This is very important in order to support the second factor which is that a lot of new web parts and functionality rely on search.

    There is a new web part called "Content by Search". This web part can be seen as replacing the "Content by Query" web part. Essentially this web part can pull back any type of content across the SharePoint environment or other external environments. The new My Sites landing page is essentially made up of this web part, as is the Community Portal, and other areas throughout.

    Search functions also exist for lists and libraries. Instead of using the site search box to search across a site, you can use a search box that is now a part of the list/library web part. This really helps the user find information more efficiently.

    file

    Another option that is useful for document libraries is driven by search as well. This feature is called Most Popular Items. It is available from the toolbar and exposes the results types below. This will show users what is used most in the library and can help users clean up content that is no longer relevant.

    file

    Search administration

    With search becoming so integral to the SharePoint environment, it is crucial for administrators to thoroughly plan and scale for search functionality. Configuring SharePoint search results pages is much easier; setting refiners to pick and choose with a click of a button and the preview templates are all html based. However there are many advanced capabilities available that once only existed in FAST search and as such require more experience with search based tools. SharePoint can still crawl across many different environments, Exchange, Network Drives, Remote SharePoint sites with ease, and can also access any other search engines that use the OpenSearch 1.0 Protocol.

    Other areas of importance to IT administrators for search configuration are:

    • Search is used throughout the platform for all sorts of content delivery. This is done through the new web part called Content by Search which offers a lot more capabilities than the Content Query web part.
    • High Scalability: Support more content.
    • Contiunous Availability. Results appear within a couple of minutes and in some cases almost instantly.
    • Site administrators are in control of their result sources (previously content sources).
    • Custom Ranking Model
    • Query Suggestions
    • Query Rules
    • Schema management
    • Entity Extraction

    For more on SharePoint 2013 search see this TechNet article: http://technet.microsoft.com/en-us/library/cc263400(v=office.15)

    Communities in SharePoint 2013

    August 9, 2012 9:34 AM by Cory Williams

    As was much anticipated, Microsoft baked more social features into the upcoming release, specifically around communities. Although the SharePoint 2010 feature wheel listed Communities as one component, it left a lot to be desired. In SharePoint 2013, many of the feature gaps have been addressed, which we detail in this post.

    Please note: The Office 365 / SharePoint 2013 Preview is a beta product. Items discussed in this post are subject to change when the final product is released.

    Communities
    Microsoft defines a community as "a place where community members discuss topics of common interest. Members can browse and discover relevant content by exploring categories, sorting discussions by popularity, or by viewing only posts that have a best reply. Members gain reputation points by participating in the community, such as starting discussions and replying to them, liking posts and specifying best replies."

    So this immediately hinted to me that the discussion boards have been completely rebuilt - a community is basically a community forum. The discussion board acts as the Activity Stream / Newsfeed for aggregating all activity occurring within a specific community.

    The out of the box site template for a Community Site is shown below. I will highlight some of the main components around Categories, Members, and Featured Discussions. Also note that you do not need to use the community template to use community features. There is a feature in the site features that can be activated to add all of the same community features to existing sites.

    comm_site

    Categories
    Categories help organize the community discussion board. Each category list item has a name, description, and picture. The list keeps track of the amount of discussions and replies for a quick review of active discussions. Note: each discussion can only have one category associated with it.

    categories

    The categories page also has a nice visual representation (tile view) of all categories. Hovering over a category will tell you the stats and description for that category. It can be sorted in ascending or descending order. The "What’s hot" sort option shows the most active discussions to help users get to the most popular discussions.

    categories2

    Members and Gamification
    If a user joined the community or was invited to it they will show up on the members page. This page can be sorted by Top contributors, New members, A-Z or Z-A. The page displays the amount of discussions started, amount of replies by the users, and if they had any replies marked as the best. If a user is a member of this site they will see their information to the right. Users can also choose to leave the community from this page.

    members

    Reputation is a nice new feature in my opinion, and addresses some missing gamification features of 2010. Reputation helps identify experts within an organization, helps an individual assess their potential value to a community, and encourages end user adoption / participation. As shown above, the member has a reputation score as well as a metric indicating points required to move to the next level.

    There are a few configuration settings when it comes to community reputation. You can configure whether discussions may be rated, and if so, how you would like them rated.

    ratings

    It is important to note that member achievements can be disabled. The member achievements can have specific values to help improve member reputations. If you think a community will be wildly popular, and you have lots of users I would recommend you go with lower values or increase the points required to reach the different achievement levels.

    pointsachievements

    Badges are another gamification tool, and have become main-stream in social communities. Users may receive system-awarded badges which are gained by achieving specific reputation points, or users may manually grant badges to other users (such as a Kudos badge). The gifted badges are text only in the preview, hopefully this will be updated in the final release to allow for images.

    badges

    Featured Discussions
    Discussions have a couple of extra actions that can be applied to them which aid in establishing a knowledge base for a particular community. A discussion can be marked as a question when it is created. If someone provides the best answer, the reply can be marked as a best reply. Users can also "like" replies. A discussion can also be marked as a featured discussion. The manage discussions list includes an aggregated "Like" count, and the amount of replies for the discussion.

    discussions

    Community Portal
    An out of the box Community Portal site template has been provided. The Community Portal is defined by Microsoft as "a site for discovering communities". This site collection is basically a page with a search web part configured to search for community sites. If you are going to have communities I highly suggest creating this site since it will appear as a tile on the default Sites page when you click on Sites in the global navigation.

    comm_portal

    Community Settings
    Each community comes with an About page, which should be used to give a brief description of the community and to set some rules or guidelines for use.

    comm_about

    Also available are three other settings: established date, auto-approval for permission requests, and reporting of offensive content. When offense content is reported, the content is removed from view. Administrators then have the option to permanently delete or reinstate the content.

    comm_settings

    As you can see, Microsoft has added a decent amount of social features to communities in SharePoint 2013, which should help greatly increase enterprise collaboration. Again, this is still early preview and is subject to change, but the community features represent a step in the right direction.

    Considerations for Migrating to SharePoint Online

    July 23, 2012 4:25 PM by Cory Williams

    SharePoint Online has been around for a while, first in Microsoft’s BPOS offering and now with Office 365. Office 365 brings major enhancements to SharePoint Online that have a lot of organizations jumping on the bandwagon. At the 2012 Microsoft Worldwide Partner Conference (WPC) Microsoft’s COO, Kevin Turner, stated "The fastest growing product in Microsoft will likely be Office 365 next year."  This revelation is amazing news to hear.

    Prior to moving to SharePoint Online there are a lot of things you will need to consider. Note: there are two levels of Office 365 - standard/multi-tenant and dedicated. Dedicated comes with few limitations, but is eligible for only extremely large organizations (and is often rumored to be going away). Therefore, the considerations that follow are based on the standard, multi-tenant service description.

    Storage Capacity Planning
    There are limitations around capacity planning when you are moving to SharePoint Online. These are not necessarily bad limitations but you need to be aware of them prior to moving:

    • There is a limit of 300 site collections - to most organizations this should not be a problem.
    • Each site collection is limited to 100 GB. This is becomes a problem if you let your databases grow unchecked.
    • The total storage available is 25 TB. Note:  This was a significant increase from the original 5 TB each tenet was allowed.
    • The max upload size at any one time is 250 MB.

    Here are a couple of tips to help prepare for the migration:

    1. Clean up the existing farm. This includes the following
      • Delete versions where possible
      • Delete old documents that are no longer of any value
      • Delete unused lists, these don't take up much space but every little bit counts
    2. Review how your farm is structured. If all sites reside in one site collection start to consider how your business operates. Can you break the sites into separate site collections based on department, or operational functions?
    3. Complete a capacity planning session to determine how much space you will need over time.
    4. With SharePoint Online, do not use unlimited versioning in document libraries.
    5. Determine what types of documents you can put dispositions on. For instance, if you have a contract content type, consider the length of time that document should reside in the system and have it delete automatically once that date is reached.
    6. Do not create team templates in the new environment if you are not going to be using all of the features. Tailor the sites to the needs of the business.
    7. If you know you are going to need more than 25 TB of storage then consider running SharePoint in a hybrid scenario, meaning SharePoint Online and SharePoint On-premise. If you have all of the appropriate SharePoint Online licensing you may not have to purchase user CALs for your on-premise installation - only server licenses would be required.  You will want to confirm this with your Microsoft Account Manager / LAR.

    Migration Tool
    Microsoft did not release a way to migrate an existing SharePoint On-Premise implementation to SharePoint Online.  If you don’t have the need to migrate the content you could essentially re-architect your solution manually in SharePoint Online to use the new features and set your old environment to read-only.

    The other option is to utilize a third party tool for migrating content, although many tools require you to upgrade your environment to 2010 first before you can migrate to the cloud. For migration to Office 365, Cardinal recommends Metalogix Migration Manager SharePoint Upgrade which supports simple, direct migration from SharePoint 2003, 2007, and 2010. Migration Manager does not need to be installed on servers and provides powerful reporting functionality to compare content between sites and backup files. If there is a need to tackle a re-architecture of your environment prior to moving the content, the management tools within Migration Manager allow for a wide range of commands.

    Email Enabled Lists and Libraries
    Are you using email enabled lists or libraries? If you are not familiar with this functionality let me explain. If an environment is configured to allow email enabled lists and libraries, users can set up document libraries, calendars, announcement lists, and discussion boards to have email addresses. This enables users to interact with these tools via email instead of logging into SharePoint. Some organizations used this feature heavily, others block it entirely. It can be compared to public folders in Microsoft Exchange. This feature, however, is not available in Office 365.

    Cardinal recommends Metalogix Migration Manager Exchange Public Folder Edition for simple, direct migration to SharePoint Online. This solution can help to mimic the functionality of email enabled folders.

    The next major release from Microsoft for Office 365 appears to tackle the loss of email enabled folders by offering a new solution. While there is not a direct match-up for email enabling specific lists and libraries, users will be able to set up a feature called Site Mailbox. This feature essentially sets up an email address for a site as a whole. The intention is for this mailbox to be available through OWA and SharePoint simultaneously. This functionality is still in a beta release at this time.

    Custom or Third Party Solutions
    SharePoint Online only supports Sandbox Solutions. Can you convert your custom solutions to a Sandbox Solution? Does your third party vendor offer Sandbox Solutions to their products. If the answer to either of these is “no” you should consider running with a hybrid model. For more information about Sandbox Solutions and other development options in SharePoint Online, check out the developer guide.

    Network Capabilities
    What is your connection to the outside world? Keep in mind that now you will essentially have the need for a constant connection to the web. If your outside connection is down, you will only have access to the files you may have taken offline with SharePoint Workspace, or other third party tools. I recommend you review the Company Network Requirements document in the Microsoft Online Help and How-to. The document references some older BPOS material but it is still valid. If network connectivity is a problem, there are 3rd party solutions from WAN acceleration companies that can help you get over this hurdle.


    Please keep in mind that SharePoint Online is an ever evolving product. The software descriptions can be updated on a monthly basis, so check Office 365 Updates site regularly. Microsoft released the Office 365 Preview (beta) on July 16thTop 10 Reasons to try Office 365 Enterprise Preview. The exact timeframe for general release or updates for existing customers is unknown at this time.

    InfoPath Best Practices

    June 19, 2012 2:26 PM by Cory Williams

    If you are not familiar with InfoPath it is a form tool available from Microsoft, part of the Office Professional Suite. One of the main purposes of the tool is to allow a business user to quickly create a form that can be used organization wide to collect data without the need for a developer.  This is not always the best approach but it does help get something up and running quickly. I have used InfoPath forms quite a bit over the years to convert paper processes into electronic processes by easily incorporating the forms into a SharePoint environment.  More importantly, I have used them in multiple Fortune 100 companies where no custom code was allowed in SharePoint environments.  It is important to note that while InfoPath can be a great solution is not always the best approach to solving a problem. Be sure to do careful analysis of the application you want to create. If the requirements are overly complex you should consider a custom solution.

    In this post, I will discuss some of the common practices that I have used over the years. These are practices that I find helpful in organizing my forms so that I can always understand them, but more importantly, other developers or business users can get up to speed quickly when enhancements are requested.  Most of these practices pertain to naming items appropriately. It always makes the job a little easier when I walk into a client to make some enhancements and find the form controls organized in a coherent fashion. The opposite of this typically leads to hours of figuring out what component of the form does what, or what logic is associated to which control. Sometimes I have found it easier to build a form from scratch rather than hunt down the one item I need to change. So let’s get started.

    Plan

    Do not simply open a blank form template and start adding controls. Reorganizing all of the fields can be cumbersome. Think about how the form is going to work. Are you going to want certain sections to hide based on status or user? Do you want a specific layout? Do you need to following branding guidelines? Do you need to publish to SharePoint? Will a SharePoint workflow be running against this form? Do you need signatures? These are just a few of the questions you may need to ask yourself or your business partner prior to building the form. I would recommend documenting your plan, create a rough sketch, list all of the fields and field types. You may find it helpful to work with a Business Analyst to structure the requirements to help you along the way.

    Naming Conventions

    Name fields/sections/groups something that will make sense to everyone. The odds are you will not be the only person to customize the form.

    It is a good practice to use camel or pascal case for your field names. If you are not familiar with the terminology camel case is when you capitalize all words after the first word without spacing such as camelCase. Pascal case is when you capitalize all words without spacing such as PascalCase. Naming your fields using these methods will automatically add spaces if the fields are published to SharePoint.

    This is optional, but you should consider adding alternate text to controls. Every control within InfoPath has the option to add this property. This will help the end user understand what the control is used for. It also helps to make the form easier to read by accessibility tools such as screen readers. For example you may have two radial buttons for a yes/no scenario, for each radial you could put a description in the alternate text like “Select this if you agree”, or “Select this if you disagree”.

    Grouping Columns

    I recommend creating a section/group for the main areas of your form. If you add a section to the page it will automatically create a group in the data source. It will also add the fields into the group when added to the section. Sections can also be hidden based on status or even groups and users. For example an onboarding form could require fields that need to be completed by a hiring manager and fields to be filled out by IT. You could hide the fields that need to be filled out by IT from the hiring manager based on the SharePoint groups those users are in.

    Repeating Tables

    Repeating tables are essentially groups with multiple tiers. Again pay attention to naming these tiers appropriately. I typically name the first tier (folder) with the table’s purpose followed by table, for example BestPracticesTable. The second tier (folder) keeps the table’s purpose but is followed by row, for example BestPracticesRow.

    Rules

    Name these as well. InfoPath defaults these to Rule 1. Nothing will drive you more crazy opening up the logic inspector and seeing 100 Rule 1’s and each rule does something different. For example if it’s a rule that hides field a based on field b the rule should be named Hide field a when  field b equals x.

    Buttons

    Name the controls to indicate the actions they perform. Sometimes requirements are complex enough where multiple Resubmit, or Submit buttons are required.  Each one may have different actions it performs. When these are not named it makes it difficult to determine which button does what.

    Data Connections

    If you know the data connection the form will be using, perform a check to ensure that the connection to your resource does not already exist. If it is a common resource I recommend using a data source library to store the connection file. This allows the data connection to be available to more than one form. The data connection libraries are approval based so this allows more control and is commonly used to meet governance requirements.

    Browser Enabled Forms

    When first creating the form, ensure you have selected that it will be a browser enabled form. This will limit the controls available for use. The design checker will also alert you to any compatibility issues. You may also run into some limitations with the size of formulas and the amount of fields you can publish to SharePoint. These vary depending on the complexities and sizes of the fields. Only publish the fields you need in SharePoint, the most I have ever published to SharePoint was 75, but typically I do not have more than 25.

    Make sure you choose the right approach for deployment as well. There are three ways to do this. I do not recommend publishing directly to a forms library.

    The three ways to publish a form are as follows:

    1. Directly to a Form Library
    2. As a Content Type
    3. Via a SharePoint Administrator to Centrally Manage the form. This type of deployment is required if the form has had additional code added to it.

    Be sure to check out the InfoPath Developer Center for additional information.

    Oh, and one more thing: if you have access to InfoPath 2010 I recommend you use it - there are numerous improvements in 2010 over 2007. If you do have 2010, but are building for a 2007 SharePoint environment, be sure to start with the 2007 blank template.

    The Social Intranet

    May 3, 2012 11:07 AM by Brandon Ebken

    Typical Collaboration Platform

    Recently, I was in a familiar discussion with an organization that was struggling with adoption of their collaboration platform - SharePoint. They implemented project/team sites and built a central intranet with good published content. Shortly after roll-out, user adoption was low.

    So they redesigned with a very appealing user experience to make SharePoint look a little “less SharePoint”. Adoption stayed low…

    So they invested in a deep end-user training program. If users better understood the rich feature set provided by SharePoint, adoption would increase. Adoption stayed low…  

    So they implemented executive blogs and increased the frequency of corporate announcements. Give users a reason to navigate to the portal every day and usage would increase. Adoption stayed low…

    Despite the deep feature set and product capabilities, SharePoint simply was not the central place people “did work”. In reality, their portal simply became the place where information went to die. The portal was content-focused, feature-focused, and process-focused. The portal lacked the most important focus – people!

    The Social Enterprise

    We are all familiar with social computing in the consumer world. If you take Facebook, Twitter, LinkedIn – you use at least one of them, your kids use them, even your parents may use them.

    What about the value of “social” to a corporate enterprise? Is this another way for employees to blow off time sharing pictures of Lolcats, a necessary evil required by the Millennials, or just another communication vehicle that IT has to manage, control, and govern? Hopefully not.

    Over the last year or so, we have seen numerous organizations using social to improve internal collaboration and solve the adoption problem. These organizations have ranged from large, global, Fortune 10 companies to smaller organizations with hundreds of organizations; from professional services to financial services to health care.

    So what is driving this?

    Ironically, the push has nothing to do with Generation Y. Rather, organizations are adopting social to improve knowledge sharing (frequently across geographies), increase productivity through better access to experts (Q&A), and of course drive adoption to their existing intranet. Social is the key ingredient to enable a people-focused intranet!

    The Social Intranet… Enter NewsGator

    Here is picture of our own intranet, which utilizes NewsGator combined with SharePoint. NewsGator is not the only social solution in the marketplace, but it is the only social solution that deploys on top of SharePoint. This is huge. Nearly all of our customers have adopted SharePoint as their enterprise collaboration platform and/or intranet, and NewsGator Social Sites simply bolts on.  All the IT effort in establishing user profiles, security, governance, and policies for your SharePoint environment is re-used by NewsGator. The solution actually does not exist outside of SharePoint.

    csg_portal

    NewsGator provides the social system of engagement which is combined with the SharePoint system of record (content). The means every piece of work (content) is aggregated in a way that a social conversation could be triggered amongst followers. As a result, tacit information is shared more easily and communication occurs outside of natural, organizational hierarchies. Further, as adoption increases, the level of the conversations and productivity become more valuable, encouraging even more adoption.

    Think about it. Over the course of the day, we all do work - create documents, attend meetings, complete tasks, answer questions, submit ideas, approve a workflow item. etc. All of these activities inherently lead to a variety of work products. When a work product is completed – for example, edits are completed to a project’s requirements document – that content is typically uploaded to the collaboration platform (SharePoint). SharePoint, however, is not really a system of engagement. Therefore, to make colleagues aware of a content change, people resort to emailing all team members or automating the emails through alerts. Collaboration and tacit knowledge is shared through email, if at all. 

    With a social solution, all work activities are aggregated into an activity steam. This is the beauty of a social enabled collaboration platform. It is not merely about short microblogs. Rather, it is about sharing of information and increasing communication in all directions – top-down, bottom-up, and across-geography. When I complete edits to our project’s requirements document, that activity is aggregated into the stream of all colleagues who choose to follow me (they also choose the type of activity to follow). These activities generate awareness, trigger conversation, and encourage more adoption.  Some organizations are concerned that social becomes a time waster. In our observations, we have seen productivity and employee engagement outweigh any concerns which are easily self-governed by the social community itself.

    If you are interested in seeing a demo, send me an email.