SharePoint 2013 stand-alone installation error: "The SDDL string contains an invalid sid or a sid that cannot be translated"

When installing SharePoint 2013 in stand-alone mode, typical for study purposes, you'll get this error: "The SDDL string contains an invalid sid or a sid that cannot be translated".

I have found the solution in the TechNet article SharePoint 2013 : The SDDL string contains an invalid sid or a sid that cannot be translated: the solution is to share (via Properties | Sharing | Advanced Sharing) the folder Admin_{guid} in C:\Program Files\Microsoft Office Servers\15.0\Data\Office Server\.

jQuery: creating extensions

When developing with jQuery, I often need to verify selectors, so I usually write something like this:

$('my selector').css('background-color', 'red');

To save some typing, I wanted to create a jQuery extension so I have followed the tutorial Writing Your Own jQuery Plugins and here is my extension:

(function($) {

   // This function makes the background color red (used for debug)
   $.fn.red = function() {
      this.each(function() {
         $(this).css('background-color', 'red');
      });
   };

   // This function alerts the length of the collection items (used for debug)
   $.fn.alertLength = function() {
      alert($(this).length);
   };

   // This function alerts each item in the collection (used for debug)
   $.fn.foreachAlert = function() {
      this.each(function(index, value) {
         alert('' + index + ': ' + value);
      });
   };

 }(jQuery));

SharePoint: getTagFromIdentifierAndTitle

When developing in SharePoint using the client-script object model, for sure you have met the function getTagFromIdentifierAndTitle, proposed by Microsoft and copied in many websites.

The basic implementation can be found in many websites, and the article Tags and Identifiers for getTagFromIdentifierAndTitle Function is only one of many examples.

 

But this function doesn't handle choice fields displayed as radio buttons.

So I have found another other implementation in the blog post Trigger JavaScript Events When a Choice (Radio Button) SharePoint Field Type is Clicked.

Regions in Notepad++

While editing JavaScript files with Notepad++, I have noticed that like in Visual Studio there is the nice feature to collapse function methods.

But so I thought, how to implement the "regions" that I can define in C# files?

 

I have found a nice trick in one of the answers at the question notepad++ user defined regions with folding: simply add a comment and then the opening and closure brackets.

In my example it could be:

  • ///////////////////////////////////////////////////////////////////////{ BEGIN of my region
  • ///////////////////////////////////////////////////////////////////////} END of my region

SharePoint Item Validation Formulas

I always forget the available formulas used to build SharePoint item validation formulas.

The main formulas are:

  • IF(condition, value if true, value if false)
  • AND(cond1, cond2, condN)
  • OR(cond1, cond2, condN)

 

Example articles are: