SharePoint – Page 2 – tecivo BLOG

tecivo BLOG

My IT notes, 'How To...' guides, Microsoft, SharePoint, Citrix, AppSense, Apple, technology & gadgets and more!

Category: SharePoint (page 2 of 3)

SharePoint Tips…How to use calculated column in List with MID to get hostname from FQDN

Introduction

SharePoint Lists support a number of functions similar to Excel.

Below shows how to use the MID function to create a new List column containing server hostnames derived from an existing column containing fully qualified domain names (FQDN).

————

Create a new column ‘hostname‘ in the SharePoint list using Calculated column type and enter formula

=MID([FQDN],1,FIND(".",[FQDN],1)-1)

using data type Single line of text

Example

FQDN hostname < ‘hostname’ function >
1 dc.tecivo.local dc =MID([FQDN],1,FIND(“.”,[FQDN],1)-1)
2 exchange.tecivo.local exchange =MID([FQDN],1,FIND(“.”,[FQDN],1)-1)
3 sharepoint.tecivo.local sharepoint =MID([FQDN],1,FIND(“.”,[FQDN],1)-1)

 

SharePoint Tips…SharePoint Calendar not loading correctly with Internet Explorer 11

Have run into an issue recently where two colleagues couldn’t load a SharePoint calendar – instead of the dynamic list with active links etc. it loaded with a flat image and was completely inactive.

SharePoint_Calender_Issue_1

This article explains exactly why that seems to be occurring

I don’t know if there is a SharePoint patch to resolve, but an easy fix is to add your SharePoint sites address to Internet Explorer as a Trusted Site

The calendar will then load ok:

SharePoint_Calender_Issue_2

 

SharePoint Tips…How to apply colour formatting to a List item column based on value in other column

Introduction

A useful trick with SharePoint lists is to use colour coding so you can quickly see the status of the item.

For example you may have a calendar list to which you’ve added a Status column using a choice for Complete, Started, Pending.

————

The example below shows how to create a new column which will show colours for each status – Complete=Green, Started=Orange and Pending=Red

Create a new column StatusColour in the SharePoint list using Calculated column type and enter formula as appropriate using data type Number

To change background colour:

="<div style='text-align:left; background-color:"&IF(Status="Complete","green",IF(Status="Started","orange",IF(Status="Pending","red")))&"'>"&Status&"</div>"
Title Status StatusColour < ‘StatusColour’ function >
Job 1 Complete Complete =”<div style=’text-align:left; background-color:”&IF(Status=”Complete”,”green”,IF(Status=”Started”,”orange”,IF(Status=”Pending”,”red”)))&”‘>”&Status&”</div>”
Job 2 Started Started =”<div style=’text-align:left; background-color:”&IF(Status=”Complete”,”green”,IF(Status=”Started”,”orange”,IF(Status=”Pending”,”red”)))&”‘>”&Status&”</div>”
Job 3 Pending Pending =”<div style=’text-align:left; background-color:”&IF(Status=”Complete”,”green”,IF(Status=”Started”,”orange”,IF(Status=”Pending”,”red”)))&”‘>”&Status&”</div>”

To change font colour:

="<div style='text-align:left; color:"&IF(Status="Complete","green",IF(Status="Started","orange",IF(Status="Pending","red")))&"'>"&Status&"</div>"
Title Status StatusColour < ‘StatusColour’ function >
Job 1 Complete Complete =”<div style=’text-align:left; background-color:”&IF(Status=”Complete”,”green”,IF(Status=”Started”,”orange”,IF(Status=”Pending”,”red”)))&”‘>”&Status&”</div>”
Job 2 Started Started =”<div style=’text-align:left; background-color:”&IF(Status=”Complete”,”green”,IF(Status=”Started”,”orange”,IF(Status=”Pending”,”red”)))&”‘>”&Status&”</div>”
Job 3 Pending Pending =”<div style=’text-align:left; background-color:”&IF(Status=”Complete”,”green”,IF(Status=”Started”,”orange”,IF(Status=”Pending”,”red”)))&”‘>”&Status&”</div>”

To change font and background colours:

="<div style='text-align:left; background-color:"&IF(Status="Completed","green",IF(Status="Started","orange",IF(Status="Pending","red")))&"; color:"&IF(Status="Complete","green",IF(Status="Started","orange",IF(Status="Pending","red")))&"'>"&Status&"</div>"
Title Status StatusColour < ‘StatusColour’ function >
Job 1 Complete Complete =”<div style=’text-align:left; background-color:”&IF(Status=”Complete”,”green”,IF(Status=”Started”,”orange”,IF(Status=”Pending”,”red”)))&”‘>”&Status&”</div>”
Job 2 Started Started =”<div style=’text-align:left; background-color:”&IF(Status=”Complete”,”green”,IF(Status=”Started”,”orange”,IF(Status=”Pending”,”red”)))&”‘>”&Status&”</div>”
Job 3 Pending Pending =”<div style=’text-align:left; background-color:”&IF(Status=”Complete”,”green”,IF(Status=”Started”,”orange”,IF(Status=”Pending”,”red”)))&”‘>”&Status&”</div>”

Note: When using a column with spaces in the name you need to wrap in square brackets e.g. Current Status should be defined in IF as [Current Status] and at end of function as &[Current Status]&

You can use HTML colour codes as well as names.

e.g. set background and font colours based on Status column:

="<div style='text-align:left; background-color:"&IF(Status="Complete","#008000",IF(Status="Started","#800080",IF(Status="Pending","#FF0000")))&"; color:"&IF(Status="Complete","white",IF(Status="Started","white",IF(Status="Pending","white")))&"'>"&Status&"</div>"

 

« Older posts Newer posts »

© 2019 tecivo BLOG

Theme by Anders NorenUp ↑