<?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>Pinch-Perfect</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/pinch-perfect/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/pinch-perfect/feed.xml</link>
    <description>The help you need when you&amp;#039;re in a pinch!</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:24:21 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Office 365 usage report APIs in preview</title>
      <link>https://docs.microsoft.com/archive/blogs/pinch-perfect/office-365-usage-report-apis-in-preview</link>
      <pubDate>Wed, 13 Sep 2017 22:28:02 GMT</pubDate>
      <dc:creator><![CDATA[Shawn Leonard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/pinch-perfect/?p=865</guid>
      <description><![CDATA[We'll get to configuring and using the Office 365 Usage Reports based on the beta endpoint of the...]]></description>
      <content:encoded><![CDATA[We'll get to configuring and using the Office 365 Usage Reports based on the beta endpoint of the Microsoft Graph API.   First let's quickly overview why this is important.  On October 1st, 2017 some of the API endpoints for the tried and true Reporting webservice https://msdn.microsoft.com/en-us/library/office/jj984325.aspx will be deprecated.   I've grown to depend on this for data modeling and understanding various tenants usage.     Our, Microsoft, march towards a unified API has tremendous benefits for the developer and in reality all platforms.  Azure AD has truly enabled Microsoft to offer first class development and usability.   Enough about that for a moment.

So what's replacing the Reporting Service endpoints.  Surely if the reporting service is being deprecated it has a replacement.  That's a bigger conversation but the good news is; you can start building today  https://blogs.office.com/en-us/2017/03/31/whats-new-in-office-365-administration-public-preview-of-microsoft-graph-reporting-apis/     I don't want to take screenshots of how to register an application in Azure AD.   For the sake of this demo I'll send you to 2 locations.
<ol>
 	<li>Azure AD v1.0 Endpoint - <a href="https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-integrating-applications">Integrating Applications with Azure AD</a></li>
 	<li>Azure AD v2.0 Endpoint - <a href="https://developer.microsoft.com/en-us/graph/docs/concepts/auth_register_app_v2">Register your app</a></li>
</ol>
For these reports you only need v1.0 "Microsoft Graph &gt; Application Permissions &gt; Read all usage reports"  or v2.0 "Application Permissions &gt; Reports.Read.All"    For the sample code I'm providing I'll demonstrate the v1.0 registration and application permissions.

If you aren't familiar with the PinchPerfect.InfrastructureAsCode.Powershell project its a quick way to gather a few sample cmdlets for processing various SharePoint Online activities.  Go to my <a href="https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/InfrastructureAsCode.Powershell/readme.md">Powershell Readme</a>  for a walk through on cloning locally and running.     Once you have the Powershell solution cloned locally you can start to debug and run through the Preview Usage API queries.  I haven't implemented admin consent; the assumption is that you've done this through the links above.  I've taken care of the Authentication Token and Refreshing the token once it's expired.  So the core framework is in place for you to extend it.   Once you've followed my steps in the <a href="https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/InfrastructureAsCode.Powershell/readme.md">Powershell Readme</a> you can debug or run in Powershell the following:

Extract from <a href="https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/HowToExtend/SampleFiles/sample-preview-usage-and-adoption.ps1">sample-preview-and-adoption.ps1</a>
<pre>$graphparms = @{
appid='';
appsecret='';
aaddomain='.onmicrosoft.com';
ResourceUri='https://graph.microsoft.com';
}

Report-IaCUsageAnalytics @graphparms -ReportType OneDriveActivity -ViewType Users -Period D30 -Verbose
Report-IaCUsageAnalytics @graphparms -ReportType OneDriveActivity -ViewType Files -Period D30 -Verbose
Report-IaCUsageAnalytics @graphparms -ReportType OneDriveActivity -ViewType Detail -Date ([System.DateTime]::Parse("2017-09-06")) -Verbose

Report-IaCUsageAnalytics @graphparms -ReportType OneDriveUsage -ViewType Account -Period D30 -Verbose
Report-IaCUsageAnalytics @graphparms -ReportType OneDriveUsage -ViewType Files -Period D30 -Verbose
Report-IaCUsageAnalytics @graphparms -ReportType OneDriveUsage -ViewType Storage -Period D30 -Verbose
Report-IaCUsageAnalytics @graphparms -ReportType OneDriveUsage -ViewType Detail -Date ([System.DateTime]::Parse("2017-09-06")) -Verbose

Report-IaCUsageAnalytics @graphparms -ReportType SharePointActivity -ViewType Users -Period D7 -Verbose
Report-IaCUsageAnalytics @graphparms -ReportType SharePointActivity -ViewType Pages -Period D7 -Verbose
Report-IaCUsageAnalytics @graphparms -ReportType SharePointActivity -ViewType Files -Period D7 -Verbose

Report-IaCUsageAnalytics @graphparms -ReportType SharePointSiteUsage -ViewType Sites -Period D7 -Verbose
Report-IaCUsageAnalytics @graphparms -ReportType SharePointSiteUsage -ViewType Pages -Period D7 -Verbose
Report-IaCUsageAnalytics @graphparms -ReportType SharePointSiteUsage -ViewType Storage -Period D7 -Verbose
Report-IaCUsageAnalytics @graphparms -ReportType SharePointSiteUsage -ViewType Files -Period D7 -Verbose

Report-IaCUsageAnalytics @graphparms -ReportType EmailActivity -ViewType Activity -Period D7 -Verbose
Report-IaCUsageAnalytics @graphparms -ReportType EmailActivity -ViewType Users -Period D7 -Verbose

Report-IaCUsageAnalytics @graphparms -ReportType Office365GroupsActivity -ViewType Activity -Period D7 -Verbose

Report-IaCUsageAnalytics @graphparms -ReportType Office365ActiveUsers -ViewType Services -Period D7 -Verbose
Report-IaCUsageAnalytics @graphparms -ReportType Office365ActiveUsers -ViewType Users -Period D7 -Verbose
Report-IaCUsageAnalytics @graphparms -ReportType Office365ActiveUsers -ViewType Detail -Date ([System.DateTime]::Parse("2017-09-06")) -Verbose

Report-IaCUsageAnalytics @graphparms -ReportType MailboxUsage -ViewType Mailbox -Period D7 -Verbose
Report-IaCUsageAnalytics @graphparms -ReportType MailboxUsage -ViewType Storage -Period D7 -Verbose
Report-IaCUsageAnalytics @graphparms -ReportType MailboxUsage -ViewType Quota -Period D7 -Verbose
</pre>
This is just the start of this project.  My intent is to build the companion Web project with Web API to enable a UI visualization of this data.  As of today I extended the <a href="https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/InfrastructureAsCode.Core/Reports/o365Graph/ReportVisitor.cs">ReportVisitor</a> to pump this data into a database.    If you are interested in the database and seeing a holistic overview leave a comment.   This isn't complete and as the title indicates very much a preview effort.]]></content:encoded>
    </item>
    <item>
      <title>SharePoint - Setting a View Definition</title>
      <link>https://docs.microsoft.com/archive/blogs/pinch-perfect/sharepoint-setting-a-view-definition</link>
      <pubDate>Tue, 08 Aug 2017 00:39:48 GMT</pubDate>
      <dc:creator><![CDATA[Shawn Leonard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/pinch-perfect/?p=856</guid>
      <description><![CDATA[I try to encourage a minimalist approach towards working with SharePoint.   Why write code, when a...]]></description>
      <content:encoded><![CDATA[I try to encourage a minimalist approach towards working with SharePoint.   Why write code, when a community is doing it on a larger scale?  I absolutely love the <a target="_blank" href="https://dev.office.com/blogs/introduction-to-office-365-dev-pnp-provisioning-engine" rel="noopener noreferrer">PnP Provisioning engine</a> and typically use it in conjunction with ensuring multiple environments stay in sync with the original site definition (think Desired State Configuration (DSC)).   Users typically (with more permissions than required) love to and occasionally change things.    This post is meant for a developer/team who might be working on a way to filter a SharePoint List/Library view where the application requirements go beyond what the User Interface will allow.  The developer might want to skip waiting for the Provisioning engine to run through everything just to update a View Definition.  Or, production was inadvertently updated and the view definition needs to be reset.

I received some requirements which included a large number of filters and boolean logic.  I immediately knew the UI was not going to be effective for creating a complicated query.   The requirements included making the data read-only and in some cases the user selection needed to pull from a separate list.  I knew I could update the XML in the Provisioning Engine schema and things would update the next time it ran.   The challenge with Agile development is not knowing what will shift from sprint to sprint.   I needed a way to quickly update a view definition and render the results to the user and application.   Enter a new Powershell CmdLet that can update any property of a List View definition.  By following the snippet below you can update the CAML query and/or update the JS Link property thus running code as the View is being rendered.

For code snippets you can view sample script and details here <a target="_blank" href="https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/HowToExtend/Gist/set-iac-viewdefinition.md" rel="noopener noreferrer">https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/HowToExtend/Gist/set-iac-viewdefinition.md</a>

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Custom actions (quick guide)</title>
      <link>https://docs.microsoft.com/archive/blogs/pinch-perfect/custom-actions-quick-guide</link>
      <pubDate>Fri, 04 Aug 2017 06:14:16 GMT</pubDate>
      <dc:creator><![CDATA[Shawn Leonard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/pinch-perfect/?p=855</guid>
      <description><![CDATA[https://dev.office.com/sharepoint/docs/sp-add-ins/create-custom-actions-to-deploy-with-sharepoint-ad...]]></description>
      <content:encoded><![CDATA[<a href="https://dev.office.com/sharepoint/docs/sp-add-ins/create-custom-actions-to-deploy-with-sharepoint-add-ins">https://dev.office.com/sharepoint/docs/sp-add-ins/create-custom-actions-to-deploy-with-sharepoint-add-ins</a> has a fantastic write up with respect to deploying Custom Actions from an Add-In.  If you are in a pinch and want to deploy or remove custom actions take a look at a Powershell CmdLet.   This sample will add a variety of custom actions based on a JSON definition.

&nbsp;

Lets get to the code:

<a href="https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/InfrastructureAsCode.Powershell/Commands/Sites/SetIaCCustomAction.cs">https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/InfrastructureAsCode.Powershell/Commands/Sites/SetIaCCustomAction.cs</a>  will read in a JSON file containing definitions for Site, Web, or List custom actions.  The CmdLet will deserialize the JSON file and process the various Custom Actions.   If the custom action is found; it will update the details.  If not found; it will add the action.   The following script presents the requisite pattern to connect to a site, update the custom actions, and disconnect the context.

&nbsp;

Custom Action [Site | Web | List] samples:
<ul>
 	<li><a href="https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/HowToExtend/Samples/script-set-customaction.ps1">https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/HowToExtend/Samples/script-set-customaction.ps1</a>
<ul>
 	<li>Script Link [Inject Javascript files] <a href="https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/HowToExtend/SampleFiles/sample-customaction-site-scriptlink.json">https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/HowToExtend/SampleFiles/sample-customaction-site-scriptlink.json</a></li>
 	<li>Script Block [Javascript or inject CSS] <a href="https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/HowToExtend/SampleFiles/sample-customaction-site-scriptblock.json">https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/HowToExtend/SampleFiles/sample-customaction-site-scriptblock.json</a></li>
 	<li>List custom action <a href="https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/HowToExtend/SampleFiles/sample-customaction-list.json">https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/HowToExtend/SampleFiles/sample-customaction-list.json</a></li>
</ul>
</li>
</ul>
Command UI [List] samples
<ul>
 	<li><a href="https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/HowToExtend/Samples/script-set-customaction-commandui.ps1">https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/HowToExtend/Samples/script-set-customaction-commandui.ps1</a>
<ul>
 	<li>List CommandUIExtension <a href="https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/HowToExtend/SampleFiles/sample-customaction-list.xml">https://github.com/pinch-perfect/Infrastructure-As-Code/blob/master/HowToExtend/SampleFiles/sample-customaction-list.xml</a></li>
</ul>
</li>
</ul>
&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>How to enable SharePoint Designer 2013 Advanced Mode.</title>
      <link>https://docs.microsoft.com/archive/blogs/pinch-perfect/how-to-enable-sharepoint-designer-2013-advanced-mode</link>
      <pubDate>Thu, 09 Jun 2016 21:33:02 GMT</pubDate>
      <dc:creator><![CDATA[Shawn Leonard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/pinch-perfect/?p=686</guid>
      <description><![CDATA[SharePoint Designer is on its way out but it is still one of the critical ways to modify and manage...]]></description>
      <content:encoded><![CDATA[SharePoint Designer is on its way out but it is still one of the critical ways to modify and manage your SharePoint sites.     Recently, a customer was unable to open SharePoint designer and modify Unghosted pages, layouts, and master pages.  The beauty of SharePoint Designer was the ability of farm/tenant and site collection administrators to lock down usage of SharePoint Designer (SPD).  SPD can perform damaging changes to a site and is typically locked down to prohibit that action.

<strong>Scenario</strong>: you have an unghosted page or need to make changes to a page and break it from the site definition.  If you do not have the correct SPD permissions you will not be able to edit or access the Advanced Mode design capabilities of SPD.

&nbsp;

<strong>Issue</strong>:

A site owner opens SharePoint Designer, navigates to the Page in the Site Pages library, and attempts to Edit the file.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-01-edit.png"><img class="alignnone wp-image-695 " src="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-01-edit-300x242.png" alt="SharePoint Designer Edit Page" width="457" height="369" /></a>

&nbsp;

The file is unghosted [Reference: 2] which indicates it is no longer using the Site Definition layout, markup, or structure.  You can only modify this page in Advanced Mode

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-02-advanced-disabled.png"><img class="alignnone wp-image-705 " src="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-02-advanced-disabled-300x204.png" alt="SharePoint Designer - Modification is Disabled" width="454" height="309" /></a>

&nbsp;

A site owner or developer opens the List to modify the Custom form.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-03-list-custom-form.png"><img class="alignnone wp-image-706 " src="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-03-list-custom-form-300x208.png" alt="SharePoint Designer - List Custom Form" width="457" height="317" /></a>

&nbsp;

&nbsp;

The file is unghosted [Reference: 2] which indicates it is no longer using the Site Definition layout, markup, or structure.  You can only modify this page in Advanced Mode

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-04-list-form-permissions.png"><img class="alignnone  wp-image-715" src="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-04-list-form-permissions-300x216.png" alt="SharePoint Designer - Lack of Permissions" width="457" height="329" /></a>

&nbsp;

&nbsp;

Notice the Advanced Mode is Disabled.  All text in Yellow is not modifiable according to SharePoint Designer markup engine

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-05-advanced-disabled.png"><img class="alignnone  wp-image-717" src="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-05-advanced-disabled-300x181.png" alt="SharePoint Designer - Advanced Mode Disabled" width="461" height="278" /></a>

&nbsp;

&nbsp;

<strong>Resolution</strong>:

Each Site collection controls how SharePoint Designer can be used

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/spd-admin-01-site-designer-permissions.png"><img class="alignnone  wp-image-765" src="https://msdnshared.blob.core.windows.net/media/2016/06/spd-admin-01-site-designer-permissions-300x225.png" alt="SharePoint Designer Advanced Permissions" width="447" height="335" /></a>

&nbsp;

The permissions and their details are documented in [Reference : 2] .  Check 'Enable Detaching pages from Site Definition' which will allow you to modify those un-ghosted pages that are only accessible through Advanced Mode modifications.    I've highlighted Enable Customizing Master Pages and Layout Pages.  Unless you absolutely need your site owners customizing the site design, I would highly recommend you leave this unchecked.   Design manager would be a more appropriate approach at customizing your site.  Take a look at the OfficeDevPnP site for additional guidance on design options.  [Reference: 4]

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/spd-admin-02-design-permissions.png"><img class="alignnone  wp-image-775" src="https://msdnshared.blob.core.windows.net/media/2016/06/spd-admin-02-design-permissions-300x190.png" alt="SharePoint Designer - Permissions" width="453" height="287" /></a>

&nbsp;

<strong>Expected Outcome:</strong>

First communicate with your Tenant Admin, Farm Admin, or Site Collection Administrator to enable the correct SPD permissions (see Resolution above) on the site you need to modify.  Close any existing SPD connection with the site.  Reconnect to your Site as a Site Owner or Developer.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-06-close-connection.png"><img class="alignnone  wp-image-726" src="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-06-close-connection-300x230.png" alt="SharePoint Designer - Close Connections" width="454" height="348" /></a>

&nbsp;

Navigate to the Site Pages library, open the page, and then click Edit.  You will receive a new prompt.  Notice the prompt opens immediately in Advanced Mode.  In this instance the page was already unghosted or customized from the Site definition.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-07-open-edit-form.png"><img class="alignnone  wp-image-735" src="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-07-open-edit-form-300x200.png" alt="SharePoint Designer - Advanced Mode is enabled" width="449" height="299" /></a>

&nbsp;

Navigate to your List/Library and open the custom form.  You will receive the prompt that the List Form will be opened in Advanced Mode.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-09-custom-form-editable.png"><img class="alignnone  wp-image-755" src="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-09-custom-form-editable-300x180.png" alt="SharePoint Designer - Custom List Form" width="455" height="273" /></a>

&nbsp;

Of note: the HTML is not highlighted in Yellow which indicates areas that we can modify.  I would suggest you leave the HTML alone and focus on the Ribbon components to make changes to the form.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-08-html-editable.png"><img class="alignnone  wp-image-745" src="https://msdnshared.blob.core.windows.net/media/2016/06/spd-user-08-html-editable-300x209.png" alt="SharePoint Designer - Editable Html" width="454" height="316" /></a>

&nbsp;

&nbsp;

<strong>References</strong>:
<ol>
	<li><a href="https://social.msdn.microsoft.com/Forums/en-US/bb035480-45a0-41ba-bdef-2e7cd709ce77/how-to-enable-sharepoint-designer-2013-advanced-mode-which-is-alwayes-grayed-out?forum=sharepointdevelopment" target="_blank">https://social.msdn.microsoft.com/Forums/en-US/bb035480-45a0-41ba-bdef-2e7cd709ce77/how-to-enable-sharepoint-designer-2013-advanced-mode-which-is-alwayes-grayed-out?forum=sharepointdevelopment</a>  - Demonstrates the issue but doesn't tell you how to enable the feature.</li>
	<li><a href="https://blogs.msdn.microsoft.com/michael_yeager/2007/11/03/sharepoint-terms-ghosted-unghosted-and-reghosted/" target="_blank">https://blogs.msdn.microsoft.com/michael_yeager/2007/11/03/sharepoint-terms-ghosted-unghosted-and-reghosted/</a> - Details the difference between Ghosted and Un-ghosted.</li>
	<li><a href="https://support.microsoft.com/en-us/kb/2592376" target="_blank">https://support.microsoft.com/en-us/kb/2592376</a> - Outlines each setting for SharePoint Designer</li>
	<li><a href="https://github.com/OfficeDev/PnP-Guidance/blob/master/articles/SharePoint-development-and-design-tools-and-practices.md" target="_blank">https://github.com/OfficeDev/PnP-Guidance/blob/master/articles/SharePoint-development-and-design-tools-and-practices.md</a>   - SharePoint design tools and practices</li>
</ol>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint web services: read version history for column changes</title>
      <link>https://docs.microsoft.com/archive/blogs/pinch-perfect/sharepoint-web-services-read-version-history-for-column-changes</link>
      <pubDate>Sat, 04 Jun 2016 02:06:56 GMT</pubDate>
      <dc:creator><![CDATA[Shawn Leonard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/pinch-perfect/?p=635</guid>
      <description><![CDATA[A recent project requirements were to display version history; specifically the value changes in...]]></description>
      <content:encoded><![CDATA[A recent project requirements were to display version history; specifically the value changes in each field, who effected the change, and when it was changed.   The first course of action is to enable version history in the list.  Once version history is enabled on the list you'll be presented with various UI commands to view the details using the out of the box Versions.aspx page/control.  In this particular use-case the application owner wants to present specific field changes in the UI.    If we are writing managed code (SSOM) or a Provider Hosted Add-In (CSOM) this would be easy.  We focused on customizing the out of the box controls which limits us to JavaScript based solutions.  The same technique's apply to SharePoint Hosted Add-Ins as you are limited to REST API's or JavaScript Object Model (JSOM).    The first issue with REST or JSOM is a lack of endpoints, extensions, or methods to retrieve Version History.   You'll find some stack exchanges which will leverage HTML scraping the Versions.aspx page.  The drawbacks to that approach are 1. requiring the List GUID and 2. always expecting the HTML output to render with the specific markup tags.  I tried to pull the change history from the (<a href="https://msdn.microsoft.com/en-us/library/office/jj245447.aspx" target="_blank">SP.FileVersionCollection</a>) REST API which provide when an item was changed, by whom, and the URL to the item.  I couldn't easily get access to the field that was changed so this ultimately left me to leverage SOAP web services.    Honestly, this is one area where SharePoint really shines.  The engineering team has done a pretty great job ensuring backwards compatibility.  I reviewed the documentation for <a href="https://msdn.microsoft.com/en-us/library/lists.lists.getversioncollection(v=office.12).aspx" target="_blank">GetVersionCollection</a> from the Lists.asmx web service method.  There isn't much documentation in this page but it does provide you with details regarding the SOAP Envelop, method, and expected parameters.    The expected parameters are:
<ul>
	<li>strListID: typically the List GUID but we don't want to parse that out so bonus for us this also accepts the List 'Display Name',</li>
	<li>strListItemID: this is the unique integer value of the List item for which we will retrieve version history</li>
	<li>strFieldName: the Internal Name of the field</li>
</ul>
The documentation is sparse.   You can review the operation by appending the path _vti_bin <a href="https://customers.microsoft.com/_vti_bin/lists.asmx?op=GetVersionCollection" target="_blank">https://customers.microsoft.com/_vti_bin/lists.asmx?op=GetVersionCollection</a> to your SharePoint site to see the details.  The beauty of SOAP was/is self documentation.  Included in the service documentation I can see the entire SOAP envelop, required headers, and expected response.   Now that I know how to format my request we can proceed with writing code.    <a href="https://spservices.codeplex.com/" target="_blank">SPServices</a> provides an extension which will exercise almost all of the SOAP services.   Of Note: Marc the author of SPServices has started a blog series detailing the patterns and path forward to REST (<a href="https://sympmarc.com/series/moving-from-spservices-to-rest/" target="_blank">so check it ou</a>t).

&nbsp;

<strong>Screenshots</strong>:

The Versions.aspx page presents the version history for each field

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/version-01.png" rel="attachment wp-att-835"><img class="size-full wp-image-835" src="https://msdnshared.blob.core.windows.net/media/2016/06/version-01.png" alt="Version history in the browser page" width="593" height="522" /></a>

Version history in the browser page

If you are modifying the XSL from an ListViewWebPart you can use the SP Control : AppendOnlyHistory control to render the Field changes with time-stamps.
<table>
<tbody>
<tr>
<td><a href="https://msdnshared.blob.core.windows.net/media/2016/06/version-03.png" rel="attachment wp-att-785"><img class="alignnone wp-image-785 size-large" src="https://msdnshared.blob.core.windows.net/media/2016/06/version-03-1024x924.png" alt="Version History (XSL markup)" width="1024" height="924" /></a></td>
<td>XSL:value-of  will present the current text in the field ; disable-output-escaping will handle special characters from the Rich Text fieldSharePoint:AppendOnlyHistory will present the full change history for the field, the timestamps, and editor of the change

&nbsp;

div id="myNotesAppended" will be populated within our REST queries

&nbsp;

div id="myNotesVersion" will be populated from scraping the HTML on the Version.aspx page</td>
</tr>
</tbody>
</table>
&nbsp;

The output of this XSL markup is presented below.  The biggest tweak to the output for this screenshot is the usage of moment.js to render Date Time-stamps.  SharePoint stores dates in Coordinated Universal Time (UTC) format.  Using moment.js we can display the time-stamp in our local time zone.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/version-02.png" rel="attachment wp-att-795"><img class="alignnone wp-image-795" src="https://msdnshared.blob.core.windows.net/media/2016/06/version-02-213x300.png" alt="version-02" width="315" height="443" /></a>

&nbsp;

SPServices syntax for exercising the GetVersionCollection method.   Take a look at the <a href="https://github.com/pinch-perfect/development-samples/blob/master/Sample06/AppFiles/SiteAssets/js/SampleVersionDisp.js" target="_blank">getListItemBySPServices</a> method for the screenshot below.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/version-04.png"><img class="alignnone size-full wp-image-675" src="https://msdnshared.blob.core.windows.net/media/2016/06/version-04.png" alt="SPServices-GetVersionCollection" width="508" height="412" /></a>

&nbsp;

Pure SOAP AJAX syntax for exercising the GetVersionCollection method.  We do have the documentation from the List service so lets construct the request.  Take a look at the source <a href="https://github.com/pinch-perfect/development-samples/blob/master/Sample06/AppFiles/SiteAssets/js/SampleVersionDisp.js" target="_blank">getListItemBySoap</a> method for the screenshot below.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/version-05.png"><img class="alignnone wp-image-685" src="https://msdnshared.blob.core.windows.net/media/2016/06/version-05.png" alt="SOAP GetVersionCollection" width="577" height="476" /></a>

&nbsp;

We can use the Versions.aspx page with HTML parsing.   Take a look at the source <a href="https://github.com/pinch-perfect/development-samples/blob/master/Sample06/AppFiles/SiteAssets/js/SampleVersionDisp.js" target="_blank">getListItemByVersionPage</a> method for the screenshot below.

[caption id="attachment_815" align="alignnone" width="527"]<a href="https://msdnshared.blob.core.windows.net/media/2016/06/version-06.png" rel="attachment wp-att-815"><img class="wp-image-815" src="https://msdnshared.blob.core.windows.net/media/2016/06/version-06-1024x926.png" alt="Version History HTML parsing" width="527" height="477" /></a> Version History HTML parsing[/caption]

&nbsp;

<strong>Summary</strong>:

Review the source code at <a href="https://github.com/pinch-perfect/development-samples/tree/master/Sample06" target="_blank">https://github.com/pinch-perfect/development-samples/tree/master/Sample06</a> .  You can use this to review the JavaScript, XSL markup, and provision a sample list.

&nbsp;

<strong>Caveats</strong>:

You do not need to use a Multi-line Text with append changes for this code to work appropriately.  I used the Multi-line Text column to demonstrate the Append Changes with time-stamps.  Once you enable Versioning on a list all columns subscribe to change events.  You can use the internal name of any field and retrieve its Field Values.   There is a known issue (regarding saving an empty value in the append history) when Versioning and a Multi-line text field with append changes is enabled.]]></content:encoded>
    </item>
    <item>
      <title>Access Services and my data</title>
      <link>https://docs.microsoft.com/archive/blogs/pinch-perfect/access-services-and-my-data</link>
      <pubDate>Fri, 03 Jun 2016 04:04:24 GMT</pubDate>
      <dc:creator><![CDATA[Shawn Leonard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/pinch-perfect/?p=236</guid>
      <description><![CDATA[This post is targeted at users who have a local set of data in a MS Excel file, MS Access database,...]]></description>
      <content:encoded><![CDATA[This post is targeted at users who have a local set of data in a MS Excel file, MS Access database, SharePoint list, ODBC Database, CSV file, or any XML file.  All of these platforms are useful and have their merits.  You may want to extend this data to a large number of users, or you reached a network bottleneck that inhibits the performance of your source data, or experienced data corruption.    You need to move it to an 'Enterprise' backed service and are evaluating your options.
<ul>
	<li>SharePoint On Premise: Access Services leverages an On Premise SQL Server set of instances/databases.</li>
	<li>SharePoint Online: Azure Access Services leverages Azure SQL.</li>
</ul>
With Access Services you gain Enterprise scale and performance with integration points to SharePoint.  You can easily modify your source data in a familiar interface.   This post will demonstrate porting an excel file into Access Services.   I will then use an Access front-end (if ports 1433 are not blocked) with a back-end that is stored in an enterprise database via SharePoint Access Services.  In a future post I'll create a custom web application and consume the data via Entity Framework as well as extend through Business Connectivity Services to any site in your SharePoint farm or tenant.

&nbsp;

The first step is to create the Access Services Add-In.  Use the out of the box controls to 'Add an App'.  We will search for the Access App.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access01.png"><img class="alignnone  wp-image-385" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access01-300x213.png" alt="Add Access Add-In" width="420" height="299" /></a>

&nbsp;

Provide a unique name for the Access app

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access02.png"><img class="alignnone  wp-image-395" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access02-300x164.png" alt="Unique name for the Add-In" width="424" height="232" /></a>

&nbsp;

After some time the Add-In will be provisioned with its' isolated App Web

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access03.png"><img class="alignnone  wp-image-405" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access03-300x164.png" alt="The Add-In is provisioned" width="423" height="231" /></a>

&nbsp;

Click on the new Access Add-In.  You can then open the Access Services' database in an Access web application database.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access04.png"><img class="alignnone  wp-image-415" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access04-300x132.png" alt="Launch the Add-In Access Db" width="436" height="192" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access051.png"><img class="alignnone wp-image-615 size-medium" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access051-300x47.png" alt="" width="300" height="47" /></a>

&nbsp;

We will create a table by importing an Excel file

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access06.png"><img class="alignnone  wp-image-435" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access06-300x195.png" alt="Browse for an XLSX file" width="415" height="270" /></a>

&nbsp;

This will launch a wizard allowing you to modify column details from the first row of the Excel file.  Mark the first row as containing column headings.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access07.png"><img class="alignnone  wp-image-445" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access07-300x188.png" alt="ETL Process to identify column properties" width="413" height="259" /></a>

&nbsp;

Add a unique name for the table and process the import by clicking Finish

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access08.png"><img class="alignnone  wp-image-455" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access08-300x166.png" alt="Import the data" width="416" height="230" /></a>

&nbsp;

You can tweak the table design or leave as-is.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access09.png"><img class="alignnone size-medium wp-image-465" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access09-300x220.png" alt="Design mode" width="300" height="220" /></a>

&nbsp;

You can switch to Datasheet mode; view and/or edit data.  All data changes you effect are performed on the server and you are not required to save the file to persist changes.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access10.png"><img class="alignnone  wp-image-475" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access10-300x188.png" alt="Datasheet mode" width="418" height="262" /></a>

&nbsp;

Let's close the Access web application database.   Navigate to the SharePoint Add-In (if you are already there hit refresh) and you'll be presented with the table.  You can click on each row and view the detail pane with basic form capabilities.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access11.png"><img class="alignnone  wp-image-485" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access11-300x111.png" alt="View row in the Access Add-In" width="414" height="153" /></a>

&nbsp;

Switch to Datasheet mode and you can edit data just like you can with MS Access

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access12.png"><img class="alignnone  wp-image-495" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access12-300x123.png" alt="Add-In switch to DataSheet mode" width="415" height="170" /></a>

&nbsp;

At any time you can customize the table(s) by opening the database with the 'Customize in Access' option

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access13.png"><img class="alignnone  wp-image-505" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access13-300x159.png" alt="How to customize the data set" width="413" height="219" /></a>

&nbsp;

The Access Web Application (accdw) file will download.  Open the file to further customize your Access Services database

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access13-01.png"><img class="alignnone  wp-image-515" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access13-01-300x157.png" alt="File downloads to modify table" width="415" height="217" /></a>

&nbsp;

Open the table to customize.  If you want to expand and customize the Access Web application take a look at this post <a href="https://support.office.com/en-us/article/Build-an-Access-database-to-share-on-the-Web-cca08e35-8e51-45ce-9269-8942b0deab26" target="_blank">https://support.office.com/en-us/article/Build-an-Access-database-to-share-on-the-Web-cca08e35-8e51-45ce-9269-8942b0deab26</a>

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access13-02.png"><img class="alignnone  wp-image-525" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access13-02-300x184.png" alt="navigate to the table" width="414" height="254" /></a>

&nbsp;

Edit the table

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access15.png"><img class="alignnone  wp-image-537" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access15-300x129.png" alt="edit the table" width="414" height="178" /></a>

&nbsp;

Add a new column.  You can save the changes or close the design pane and be prompted to save changes.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access16.png"><img class="alignnone size-medium wp-image-545" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access16-295x300.png" alt="Add new column" width="295" height="300" /></a>

&nbsp;

Add data to the new column by navigating to datasheet mode

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access17.png"><img class="alignnone  wp-image-555" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access17-300x135.png" alt="Modify data in the new column" width="416" height="187" /></a>

&nbsp;

We successfully imported a table, modified the database schema, and updated data via the Access Add-In and Access Web database.  We can manage the database by setting the database connections (firewall rules and permissions).  From the manage connections screen we can also review the database connection properties.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access18.png"><img class="alignnone  wp-image-565" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access18-300x205.png" alt="File &gt; Info" width="386" height="264" /></a>

&nbsp;

Set the firewall rules to enable a connection to the Access Services database from Any location

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access19.png"><img class="alignnone  wp-image-575" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access19-300x205.png" alt="Set firewall rules to allow access" width="400" height="273" /></a>

&nbsp;

Enable Read-Write connection.  This will allow us to read/write from an Access database, SQL Server IDE, Web Application, or BCS Services

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access20.png"><img class="alignnone  wp-image-576" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access20-300x192.png" alt="Enable a Read-Write connection" width="398" height="255" /></a>

&nbsp;

After we enable the connection for Read or Read-Write we can now view the Connection Information

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access21.png"><img class="alignnone  wp-image-586" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access21-300x182.png" alt="View connection info" width="402" height="244" /></a>

&nbsp;

You can view this connection information anytime by launching the ACCDW.  Take note of the username, password, server name, and database name.  The user account will not be able to enumerate other databases on the server.  All connections to the database must specify the database name as the default database

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access22.png"><img class="alignnone  wp-image-245" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access22-300x159.png" alt="Database connection info" width="398" height="211" /></a>

&nbsp;

We will create a DNS file using notepad or any other text editor.  Take note of the specific variable names.
<ul>
	<li>[ODBC]</li>
	<li>DRIVER=SQL Server Native Client 11.0</li>
	<li>UID=[your username]</li>
	<li>DATABASE=[your database name]</li>
	<li>WSID=[your computer name]</li>
	<li>APP=Microsoft® Windows® Operating System</li>
	<li>SERVER=[your server name]</li>
</ul>
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access322.png"><img class="alignnone  wp-image-606" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access322-300x192.png" alt="Create DSN with connection properties" width="405" height="259" /></a>

&nbsp;

Now that we have the connection information and a DSN file we can create a link table in a new Access database.  Let's link to a data source by choosing an ODBC data source.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access27.png"><img class="alignnone  wp-image-295" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access27-300x258.png" alt="Open external data and link to data source" width="403" height="347" /></a>

&nbsp;

Navigate to the DSN file

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access32-01.png"><img class="alignnone  wp-image-605" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access32-01-300x184.png" alt="Navigate to DSN file" width="403" height="247" /></a>

&nbsp;

You'll be prompted for a password.  Use your password from the connection information

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access331.png"><img class="alignnone wp-image-625 " src="https://msdnshared.blob.core.windows.net/media/2016/06/Access331-300x224.png" alt="" width="407" height="304" /></a>

&nbsp;

Once you click Ok you'll be presented with a list of tables from your Access Services database.  Select the table you've created.  You can leave the Save password unchecked and be prompted for the password next time you open the access db.  In this sample I'll check the Save password option.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access30.png"><img class="alignnone  wp-image-316" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access30-300x294.png" alt="Select table and save password" width="391" height="383" /></a>

&nbsp;

&nbsp;

The Linked table is created in the access database.  I hovered over the table to display the database connection properties.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access35.png"><img class="alignnone  wp-image-365" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access35-300x82.png" alt="demonstrates connection properties" width="417" height="114" /></a>

&nbsp;

Open the table in Datasheet mode to view the data in the database and change it.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access31.png"><img class="alignnone  wp-image-325" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access31-300x107.png" alt="Edit data" width="415" height="148" /></a>

&nbsp;

&nbsp;

In this screenshot I'll demonstrate the same data rendering in the Access web application db and the Access db through the linked table.  You can edit the data in either one, hit refresh in the other db, and view the modified data.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/Access36.png"><img class="alignnone  wp-image-375" src="https://msdnshared.blob.core.windows.net/media/2016/06/Access36-300x187.png" alt="Front end and back end with same data" width="412" height="257" /></a>

&nbsp;

In the next two blogs we will use the same Access Services database to expose the data via two different options
<ol>
	<li>A custom web application via Entity Framework.</li>
	<li>Business Connectivity Services via external content types and an external list</li>
</ol>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint Development - Part 3 (KnockoutJs)</title>
      <link>https://docs.microsoft.com/archive/blogs/pinch-perfect/sharepoint-development-part-3-knockoutjs</link>
      <pubDate>Fri, 27 May 2016 22:44:28 GMT</pubDate>
      <dc:creator><![CDATA[Shawn Leonard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/pinch-perfect/?p=76</guid>
      <description><![CDATA[In the previous blog we created and customized a list.    We applied some very basic customization's...]]></description>
      <content:encoded><![CDATA[In the previous blog we created and customized a list.    We applied some very basic customization's to a SharePoint list while leveraging out of the box controls.   In this post we will further extend the usage of Custom Forms building upon the previous example.   In some cases you will be asked to make SharePoint not look or operate like SharePoint.  This example will take advantage of modern development frameworks and the SharePoint REST API's.    I will focus on KnockoutJS and jQuery in this demonstration.  I chose KnockoutJs because of its simplicity in implementing MVVM patterns.  We could easily use AngularJs or another framework.  In a future blog I will focus exclusively on AngularJs 2 for a Provider Hosted Add-In.   I prefer JavaScript because of its ease of use, growing community, and ability to be reused across SharePoint On Premise and SharePoint Online.  I've found KnockoutJs to be a simple enough framework to demonstrate custom solutions and rapidly develop solutions for customers.

<strong>Prerequisites</strong>: Go to <a title="https://github.com/pinch-perfect/development-samples/tree/master/Sample03" href="https://github.com/pinch-perfect/development-samples/tree/master/Sample03" target="_blank">development-samples/Sample03/readme.md</a> for more information to leverage our sample code and configure your SharePoint site.  We will reuse the Infrastructure as Code Binary PowerShell module <a title="https://github.com/pinch-perfect/Infrastructure-As-Code" href="https://github.com/pinch-perfect/Infrastructure-As-Code" target="_blank">https://github.com/pinch-perfect/Infrastructure-As-Code</a> to automate various aspects of this demo.  It will be helpful to follow the previous <a title="SharePoint Development – Part 2 (Customization)" href="https://blogs.msdn.microsoft.com/pinch-perfect/2016/05/27/sharepoint-development-part-2-customization/" target="_blank">blog post</a> as we mimic the Custom form creation for the 3 forms (New, Edit, Display)

<strong>Purpose</strong>: The purpose of this demonstration is to detail the MVVM pattern leveraging KnockoutJs and HTML5.   In this example we enable drag-n-drop associated with specific rich text fields, custom display of the form hyperlinks, and control of the destination for the file uploads.  In this particular example we create folders and upload files into the 'Shared Documents' library.  In the previous post the user was prompted for a destination.  With this we control the destination and how it is stored.  Also of note, this demonstration continues to support up to 2 Gibs per file upload.  We provide a font-awesome spinner to indicate an active upload for the user.

&nbsp;

In this video we will use Infrastructure-As-Code to create a Sample 03 File Upload list with specific columns and upload Site Assets from the Sample03 project.  We will then use SharePoint designer to create custom forms (New, Edit, Display).
<ol>
	<li>First we open PowerShell ISE (ensure you've read the prerequisites) and follow the Sample03/readme.md instructions.</li>
	<li>You'll see the new list provisioned into SharePoint with the individual columns and their properties (Multi-Line, DateTime, Text) and if they are required</li>
	<li>After we run the Cmd-Let to create the list we will create custom forms in SharePoint Designer
<ol>
	<li>I'll use the ellipse in the CEWP to browse to the Site Asset that we uploaded via the Cmd-Let</li>
	<li>I'll then remove the XSL and set the XslLink relative path to the uploaded XSL</li>
	<li>I'll go quickly over this process as it is covered in the previous post</li>
</ol>
</li>
	<li>We will then walk through the "new" user experience with HTML5 controls and KnockoutJs binding</li>
	<li>We maintain the existing SharePoint OOTB control capability with Rich Text and markup</li>
	<li>I am hiding the rich text fields and using a custom div to enable drag-n-drop</li>
	<li>I keep the same PreSaveAction but in this case I place the alert in the DOM for the user to see</li>
	<li>We have customized the display with additional file properties (i.e., file size included Bytes/Megabytes/Gigabytes) in the model.</li>
	<li>We navigate from display to Edit and move a file from one field to another by using the custom 'Remove' command in the HTML control.</li>
	<li>Watch the responsiveness of the browser as we issue asynchronous activities throughout the process.</li>
	<li>If the video does not render the source file is: <a title="https://mix.office.com/watch/1chj3lxmaa387" href="https://mix.office.com/watch/1chj3lxmaa387" target="_blank">https://mix.office.com/watch/1chj3lxmaa387</a></li>
</ol>
[video width="852" height="480" mp4="https://msdnshared.blob.core.windows.net/media/2016/05/How-To-Edit-HTML5-and-KnockoutJs.mp4"][/video]

&nbsp;

<strong>In Summary</strong>:

With minimal effort we can configure and extend the out of the box capabilities with KnockoutJs/jQuery/CSS/Bootstrap.   The focus on this particular blog post is to demonstrate creating custom forms, isolating the XSL into a separate file, leveraging Content Link to inject JavaScript and CSS, and enabling HTML5 specific controls.    We used the InfrastructureAsCode PowerShell module to automate uploading these individual files from Visual Studio into SharePoint.  We could use drag-n-drop to upload files into the Site Assets library or make the modifications directly in the site using SharePoint Designer.    By using Visual Studio we can leverage one of the best IDE's on the market with Extensions for JavaScript, CSS, and HTML development.   With Visual Studio and Intellisense I can program in JavaScript with open documentation from JS frameworks and my individual documented JavaScript files.  We gain source control with version history and can use labels and branching to target a specific builds for a SharePoint site.  We can use these same artifacts on every site to which we deploy.  We can use the site provisioner to configure the lists and fields, deploy the site assets, and pages.    We can make Production, Staging, and Development appear identical.  The greatest gain from using Visual Studio is the ability to label a deployment so if you need to repair something in production while you are working on the next version you can fork the production label, fix the code, deploy to staging (test), and then deploy to production.  By moving our changes away from browser based changes and into automated changes we can ensure the process is repeatable and identical across environments.

&nbsp;

Previous: <a title="SharePoint Development – Part 2 (Customization)" href="https://blogs.msdn.microsoft.com/pinch-perfect/2016/05/27/sharepoint-development-part-2-customization/">SharePoint Development – Part 2 (Customization)</a> | Next: SharePoint Hosted Add-Ins

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>SharePoint Development - Part 2 (Customization)</title>
      <link>https://docs.microsoft.com/archive/blogs/pinch-perfect/sharepoint-development-part-2-customization</link>
      <pubDate>Fri, 27 May 2016 21:36:02 GMT</pubDate>
      <dc:creator><![CDATA[Shawn Leonard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/pinch-perfect/?p=96</guid>
      <description><![CDATA[In the previous blog we created a list and used all out of the box controls.   I can tweak a list...]]></description>
      <content:encoded><![CDATA[In the previous blog we created a list and used all out of the box controls.   I can tweak a list and create libraries, lists, Site Assets, activate features, and more.  That may be sufficient for most users but what if you need form validation or fields that should be auto-populated.   Your user base wants the title to be calculated, group fields, rearrange the fields in a particular order, a field to be hidden unless a user exists in a specific group, or need to present a field in rows.  This is where customization of SharePoint becomes very easy.   We will show you the usage of Custom Forms, XSLLink, Content Link and injecting jQuery.  In a future post we will show you a List Item leveraging Client Side Rendering.  What options do you have to customize?     I like SharePoint Designer but i really love Visual Studio and I'm going to show you both.     In this sample I'll walk you through how to create a custom form (Not modify an existing form) and some techniques that will allow you to leverage source control and short cuts to make your deployment and development life much easier.  The Infrastructure-As-Code Cmd-Lets are meant to automate much of the deployment.  After these videos and the sample code you should be able to configure and customize SharePoint lists.  The Cmd-Lets will allow you to make changes in Visual Studio to XSL, JavaScript, HTML, and CSS files and upload them to your SharePoint site.

<strong>Prerequisites</strong>: Go to <a title="https://github.com/pinch-perfect/development-samples/tree/master/Sample02" href="https://github.com/pinch-perfect/development-samples/tree/master/Sample02" target="_blank">development-samples/Sample02/readme.md</a> for more information to leverage our sample code and configure your SharePoint site.  We will reuse the Infrastructure as Code Binary PowerShell module <a title="https://github.com/pinch-perfect/Infrastructure-As-Code" href="https://github.com/pinch-perfect/Infrastructure-As-Code" target="_blank">https://github.com/pinch-perfect/Infrastructure-As-Code</a> to automate various aspects of this demo.

&nbsp;

In this first video we will use Infrastructure-As-Code to create a Sample 02 File Upload list with specific columns and upload Site Assets from the Sample02 project.  We will then use SharePoint designer to create custom forms.
<ol>
	<li>First we open PowerShell ISE (ensure you've read the prerequisites) and follow the Sample02/readme.md instructions.</li>
	<li>After we have run the Cmd-Let to create the list we will create custom forms.</li>
	<li>First we will create custom forms for the List Actions.
<ol>
	<li>We copy the XSL markup from the CustomDisp.aspx page and place it in an XSL file CustomDisp.xsl in Visual Studio</li>
	<li>We copy the XSL markup from the CustomNew.aspx page and place it in an XSL file CustomNew.xsl in Visual Studio</li>
</ol>
</li>
	<li>We will run the Cmd-Let to upload SiteAssets
<ol>
	<li>We will remove the XSL markup from the CustomNew.aspx page</li>
	<li>We will then use XslLink to point the Data Form Web Part at the CustomNew.XSL file located in the Site Assets library</li>
</ol>
</li>
	<li>If the video does not render the source file is: <a title="https://mix.office.com/watch/bwuc6qngczko" href="https://mix.office.com/watch/bwuc6qngczko" target="_blank">https://mix.office.com/watch/bwuc6qngczko</a></li>
</ol>
[video width="852" height="480" mp4="https://msdnshared.blob.core.windows.net/media/2016/05/How-to-Create-Custom-Form1.mp4"][/video]

&nbsp;

In the second video we will use Visual Studio to make changes the CustomNew.XSL and use SharePoint designer to mark CustomNew.aspx as the default form.  We use PowerShell ISE to run the Set-IaCProvisionAsset Cmd-Let.  I've set the full path to the SiteAssets folder in my source repo folder location.  This allows me to make tiny or massive tweaks in Visual Studio to XSL, JS, CSS and push the files up as often as needed.  We gain massive benefits from Intellisense, Source Control, and VS capabilities.   I can and do reuse this in a continuous integration mantra to automate deployments.
<ol>
	<li>First we will use Visual Studio to move the Last Updated field to the top of the XSL row</li>
	<li>We will use a style=display:none for the Title field to hide it</li>
	<li>We will create a div with ID to write a message to later</li>
	<li>Run the <span class="pl-c1">Set-IaCProvisionAssets</span> <span class="pl-k">-</span>SiteContent <span class="pl-k">$</span><span class="pl-smi">RelativeOrFullPath</span> <span class="pl-k">-</span>Verbose Cmd-Let to upload the new XSL file into the SiteAssets library.</li>
	<li>Once we hit refresh in the browser we can see our changes immediately.</li>
	<li>Highlight the form in the "Forms" pane and click the "Set as Default" ribbon button</li>
	<li>In the video you'll see the form render as it did but we are now using the "new" custom form.</li>
	<li>If the video does not render the source file is: <a title="https://mix.office.com/watch/2t5mkf31ks43" href="https://mix.office.com/watch/2t5mkf31ks43" target="_blank">https://mix.office.com/watch/2t5mkf31ks43</a></li>
</ol>
[video width="852" height="480" mp4="https://msdnshared.blob.core.windows.net/media/2016/05/How-to-Create-Custom-new-form-then-set-as-default1.mp4"][/video]

&nbsp;

In the third video we will use Content Link in a Content Editor Web Part (CEWP) to inject JS libraries on page render and enable an On Load activity.
<blockquote>Note: In the video I use SharePoint Designer to add the webpart but I could do this in the browser if I did not have access to SPD.</blockquote>
<ol>
	<li>We will open the custom form in SharePoint Designer</li>
	<li>To activate the WebPart group we will need to be in a WebPart zone or somewhere in a webpart.</li>
	<li>Once the WebPart group is active, insert the Content Editor Web Part</li>
	<li>We will use the ribbon group to change properties of the CEWP such as the Chrome = None and 'Content Link' to the relative URL to the .html file</li>
	<li>We know the path to the .html file to render JS libraries but If we didn't we could use the ellipse in the SPD 'Content Link' text box to navigate to the file.</li>
	<li>Once we updated the CEWP lets make sure SPD didn't move the XslLink to a separate line (known issue)</li>
	<li>Now we will hit save and navigate to the browser and hit refresh.
<ol>
	<li>Developer Console is opened to display the files being loaded.</li>
	<li>The DOM ready event fires setting our DIV to 'Hello World.  I've run'</li>
</ol>
</li>
	<li> SharePoint list definitions can ensure field requirements and data validation.  However, there may be a variety requirements that out of the box will not meet.</li>
	<li>We will extend the Sample02New.js file with a PreSaveAction() method in the JavaScript file.   SharePoint forms will listen for this function to perform pre-validation.
<ol>
	<li>If the field we check is not filled in then alert the user (you could use many open source JavaScript frameworks for validation)</li>
	<li>If the require field is completed, read the user input field, format it, and create a string to append to the hidden 'Title' field</li>
</ol>
</li>
	<li>If the video does not render the source file is: <a title="https://mix.office.com/watch/a4smzpw5qes5" href="https://mix.office.com/watch/a4smzpw5qes5" target="_blank">https://mix.office.com/watch/a4smzpw5qes5</a></li>
</ol>
&nbsp;

[video width="852" height="480" mp4="https://msdnshared.blob.core.windows.net/media/2016/05/How-to-Edit-Using-SP-Designer.mp4"][/video]

&nbsp;

&nbsp;

<strong>In Summary</strong>:

With minimal effort we can configure and extend the out of the box capabilities.   The focus on this particular blog post is to demonstrate creating custom forms, isolating the XSL into a separate file, and leveraging Content Link to inject JavaScript and CSS.    We used the InfrastructureAsCode PowerShell module to automate uploading these individual files from Visual Studio into SharePoint.  We could use drag-n-drop to upload files into the Site Assets library or make the modifications directly in the site using SharePoint Designer.    By using Visual Studio we can leverage one of the best IDE's on the market with Extensions for JavaScript, CSS, and HTML development.  We gain source control with version history and can use labels and branching to target a specific builds for a SharePoint site.  We can use these same artifacts on every site to which we deploy.  We can use the site provisioner to configure the lists and fields, deploy the site assets, and pages.    We can make Production, Staging, and Development appear identical.  The greatest gain from using Visual Studio is the ability to label a deployment so if you need to repair something in production while you are working on the next version you can fork the production label, fix the code, deploy to staging (test), and then deploy to production.  By moving our changes away from browser based changes and into automated changes we can ensure the process is repeatable and identical across environments.

&nbsp;

Previous: <a title="SharePoint Development – Part 2 (Configuration)" href="https://blogs.msdn.microsoft.com/pinch-perfect/2016/05/27/sharepoint-development-part-2-configuration/">SharePoint Development – Part 2 (Configuration)</a> | Next: <a title="SharePoint Development – Part 3 (KnockoutJs)" href="https://blogs.msdn.microsoft.com/pinch-perfect/2016/05/27/sharepoint-development-part-3-knockoutjs/">SharePoint (KnockoutJs, HTML5, jQuery)</a>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint Development - Part 2 (Configuration)</title>
      <link>https://docs.microsoft.com/archive/blogs/pinch-perfect/sharepoint-development-part-2-configuration</link>
      <pubDate>Fri, 27 May 2016 19:22:54 GMT</pubDate>
      <dc:creator><![CDATA[Shawn Leonard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/pinch-perfect/?p=75</guid>
      <description><![CDATA[Out of the box is good experience.  You gain security trimming, web controls, grids, searching,...]]></description>
      <content:encoded><![CDATA[Out of the box is good experience.  You gain security trimming, web controls, grids, searching, field controls.  Immediately with out of the box and some configuration you gain instant access to rapid application development/prototyping.

We will take the InfoPath concept from the previous post and create a definition of a list with similar field types.  The biggest difference between InfoPath and this demonstration leveraging a SharePoint OOTB custom list is that this sample will support uploads up to 2Gibs per file.  It requires no knowledge of InfoPath and the nuances of its IDE.  The configuration to the out of the box list template will support hundreds of attachments, up to your Site quota.  All without having to write a single line of code.

The <a title="https://github.com/pinch-perfect/development-samples/blob/master/Sample01/README.md" href="https://github.com/pinch-perfect/development-samples/blob/master/Sample01/README.md" target="_blank">development-samples<span class="separator">/</span>Sample01<span class="separator">/</span>README.md</a> for the Sample01 project will outline how to clone the project locally and configure it to run.   Once the PowerShell cmd-lets are run you will see the configured list with fields in your SharePoint site.  This is absolutely Out of the Box and provides a good amount of control and usage.  It may be great for many use cases but there may be a time when you'll need to tweak this and go for more in depth capability.  We will delve into that in the next post.   In the meantime here is a video.

[video width="852" height="480" mp4="https://msdnshared.blob.core.windows.net/media/2016/05/Out-of-the-box-controls.mp4"][/video]

<a title="https://mix.office.com/watch/fy22hj4wxysy?lcid=1033" href="https://mix.office.com/watch/fy22hj4wxysy?lcid=1033" target="_blank">https://mix.office.com/watch/fy22hj4wxysy?lcid=1033</a>  you can download a more pristine version with Office Mix.

&nbsp;

<a title="SharePoint Development – Part 1 (InfoPath)" href="https://blogs.msdn.microsoft.com/pinch-perfect/2016/05/27/sharepoint-development-part-1-infopath/" target="_blank">Previous: SharePoint development (InfoPath)</a>  | <a title="SharePoint Development – Part 2 (Customization)" href="https://blogs.msdn.microsoft.com/pinch-perfect/2016/05/27/sharepoint-development-part-2-customization/">Next: Customization of Out-of-the-Box</a>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint Development - Part 1 (InfoPath)</title>
      <link>https://docs.microsoft.com/archive/blogs/pinch-perfect/sharepoint-development-part-1-infopath</link>
      <pubDate>Fri, 27 May 2016 17:21:15 GMT</pubDate>
      <dc:creator><![CDATA[Shawn Leonard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/pinch-perfect/?p=65</guid>
      <description><![CDATA[InfoPath 2010/2013 was a promising platform which allowed non-developers to enable and...]]></description>
      <content:encoded><![CDATA[InfoPath 2010/2013 was a promising platform which allowed non-developers to enable and deploy amazing things.  You could create minor applications or major enterprise applications with InfoPath.  The back end is XML which was an ultra portable file format.  The integration with SharePoint made this a fantastic way to design forms, design workflow, attach binary, and collect digital signatures.  With XML you could push this to an organizational record management system or transform the result data however you saw fit.  You could push it to a SQL database and leverage XQuery or other techniques to run reporting.   However, Form Services never panned out to be user friendly.  A SharePoint patch caused your working form to collapse or a workstation patch caused your InfoPath Designer or Client to stop functioning correctly.   You developed InfoPath forms with conditional formatting, binding, new schema updates, and versions.  You developed various techniques to manage and work with InfoPath but it never felt "programmer friendly".    This part of the development strategy is not to show you how to develop for InfoPath but to start the dialog on how to progress away from InfoPath using a real world example.    This particular example is a mock-up of an actual application that ran into web server, configuration, and authentication limitations.  It began as a promising development experiment but quickly became frustrating to users and developers (i.e., Server limitations, File attachment size limitations, User profile integration, and security based conditional activities.)   We will use the succeeding posts to project the form into a full application.

(<a title="https://github.com/pinch-perfect/development-samples/tree/master/InfoPath" href="https://github.com/pinch-perfect/development-samples/tree/master/InfoPath" target="_blank">source post and documentation</a>)
<div>The intent of this form was to collect metadata with attachments (i.e., MS Word, MS PowerPoint, and/or other files.)  The aggregate of this metadata and the files were submitted for approval via workflow.</div>
<div></div>
<div><img src="https://raw.githubusercontent.com/pinch-perfect/development-samples/master/InfoPath/imgs/infopath-sample1.PNG" alt="Sample Form" width="500" /></div>
<figure><figcaption>The sample InfoPath form</figcaption></figure>&nbsp;
<div>InfoPath is based completely on a XML with a well defined schema. The IDE is easy to use and allows you to rapidly create fields and mappings.</div>
<figure><img src="https://raw.githubusercontent.com/pinch-perfect/development-samples/master/InfoPath/imgs/infopath-schema.PNG" alt="" width="500" /><figcaption>The XSD markup drives the strict XML output</figcaption></figure>&nbsp;
<div>The output of the form is raw XML with various namespaces that InfoPath and SharePoint use to render and process the XML.</div>
<figure><img src="https://raw.githubusercontent.com/pinch-perfect/development-samples/master/InfoPath/imgs/infopath-samplexml.PNG" alt="" width="500" /><figcaption>Note the core XML structure appears as the XSD has defined it.</figcaption></figure>&nbsp;
<div>InfoPath leverages Extensible Stylesheet Language (XSL) to transform the XML into a view.  XSL is the backbone of many SharePoint Add-Ins and continues to be the core backbone for rendering components of SharePoint into HTML.  We will navigate through each sample to identify similiar capabilities with development:</div>
<ol>
	<li>XSD/XML schema = List Definition</li>
	<li>XSL = Convert list schema to HTML via DataViewWebParts/ListViewWebParts</li>
	<li>Conditional binding and controls = SharePoint web controls and jQuery</li>
</ol>
<div></div>
<figure><img src="https://raw.githubusercontent.com/pinch-perfect/development-samples/master/InfoPath/imgs/infopath-samplexsl.PNG" alt="" width="500" /><figcaption>The XSL transforms the XML into a specific view in the InfoPath form</figcaption></figure>&nbsp;

<a title="SharePoint Development Overview" href="https://blogs.msdn.microsoft.com/pinch-perfect/2016/05/27/sharepoint-development-overview/">Previous: SharePoint Development Overview</a> | <a title="SharePoint Development – Part 2 (Configuration)" href="https://blogs.msdn.microsoft.com/pinch-perfect/2016/05/27/sharepoint-development-part-2-configuration/">Next Step: Out of the Box</a>]]></content:encoded>
    </item>
  </channel>
</rss>