Showing posts with label SharePoint Customization. Show all posts
Showing posts with label SharePoint Customization. Show all posts

10/30/2018

SharePoint Calculated Columns – Convert a Month Name to a Number

Here are three solutions for when you have a column with a three letter abbreviation of a month name, and you want the month number,

Each of the following assume that you have a "Single Line of Text" or "Choice" column named "Month".


A long IF statement:

IF([Month]="JAN",1,
  IF([Month]="FEB",2,
    IF([Month]="MAR",3,
      IF([Month]="APR",4,
        IF([Month]="MAY",5,
          IF([Month]="JUN",6,
            IF([Month]="JUL",7,
              IF([Month]="AUG",8,
                IF([Month]="SEP",9,
                  IF([Month]="OCT",10,
                    IF([Month]="NOV",11,
                      IF([Month]="DEC",12,
                        0
  ))))))))))))


Using the FIND() Function:

=(
   FIND(
           UPPER(D2),
            "   ,JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC")
       ) -1 
 ) / 4

FIND returns the position of the matching text. "JAN" returns five. If we subtract one and then divide the FIND number by four, we get the month number.


Finding the Month Number Using Three or More Month Letters

=(
   FIND(
            UPPER(Month),
            "         ,JANUARY  ,FEBRUARY ,MARCH    ,APRIL    ,MAY      ,JUNE     ,JULY     ,AUGUST   ,SEPTEMBER,OCTOBER  ,NOVEMBER ,DECEMBER "
       )  -1
 ) / 10

This uses the same idea, but the month names are spelled out and are padded with spaces to make each one nine characters long. (Ten with the commas.)

Here’s the result:

MonthNumber



Now available on Amazon!

image

10/15/2018

SharePoint Calculated Columns and Validation Formulas – The Book!


Available on Amazon!


It only took me a year… and it grew from a little booklet to over 200 pages… but its finally done!

Bought the book? Post any questions, bugs, typos and suggestions to this blog post!


Everything you need to know about SharePoint formulas for SharePoint 2010 to 2019 and SharePoint Online / Office 365!

image

This book is for the SharePoint “power user” who needs a better understanding of how SharePoint formulas work, where they don’t work, and how they are created. While at first glance SharePoint formulas appear to be simple calculations, they are both quite powerful and have weird limitations. In this book we will explore the basics of creating Calculated Columns and Validation formulas with some boring details, and over one hundred examples. We also explore workarounds for many of the limitations by using SharePoint Designer workflows and a few tricks!

 

Over 100 Examples!

A how-to book of formulas would not be too useful without a few examples. I've been collecting these for years. They've come from classroom questions, forum questions, and my own SharePoint sites. Now they are all in one place…

  • · Over 60 Calculated Columns examples
  • · Over 30 Column Validation examples
  • · 11 List/Library Item Validation examples
    (and every one of the Column Validation examples can be used here.)
  • · 7 Calculated Column Default Values examples
  • · 15 Workflow “workarounds” for things SharePoint formulas can’t do

Scroll on down for a complete list of the examples.


Who is this book for?

Anyone who creates and customizes lists and libraries. These include: SharePoint on premise Farm Administrators, Office 365 SharePoint administrators, Site Collection Administrators, Site Owners, Power users, and Developers.

 

Where are formulas used in SharePoint?

  • Calculated column formulas derive data from other columns in the same list item. These can be simple calculations and text manipulations, or complex Excel-style formulas.
  • Column validation formulas are used to create custom validations for user entered data. These can be used to make sure that "quantities" are not negative and vacation requests are for dates in the future.
  • Column default formulas, while very limited, can auto-fill columns with a date 30 days in the future or a message based on the month or day of the week the item was added.
  • List / Library validation formulas are used to check the values from multiple columns to verify the relationship between two or more columns. Examples include making sure a task start date is before the task end date, or to make sure an entry has a "price per pound" or a "price each", but not both.


Workflow Workarounds?

SharePoint formulas only work with a few column types while SharePoint workflows can access just about any column type. So, with a little workflow work your formulas can make these columns available to SharePoint formulas. There's over fifty pages of workflow workaround tips:

  • Workaround for People and Groups
  • Getting Data from a Person or Group Column
  • Getting a User’s Manager
  • Workaround for the SUBSTITUTE Function
  • Workaround for Getting View Totals from Calculated Columns.
  • Workaround for Adding Images to a Column
  • Workaround for Multiple Lines of Text
  • Workaround for Lookup Columns
  • Lookup a Single Item (No checkboxes)
  • Extract Several Lookup Columns into a Single Line of Text
  • Workaround for Multivalued Choice Columns
  • Counting Items Selected in a Multivalued Column
  • Workaround for Managed Metadata columns
  • Workaround for Single Valued Managed Metadata Columns
  • Workaround for Multi Valued Managed Metadata Columns
  • Workarounds for Attachments

 

Table of Contents

  • Read Me First
  • Tips for Formulas
  • Calculated Columns
  • Calculated Column Examples
  • Calculated Default Columns
  • Column Validation Formulas
  • Column Validation Examples
  • List/Library Item Validation
  • List/Library Item Validation Examples
  • Other Forms of Validation
  • Workflow Workarounds
  • Error Messages


Examples:

Calculated Column Examples:·

·        Fun stuff that may not work for you:

o   Add HTML to a Calculated Column

o   Add icons or pictures to a Calculated Column

o   Building an Address (String Concatenation)

o   Create a Bar Chart Column

·        Columns for Views

o   View Filtering on a Calculated Column

o   Group by Year

o   Group by Month and Year

o   Group by Year Plus Month

o   Grouping on an Algorithm

·        Numbers

o   Adding Leading Zeros to a Number

o   Scientific Notation

o   Roman Numerals

·        The IF Function and Boolean Logic

o   Calculating a Discount using Nested IFs

o   Working Around Nested IF Limits

o   Convert from State Codes to State Names

o   ANDs and ORs - Approve if all approved, or reject if any one rejects

·        Test for values

o   Testing for a Range of Dates

o   Testing for Empty Columns

o   Testing for Errors

·        Summing and Counting Columns

o   Counting Yes/No Columns

o   Average

o   MIN and MAX

·        More on Numbers

o   Raise a Number to a Power

o   Rounding Numbers

·        Working with Text

o   Combining Text Columns

o   Display First Name and Last Name in a Single Column

o   Creating Title Capitalization

·        Return the Right Data Type!

·        Dates

o   Subtracting Dates

o   Finding a Date One Year in the Future

o   Change Date Formatting

o   Fiscal Year

o   Week Number

o   Day of the Year

o   First Day of the Current Month

o   First Day of the Next Month

o   Last Day of the Current Month

o   Last Day of the Previous Month

o   Last Day of the Next Month

o   Third Tuesday of a Month

o   Skipping Weekend Days

o   Next Workday “X” Days in the Future

o   Simple Solutions for 5, 10, 15 Working Days in the Future

o   Solution for Any Number of Working Days in the Future

o   Working Days

o   Number of Working Hours Between Two Dates

·        Formatting and Conversions

o   Formatting Numbers

o   Adding Text to Numbers

o   Adding Special Symbols (¥, £, etc.) to TEXT() Number Formats

o   Converting Numbers to Fractions

o   Financial Calculations

·        Random Numbers and Messages

o   Creating Random Numbers (Using NOW)

o   Creating Random Messages (using CHOOSE)

·        A Calculated Task Status

·        Great Circle Distance from Longitude and Latitude

·        Simplify a Workflow by Using a Calculated Column

Column Validation Examples

·        Limit time for user updates.

·        Boolean operations

o   Examples Using “OR”

o   Examples Using “AND”

o   Examples Using “AND” and “OR”

o   Examples Using “NOT”

·        Testing for Empty Columns

o   Yes/No

o   Dates

o   ISBLANK()

·        Working with Dates

o   Date Must be in the Future

o   Date Must be in the Future “x” Days

o   Date Must be in the Future “x” Days and not on a Weekend

o   Test Against a Specified Date

o   Date Must be Between Now and the End of the Current Year

o   Date Must be Within the Next 30 days

o   Date Must be the Last Day of the Month

o   Date Must be the First Day of the Month

o   Date Must be the Third Tuesday of the Month

o   Date Can Only be a Weekday

o   Date Can Only be Monday or Wednesday

o   Entered Date Must be for this Year

o   Date Must be Current Or Next Month Only

·        Working with Numbers

o   Testing for Numbers in Custom Increments

o   Limit the Number of Decimal Places Entered

·        Working with Text

o   Testing for Text Length

o   Testing for a Valid State/Province (or other code)

o   Test to Require an Uppercase or Lowercase Letter 

·        Examples Using Pattern Matching

o   Must start with an "a" or "A" and the third character must be a "c" or "C"

o   Match a Phone Number Pattern of xxx-xxx-xxxx

o   Match a Phone Number Pattern of xxx-xxx-xxxx and Limit the Length

o   Match a Phone Number and Make Sure Only Digits Have Been Used


And many more!

3/29/2018

Shorter SharePoint Calculated Column OR Statements

Tested in SharePoint 2010, 2013, 2016 and Online.


Array Constants

Excel will often let you use an array of values where you would normally use a range of cells.

The Excel version:

=VLOOKUP( [StatusCode], 
{"a","Active";"i","Inactive";"c","Closed"}, , 2, 0 )

The array constant part of the formula is from “{“ to “}” and represents a two dimensional table. The Excel range equivalent to this array looks like this:

    image


But…

While that is kind of cool, it does not always work in SharePoint Calculated Columns. One place it does work is with an OR function where it works much like the “IN” keyword in other technologies. The following two functions are equivalent:


=IF( OR( StateCode="OH", StateCode="KY", StateCode="IN", StateCode="IL" ),
"Central Region", "Other" ) =IF( OR( StateCode = {"OH","KY","IN","IL"} ), "Central Region", "Other")

(If you see this anywhere other than at TechTrainingNotes.blogspot.com, it was stolen and used without permission!)


Both of the above produce this result:

    image

Pretty cool!

3/26/2018

Adding Fractions (1/4) to SharePoint Calculated Columns

(The following works SharePoint 2010, 2013, 2016, SharePoint Online, and most likely, 2019!)

0, 1/8, 1/4, 3/8, 1/2, 5/8, 3/4, and 7/8


This is a sample from my soon to be published book “SharePoint Calculated Columns and Validation Formulas”. If you would like to see a lot more about what you can do with Calculated Columns, and maybe win a free book, attend my session at SharePoint Cincy 2018 on April 10th!
image

In Excel you can get fractions using =TEXT(yourNumberColumn,"# ?/?"):   

image

The same function in SharePoint will round off the number, and for each of the above values, return 5. If you need fractions then you will need to write your own function to create them. Below we have several versions of this function depending on the fractions and formatting needed.

   image


Function to return the fractions 0, 1/4, 1/2, and 3/4

Note: Read to the end to see a shorter version that uses CHOOSE instead of nested IFs.

Just a couple of nested IFs…

=IF( yourNumberColumn - INT(yourNumberColumn) = 0.25,
          INT( yourNumberColumn) & " 1/4",
   IF( yourNumberColumn - INT(yourNumberColumn) = 0.5,
           INT( yourNumberColumn) & " 1/2",
     IF( yourNumberColumn - INT(yourNumberColumn) = 0.75,
              INT( yourNumberColumn) & " 3/4",
         INT(yourNumberColumn) ) ) )

The above formula only works if the entered values end in exactly 0, .25, .5 and .75. If you need your function to round off to the nearest 1/4th, replace the first value in each IF with:

    ROUND( yourNumberColumn * 4, 0 ) / 4


=IF( ROUND( yourNumberColumn*4, 0 ) / 4 - INT(yourNumberColumn) = 0.25,
     INT(yourNumberColumn) & " 1/4",
   IF( ROUND(yourNumberColumn * 4, 0 ) / 4 - INT(yourNumberColumn) = 0.5,
       INT(yourNumberColumn) & " 1/2",
     IF( ROUND(yourNumberColumn * 4 , 0 ) / 4 - INT(yourNumberColumn) = 0.75,
         INT( yourNumberColumn) & " 3/4",
         ROUND( yourNumberColumn,0) ) ) )


If you would like to see ¼ instead of 1/4 then use the CHAR function to get those symbols. While the ¼, ½, and ¾ characters are available, 1/3 and 1/8 are not.

  • Replace " 1/4" with " " & CHAR(188)
  • Replace " 1/2" with " " & CHAR(189)
  • Replace " 3/4" with " " & CHAR(190)
=IF( ROUND( yourNumberColumn * 4, 0 ) / 4 - INT(yourNumberColumn) = 0.25,
     INT(yourNumberColumn) & " " & CHAR(188),
   IF( ROUND(yourNumberColumn * 4, 0 ) / 4 - INT(yourNumberColumn) = 0.5,
       INT(yourNumberColumn) & " " & CHAR(189),
     IF( ROUND(yourNumberColumn * 4, 0 ) / 4  -INT(yourNumberColumn)=0.75,
         INT( yourNumberColumn) & " " & CHAR(190),
         ROUND( yourNumberColumn, 0 ) ) ) )



Function to return the fractions 0, 1/8, 1/4, 3/8, 1/2, 5/8, 3/4, and 7/8

To add support for eighths we need to add four more IFs. If we change the number used in our rounding code from 4 to 8, and add a few lines, then web can display values to the nearest eighth.

=IF( ROUND(yourNumberColumn * 8, 0 ) / 8 - INT(yourNumberColumn) = 0.125,
       INT(yourNumberColumn) & " 1/8",
   IF( ROUND(yourNumberColumn * 8, 0 ) / 8 - INT(yourNumberColumn) = 0.25,
         INT(yourNumberColumn) & " 1/4",
     IF( ROUND(yourNumberColumn * 8, 0 ) / 8 - INT(yourNumberColumn) = 0.375,
            INT(yourNumberColumn) & " 3/8",
        IF( ROUND(yourNumberColumn * 8, 0 ) / 8 - INT(yourNumberColumn) = 0.5,
              INT(yourNumberColumn) & " 1/2",
           IF( ROUND(yourNumberColumn * 8, 0 ) / 8 - INT(yourNumberColumn) = 0.625,
                 INT(yourNumberColumn) & " 5/8",
              IF( ROUND(yourNumberColumn * 8, 0 ) / 8 - INT(yourNumberColumn) = 0.75,
                    INT(yourNumberColumn) & " 3/4",
                 IF( ROUND(yourNumberColumn * 8, 0 ) / 8 - INT(yourNumberColumn) = 0.875,
                      INT(yourNumberColumn) & " 7/8",
    ROUND(yourNumberColumn, 0 ) ) ) ) ) ) ) )


Now we have fractions to the nearest 1/8th.

     image


A Much Shorter Version that uses CHOOSE

Here is a much shorter version of a formula to display a number as a fraction:

=ROUNDDOWN( yourNumberColumn + 0.062499, 0 ) &
  CHOOSE( ( ROUND( yourNumberColumn * 8, 0 ) / 8 
            - INT(yourNumberColumn) ) * 8 + 1,
          ""," 1/8"," 1/4"," 3/8"," 1/2", " 5/8", " 3/4", " 7/8",""
        )

This uses CHOOSE to pick the text to display for “less than 1/8th”, “1/8th” … “7/8th” and “more than 7/8th”. (Nine possible values.)

To get the fraction:

  1. Round the number to the nearest 1/8th:
        ( ROUND( yourNumberColumn * 8, 0 ) / 8 - INT(yourNumberColumn) ) * 8
  2. And as CHOOSE starts with 1 and not 0, add one to the result:
        ( ROUND( yourNumberColumn * 8, 0 ) / 8 - INT(yourNumberColumn) ) * 8 + 1
  3. Use CHOOSE to pick the text:
        CHOOSE( … , ""," 1/8"," 1/4"," 3/8"," 1/2", " 5/8", " 3/4", " 7/8","")
  4. Concatenate that to the rounded down number:
        ROUNDDOWN( yourNumberColumn + 0.062499, 0 ) & …
    The “+ 0.062499” is added to deal with the last 1/16th after “7/8th” so we round up to the next higher number.





image

.

1/15/2018

Adding HTML to SharePoint Columns – Color, Images and More – Round 2!


Back in June Microsoft announced they were blocking HTML created by Calculated Columns with the June 2017 Public Update (PU) for SharePoint 2013, 2016 and SharePoint Online.

See here: http://techtrainingnotes.blogspot.com/2017/12/no-more-html-in-sharepoint-calculated.html

Before the June update:

image

After the June update:

image


You can turn this new “feature” off using PowerShell… but only for on-prem.

https://support.microsoft.com/en-us/help/4032106/handling-html-markup-in-sharepoint-calculated-fields

$wa = Get-SPWebApplication http://yourWebAppUrl
$wa.CustomMarkupInCalculatedFieldDisabled = $false
$wa.Update()

Repeat for each web application as needed.


There’s a workaround!

There's a fairly simple solution that works in all versions, if you don't mind using a workflow.

  1. Edit the Calculated Column with the HTML and change it's "The data type returned from this formula is" back to "Single Line of Text". (Just change the result type... leave the column as a Calculated Column.)
  2. Create a new Multiple Lines of Text column and set it to "Enhanced rich text (Rich text with pictures, tables, and hyperlinks)".
  3. Create a workflow that simply copies the Calculated Column to the new Multiple Lines of Text column. Set the workflow to run on Created and Changed.
  4. Edit your views to hide the Calculated Column and add the Multiple Lines of Text column.

The workflow is just a single Set Field in Current Item action.

imageimage

Set the “field” to the new Multiple Lines of Text column and set “value” to the Calculated column. Publish and test!

This solution will let you keep the Calculated Column for easy revising of the formula logic. You could also let the workflow do all of the work to create the logic and HTML using a String Builder, and eliminate the need for the Calculated Column.


Update the Existing Items

You now need to get the workflow to run on all of the existing items. You can run a PowerShell script to start the workflows, you can run a PowerShell script just to copy the data from the Calculated column the new column, you can manually run the workflows on each item, or if you don't mind the Modified date and Modified By being changed switch to the Quick Edit view and copy all the items in one column and then paste them right back.


After the workaround:

image

What does not work?

Script tags and Style tags. (and I’m sure there are a few more) Style blocks are emptied and script blocks are completely removed. But, basic HTML for hyperlinks, image tag, etc. still work.

Before: <style>#test { color:red }</style><script>alert(1)</script> more HTML…

After: <style></style> more HTML…

.

11/24/2017

SharePoint: Running JavaScript Code Only When in Page Edit Mode


One of my old Content Editor Web Part “tricks” would not work when run in a Publishing page. I was hiding a web part when not in Page Edit mode. You can detect this mode by checking for ‘PageState.ViewModeIsEdit != "1"’. The PageState object is automatically created in normal site pages (“Wiki Pages”). It is also created in Publishing Pages, but only when the page has not been published. I.e. when the page is checked out, or in edit mode.

My code originally looked like this:

  if ( PageState.ViewModeIsEdit != "1" )
  {  …code to run when not in edit mode… }


As the PageState object does not exist in a Published page, I had to change it to this:

  if ( typeof PageState == 'undefined' || (PageState.ViewModeIsEdit != "1") )
  {  …code to run when not in edit mode… }


Of course… none of the above works in SharePoint Online “Modern UI” pages!


.

11/17/2016

Creating Random Numbers in SharePoint Calculated Columns

 

One of my examples for tonight’s Cincinnati SharePoint User Group meeting! See you there!

 

I wanted to add a "motivational" message to a list of new sales. To be "fair" (i.e. I did not want to think and create a good algorithm!) I wanted the messages to be random. Something like this:

   image

But… Calculated Columns do not support the Excel RAND() or RANDBETWEEN() functions.

 

So, how to get a random number???

Calculated columns do support the =Now() function. This returns a numeric value that represents the current date and time. If formatted as a Date, or Date and Time, then you will see the current date. But, if you format it as Single Line of Text you will see something like: 42,691.3977137731, or a few seconds later: 42,691.3983521875. The last number starts to look like a random number! And if accurate, it changes every .0000000001 of a day, or about every 0.00000864 seconds. Close enough for me.

 

Get a random number between 0 and 9.

This one looks easy, just pull off the last digit from NOW()!

    =RIGHT( NOW() ,1)

But.. there’s one flaw with this… The last digit of a fractional value is never zero!  (I.e. you will never see .111111110 unless custom formatted.)

So we need to pull off the next to last digit!

  =LEFT( RIGHT( NOW() ,2) ,1 )

image

image

 

Get a random number between 1 and 5

With just a little math we can limit the range a bit. As we don’t want the zero value we can skip the LEFT function for this one.

   =ROUND( RIGHT( NOW()) / 2+0.5 ,0)

   image

Here’s a sample:

   image

 

Get a random number between 0 and 999.

If you need bigger numbers, just return more digits:

    =RIGHT(NOW(),3)

As RIGHT creates a string (text), you will get leading zeros (“012”). To remove the leading zeros just do some math!

    = 0 + RIGHT(NOW(),3)

   image

But… (there’s always a “but”), this will never return a value that ends with a zero. So… back to the LEFT function:

    =LEFT( RIGHT(NOW(),4), 3)

I.e. get the left three of the right four digits…

image

 

Random Messages?

This little exercise started out to create random messages. All we need to do is combine a random number with the CHOOSE function. As CHOOSE starts with item 1 and not item 0, we will need to add one to the random number.

   =CHOOSE( LEFT( RIGHT( NOW() ,2), 1) + 1, "Good Job", "Wow!", "Good Work", "Thanks!", "Could be better",
                      "Gold star for you!", "a free coffee for you!",":-)", "You are the MAX!","Do it again!" )

image

 

Notes

  • These are not guaranteed to be mathematically pure random numbers!
  • The values depend on the exact instant that an item is added to a list and will change with each edit. (But will not change with each view.)

.

8/20/2016

Hide the Windows Explorer Button in SharePoint Libraries

 

Tested in SharePoint 2013, 2016 and SharePoint Online.

 

The Windows Explorer view of a SharePoint library has so many issues that I'm often asked to hide it. Turns out that this is pretty easy to do. Two solutions:

  • Create a SharePoint Feature and deploy it to the desired site collections.
  • Add CSS to your master page, or to selected view pages.

 

Create a SharePoint Feature and deploy it to the desired site collections

This is the best solution! And it's been documented elsewhere: https://blogs.msdn.microsoft.com/tejasr/2010/07/19/how-to-remove-open-with-windows-explorer-button-from-document-librarys-ribbon-menu/

I would only add one more step to this solution… make sure the WSP file does not include an unneeded DLL so the solution can be deployed to SharePoint Online. (No code allowed!) The one extra step: In the project's Properties panel click "Include Assembly in Package" and change it to False.

Once the Feature has been installed in the Site Collection, just visit each subsite and activate the feature. This will impact all libraries in the site.

 

Add CSS to your master page, or to selected view pages

Add one little piece of CSS to your master page, or open SharePoint Designer and edit the library's views to add a CSS block and the button will disappear. If added to the master page then this will impact every library in the site. If added to a view page, then it will impact only that view.

This CSS will not work with the SharePoint Online “New Library Experience”. But then the new “experience” does not currently include a link for Windows Explorer!

The CSS:

<style type="text/css">
  #Ribbon\.Library\.Actions\.OpenWithExplorer-Small {
    display: none;
  }
</style>

Note: The backslashes have been added to the ID due to the non-standard naming convention that uses periods.

If you would like site owners to still be able to see the button then wrap additional CSS in a SharePoint:SecurityTrimmedControl. Note that this control can only be added directly to a page, typically using SharePoint Designer. It will not work if added to a Content Editor Web Part.

<style type="text/css">
  #Ribbon\.Library\.Actions\.OpenWithExplorer-Small {
    display: none;
  }
</style>
<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="ManageWeb">
  <style type="text/css">
    #Ribbon\.Library\.Actions\.OpenWithExplorer-Small {
      display: inline;
    }
  </style>
</SharePoint:SPSecurityTrimmedControl>

 

.

7/29/2016

SharePoint Online / Office 365 “Modern Library” Blank Pages

 

One of my PCs cannot display any of the new “Modern Lists / Library Experience” pages, including the OneDrive for Business pages. The pages are just blank. The issue turned out to be a URL that was in one of my blocked lists that is used to load a JavaScript library used by these new pages:
<script type="text/javascript" src="https://spoprod-a.akamaihd.net/files/odsp-next-prod_ship-2016-07-18_20160720.003/require-951f856e.js">

Removing akamaihd.net from my blocked list let these pages work again. The weird part is that this was only an issue in Internet Explorer 11. The pages loaded fine when using FireFox.

 

About the “Modern Library” Pages

These pages are almost completely generated from JavaScript, not HTML embedded in the page. If you use IE’s View Source command you will find that these pages are actually a bit weird, at least from an HTML point of view. The W3 validator page (http://validator.w3.org/check) has nothing nice to say about these pages!

  image

The page as delivered, before the JavaScript runs, basically looks like this:

  • A DOCTYPE directive that says the following is XHTML (but the W3 validator has issues with this):
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  • An HTML tag that includes two meta tags and a number of <script> tags:
      <html dir="ltr" lang="en-US"><meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    • A meta tag (outside of the HTML and HEAD tags!):
        <meta name="viewport" content="width=device-width,   …   />
    • A link tag to an icon:
        <link rel="shortcut icon" href="_layouts/15/images/favicon.ico   …   />
    • Seven script blocks, one of which points to an external source:
        <script …. ></script>
    • There are no <HEAD> tags!
  • An end HTML tag:
       </html>
  • An then an empty <BODY> tag:  (And I thought this had to be between <HTML> and </HTML>!)
      <body>   </body>
  • And then several <script> tags (again outside of <HTML> … </HTML>!):
      <script …. ></script>

 

Oh, customizers take note, the traditional SharePoint master pages are not used here! There go all of our customizations… so far anyway.

 

.

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.