Microsoft MVP Community Camp 2015

 

Microsoft MVPs in the Asia region continues with various events in 2015.  The first event is the MVP Community Camp held at the start of the year. 

 

Melbourne's starts "today" on January 30.

Sydney's will be the next Friday on February 6.

https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032610278&Culture=en-AU&community=0

There are two tracks:

MS Technologies for Business

 

In-depth with Azure

Register for free here

https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032610278&Culture=en-AU&community=0

While I won't be presenting a session, I'll be hanging around with the other MVPs across the Microsoft stack answering questions. 

 

Ask me anything about:

  • Office 365
  • SharePoint
  • TypeScript
  • JavaScript
  • WindowsPhone
  • Microsoft Band
  • XBox One
  • Windows 10

Quick - TSQL select XPath from XML Data Type with namespace

 

Examples on MSDN shows the full TSQL syntax for XPath query in a TSQL statement, this has been supported since SQL Server 2008.

SELECT CatalogDescription.query(' declare namespace PD="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; <Product ProductModelID="{ /PD:ProductDescription[1]/@ProductModelID }" /> ') as Result FROM Production.ProductModel

This returns:

<Product ProductModelID="19"/>
<Product ProductModelID="23"/>

Wildcard in XPath Query

This is a much easier syntax with Wildcards that isn't well know.

SELECT CatalogDescription.query('/*:ProductDescription[1]/@ProductModelID') as Result
FROM Production.ProductModel

This returns:

19
23

Plenty of people will tell you using Wildcard matches in XPath is the worst thing in the world.  But I think if you just want to do a quick query, this is fine.

So, this is what can happen if you hack SP javascript files

 

SharePoint 2010's April 2014 CU introduced a bug with copy and paste. 

Bform.debug.js 381,869 11-Feb-2014 12:37
Bform.js 249,012 30-Jan-2014 16:39
Form.debug.js 211,134 11-Feb-2014 12:37
Form.js 126,783 30-Jan-2014 16:39

 

This was fixed and released in SharePoint 2010's August 2014 CU.
http://support.microsoft.com/kb/2760757

Bform.debug.js 381,888 15-Jul-2014 11:17
Bform.js 249,022 15-Jul-2014 11:17
Form.debug.js 211,153 15-Jul-2014 11:17
Form.js 126,793 15-Jul-2014 11:17

 

Story

On December 10, 2014, before we patched to the August 2014 CU level.  A certain very naughty person (me) couldn't wait and decided to offer a quick hack to the Javascript for the users over the holidays.  He even did a bak backup file of the original Form.js

 

image

 

We have now applied the August patch, but unfortunately, you can see:

bform.js, bform.debug.js, form.debug.js all updated.

Form.js is NOT updated.

Copy and paste still doesn't work in our environment.

 

Oops.

 

While a cheating way would be that we install the patch on another environment, and copy the correct Form.js file over. 

We'll be experimenting in this dev environment to see what is the best way to revert and go back to the supported path.  Stay tuned for a follow up article.