Styling your list views using Apptex

Here is a short video that will show you how you can style your pages using Apptex:


Templates available until now:













Google Maps: 


Bing Maps: 


Styled Google Maps: 



Quick View: 




Modern Tiles: 




Pinterest View: 



Line Chart: 




Bar Chart: 



Radar Chart: 



Polar Area Chart: 



Now Apptex supports SharePoint on-premise in the new release. Please send us your suggestions for desired templates.


The release of Apptex Views SharePoint App

I’m glad to announce the release of Apptex Views for SharePoint, an App dedicated to styling SharePoint 2013 list views to make it so simple for users to apply their favorite designs in no time!

Here is a demo of how it works:



For more info and questions, don’t hesitate to contact us on our codeplex page:

We’re looking for sponsors to sponsor our App, if you’re interested, feel free to contact us directly on our Emails or through our codeplex page as well.

Happy SharePointing!


SP Unique Permissions Script

Hello Community,

I’ve seen many cases where a quick report would be needed to view broken permissions inside a SharePoint site. I even had this case for a customer who wanted to know if users broke some permissions in their own my sites, so I’ve made a script that will be scoped to a web application, and will loop through all site collections in that web application and tell you about any broken permissions for sites, lists or libraries, items or folders, and will give it to you in a .csv file with a nice formatting!  Click here to see how it would look in the .csv file

For more info, please visit: 



Microsoft’s Virtual Academy Initiative – Know it. Prove it

Quick info for people out there .. Recently Microsoft Virtual Academy has announced the introduction of Know it Prove it program, which is dedicated for technology enthusiasts who wish to learn more about their favorite technologies. The program includes 8 categories that you can choose your favorite area from, and a link to it was added to the home page of the MVA site: .

For the moment, it seems just a challenge for yourself to be able to complete these courses, but later on, it seems it would be more than that, but it’s nice to see Microsoft has organized some learning paths for people to know where to start with their preferred technology.



Hiding Custom Web Part If Returned Data Is Empty

In this article, I will show how to hide a web part if the returned data from SharePoint list is empty.

First thing, what I use to implement the look and feel of items inside my web part is a div tag that runs at server, as the following:

<div id=”ReturnedData” runat=”server” name=”ReturnedData”/>

That’s all good, when you get items inside your query, and loop through each item, you add in your C# code: ReturnedData.InnerHTML+= …., and you format the item as you want, I know you get the idea!

Now for the fun part of hiding your web part if the items count = 0, so if the items count = 0, the div won’t have any HTML inside, right? So we can catch that in JavaScript, like the following:


function HideIfEmpty() {

var ReturnedData= document.getElementsByName(“ReturnedData”);

if (ReturnedData[0].innerHTML == “”) {

var chrome = ReturnedData[0].parentNode.parentNode.parentNode; =“none”;





That’s it, but how have we done it?

The function HideIfEmpty gets the element by the name attribute, which is ReturnedData. It contains more than one element inside, the first element contains all the innerHTML, so we get the innerHTML by searching for the first element in the array; ReturnedData[0] if equals =”” then we don’t have any data returned.

Now we need to get a reference to the web part chrome element, which is an ancestor of the div ReturnedData, so we get it by navigating up in the hierarchy three times., then hide the chrome by executing:”none”, this is how we hide elements in JavaScript.

Note the _spBodyOnLoadFunctionNames(“HideIfEmpty”) is used to execute the function once we load the page, this is how you execute JavaScript functions on page load in SharePoint.

Hope it helps someone out there.

M . D

Writing timer job against Managed Metadata Service Application

Have you ever written a timer job in SharePoint to read from or writing to a term store in Managed Metadata, you might have done so and faced the error:

The current user has insufficient permissions to perform this operation

Even if you try to run the code with SPSecurity.RunWithElevatedPrivileges(), or with your own account from Visual Studio, it will still give you the same problem.

The thing is, that the timer job runs with its own service, which is “SharePoint 2010 Timer”, see the below image.

The user running this service has to have access to the term store administrators in Central Administration, see the image below:

Once permission is given here, you will start having access from your timer job to the managed metadata term store and create your desired term sets and terms.

Object reference exception when accessing farm properties

Here is a problem I had and it took me a while to know the reason behind it, it’s when you try to add a farm property using PowerShell, like this:

Now try to get the farm properties using the following command: $, you will see the following result:

that’s great! You could get your property name and value without any problems, so now let’s try to get the farm property in code, shall we?

In visual studio type the following in your code:

String myProperty = SPFarm.Local.Properties[“MyFirstProperty”].ToString();

Baaaaaam, you will get: object reference not set to an instance of an object.

The reason is, although you can see the farm property in PowerShell when you type $, you need to write the $farm.update() command after that in order to be able to use that property and to be visible in your code.

Hope this helps someone out there.

How to use integrated scripting environment in SharePoint 2010

You know you can use SharePoint 2010 management shell for writing cmdlets for SharePoint, but you can also use the ISE(Integrated Scripting Environment) which is a host in Windows Server 2008 used to write cmdlets for PowerShell.

First, You need to activate this host by clicking on server manager, then features>> Add Features >> Windows PowerShell Integrated Scripting Environment(ISE) and click to install.

Once you have the ISE on your server. Open it. If you try to type PowerShell cmdlets for SharePoint it won’t work, you need to direct the ISE to run PowerShell commands for SharePoint.

Type the following:

Add-PSSnapIn Microsoft.SharePoint.PowerShell

Now you can write cmdlets for SharePoint.  But note if you close the ISE and open it again, this connection with SharePoint will be removed.  So you need to call this command once the ISE opens each time, so how do you automate this?

Well, ISE has a profile inside windows server 2008. So you need to find this profile and enter the command inside it so each time the ISE opens it looks to the profile and looks up the command the command to connect to SharePoint.

Type $profile inside the ISE you will get a path to your profile, Ended with .ps1  like this :


Try to type notepad $profile, this will open the profile, in case you found this error message in notepad…

you need to create a path to your profile as provided from the path given by the ISE. then create a text

A Note About Farm Administrator

A farm administrator can do anything in your SharePoint environment! and he is a member in a group called farm administrator, so let’s see who are the members of this group in SP 2010. By default there are 3 members in this group which are as the following:


1- The user the you specified in the identity of the SharePoint central administration application pool, if you open your IIS manager, and go to application pools and see the application pool that runs the central administration, you will see the account the you specified while running the SharePoint configuration wizard. this account is part of the Farm Administrators Group.


2- The local Administrator of the server that has SharePoint installed in it. but one important note i like to add. if you have Domain Controller on your server and installed SharePoint, you will notice that the local administrators group is gone. you will not find this option in your windows settings when you have domain controller installed your server.

3- As you have guessed it. The user that you used when you installed SharePoint. This user for sure will be part of Farm Administrator.


I Hope that this little note has helped you understanding the Farm Administrator group that you have been seeing all the time in SharePoint Central Administration.

Extra column in Content Query WebPart not showing

So one quick tip..  I had a requirement to add an extra field for a CQWP, and map it to display a column inside my target list, Here is a mistake that took me a while until I figured it out:

So to add a new field, we modify both ItemStyle.xsl and the .webpart file to include our new field, right?

I have my field inside my list called: SecondLocation, so in our Template inside the ItemStyle.xsl, we add this field inside a div or any other html control we may need, in order to style it, like this:

<xsl:value-of select=”@SecondLocation”/>

Now we will add this field to the webpart itself, because it’s not there by default, so we export the webpart, and add this field to the “CommonViewFields” section, what I did is like this:

<property name=”CommonViewFields” type=”string”>
SecondLocation, Text

When I tried to view the webpart, I didn’t see my field displayed, Although the internal name is right, the field is written in ItemStyle.xsl, the field is added to the .webpart file, the thing is with the formatting of the xml for the .webpart itself, instead of writing the properties for the webpart on multiple columns, you should write it all on the same column, like this:

<property name=”CommonViewFields” type=”string”>SecondLocation, Text</property>