SharePoint Online – Picture Column and Column Formatting

I had earlier blogged about Microsoft Rolling out column formatting to the first release tenants and how it could be useful in many scenarios.

For anyone who wants to get started with column formatting following article is by far the best technical documentation.

https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting

Today I am going to talk about one specific scenario where you could use column formatting.

Let’s assume that you want to create a picture column in SharePoint to show some sort of status progress. I know we can achieve this in many ways but just for the sake of this blog post we are going to assume that you have a column in your list/library of type Picture.

Now in SharePoint Online when you have a picture column and you insert the URL of the image in that column it displays the image. This image is clickable and when you click on that image it opens the new tab with the image displayed.

This behavior may work in some scenarios but in our case since we want to use this picture column just to show the status progress we do not want that image to be clickable.

We can use column formatting for this. Follow the steps below to make that image not clickable.

  • Open context menu on your image column and select à Column Settings à Format this column.
  • This should open JSON editor on right hand side.
  • Paste the following code in the editor and click Save.

 

{
    "elmType": "div",
    "children": [
        {
            "elmType": "img",
            "txtContent": "",
            "style":{
                "min-height": "initial",
                "margin-top": "0px"
                                },
            "attributes": {
                "src": "@currentField",
                "width": "100%"
            }
        }
    ]
}

 

As you can see I am not doing anything extra ordinary. I am simply displaying the same image without anchor link. If you follow the article that I have linked above you would be able to figure out it’s straight forward.

One thing that I needed to do on top of that is to add couple of styles. Since when you use column formatting it uses its default class and that makes your image smaller and aligns it to the top.

I have set min-height and margin-top attributes to align images properly with the list item as well set the width to 100% so it does not shrink the image.

I hope this helps to get started with the column formatting.

In the next column formatting article I will cover how to make image clickable using the URL from the different column.

SharePoint Online – Column Formatting rolling out to first release tenants

At Ignite 2017 Microsoft announced the Colum Formatting feature in SharePoint Online. You can check out the awesome session on Channel 9.

https://channel9.msdn.com/Events/Ignite/Microsoft-Ignite-Orlando-2017/BRK3252

Microsoft have started rolling out the column formatting feature to the first release tenants. For anyone who did not hear about column formatting, it helps customizing how SharePoint list columns gets displayed.

If you are currently using SharePoint on-premises then it is like JSLink. Not exactly the same but you can achieve many formatting options using column formatting. As a matter of fact there is git repo for the column formatting samples. Check them out below.

https://github.com/SharePoint/sp-dev-column-formatting

To use column formatting you can go to your SharePoint list column and select “Format this column” under “Column settings”.

This will open a “Format column” window on the right where you can paste your JSON and either click Preview to see the changes or click Save to apply the changes.

If there are any syntax errors then you will get the error notification on that screen so you can correct the error.

Anyone who can create and manage views in a list can access column formatting from the column settings.

For anyone who wants to get started with column formatting must check the following article out as it has all the details you need to know about column formatting.

 

https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting

 

I will cover some examples that I have used in my next blog post.

SharePoint Communication site pages in Microsoft Teams

For anyone that is living under the rock, in May last year Microsoft announced Communication sites. Communication sites are mobile friendly and allows users to communicate to people throughout the organization with beautiful, dynamic, mobile-ready communication sites and pages that keep everyone informed and engaged.

You can read more about that HERE and HERE.

While communication sites are awesome they are not Group connected sites. In many cases you would want to use Communication pages within your Team.

It is very simple to bring them to your Microsoft Teams.

  1. Go to Microsoft Teams and click Add a Tab (+)
  2. Click WebSite under the various options.
  3. Give tab a name and paste the URL and select if you want to share that message in your Team channel.

  4. Click Save and you should see the communication page shows up in your Team Tab.

 

 

Teams is smart enough to trim all the additional SharePoint controls and display only the page in the Teams teab.

This is one of the awesome feature and I cannot wait to start integrating MS Teams and communication pages.

Office 365 – Cannot add Plan to your favorites – Planner

For anyone that is new to Office 365 and not know what Planner is then you should spend time understanding MS Planner service. Planner makes it easy for your team to create new plans, organize and assign tasks, share files, chat about what you’re working on, and get updates on progress.

In this blog post, I am not going to talk about Planner much but I am going to talk about potential issue that you may face depending on your tenant configuration.

When you are on the Planner Hub you see various options to visualize your plans. One of the feature is to add plan to your favorites.

When you add planner to your favorites you may receive the following error. As I said earlier this is not going to be the case for the most part but as far as I know in one specific scenario you may receive the following error when adding plans to your favorites.

Upon researching I found the following very useful blog post.

https://blogs.msdn.microsoft.com/brismith/2017/07/14/microsoft-planner-why-cant-i-add-favorites-or-comment/

With all credits to Brian (author of the blog post) I am posting scenario that I ran into where I go the above error.

In hybrid scenarios we do not support comments or favorites for users with their mailboxes on-premises as the users needs to have an Exchange Online mailbox to engage with these features.  EXCEPT – if the user does have an external email address configured and is configured as a MailUser in Exchange AD.  In this scenario the user will be able to use these features even though they have no EXO mailbox.  If the user is configured as a User rather than MailUser – and has no external email address then things won’t work.  This has explained the situations where some users work and some don’t in a hybrid environment.  Also of course some users may be fully in EXO and others in on-premises mailboxes.

So, if you run into the above error make sure to read the above blog post.

I hope this helps someone who is currently using Exchange in Hybrid scenario and running into this planner error.

 

Microsoft Teams – Create Team from existing Group

Microsoft Teams is a new chat-based work-space in Office 365. Microsoft Teams is an entirely new experience that brings together people, conversations and content so they can easily collaborate to achieve more.

If you have been using Group connected SharePoint sites then you will have option to create Teams from existing Office 365 Group. This means you will be adding Team to your existing Office 365 Group and still be able to lever existing investments on SharePoint site.

When you go to create new Microsoft Team you will see option to “Create a team from existing Office 365 Group”.

Now one thing to note here is that you would only see this option if you are the Group Owner of the existing Office 365 Group. If you are not the owner you will not see this option. I have seen lot of people getting confused that they do not see this option. If you do not see that option you are not the Group owner of existing Office 365 group.

Once you click the link to Create a team from an existing Office 365 Group you will be presented with th existing Office 365 Groups that you own.

On this screen be careful as to which Group you are selecting as currently there is no option to Swap your Groups.

Select the group and click Choose Team button which will get enabled once you select the Group.

This will create the team and connect to existing Office 365 Group.

Adding Planner to your Existing MS Teams

Microsoft Planner is a task management tool that your team can use to manage task and view the status of each task visually. It helps teams to create new plans, assign task and share files around projects or any other work that is going on. You can read more about it HERE.

In this blog post I am going to talk about how to add existing Plan to Teams. This is straight forward process but I still wanted to talk about some gotchas when adding Planner to the Team.

To add a Planner to the team you will go to any existing channel or create a new channel. Then you will click + sign to add a new tab. When you add a new tab you will have bunch of options to select type of tab. Here you will select Planner. Once you click Planner new dialog will open.

As you can see from the screen shot above I have a option to Create a new plan or Use and existing Plan. Now let me take a step back and explain what happens behind the scene. When you create a new Team or add Team to existing Office 365 Group you will have few things provisioned for you i.e. Office 365 Group, SharePoint Site and a Planner. Currently when writing this blog post there is one to one relationship between Planner and MS Groups. At the same time Teams have one to many relationship with Planner i.e. One team can have more than one Planner.

This is why you are seeing an option to either create a new Plan or use the existing Plan. If you select existing plan then you will have option to select your Plan from the dropdown and then you can access that Plan either from your Teams tab or from Planner Hub. When you create a new Plan then that Plan is not accessible from your Planner Hub and can only be visible from the Teams tab but tasks assigned to you are visible on the Planner Hub.

So it is bit confusing and I hope Planner and Teams team will work together to sort this out.

One last thing is that you will only see an option to select existing plan if you are an Owner on that Office 365 group. If you are member of a team and are allowed to add new tabs to the teams then you will only see Create new Plan option. So if you do not see option to select existing plan it might already be added to your team or you are not the owner on that Office 365 Group.

I hope this helps some of you.