SharePoint (2003 thru Online): April 2014

Tuesday, April 29, 2014

Color coding to your SharePoint list columns

Color coding to your SharePoint list columns

We can also try this awesome FREE Tool. We need to install on the server where SharePoint is installed.While installation, this tool will verify the pre requisites.


http://www.pentalogic.net/sharepoint-products/free-stuff/html-calculated-column
MOSS 2007 setup
  1. Go to http://pathtosharepoint.com/Downloads/Forms/AllItems.aspx, expand the HTML Calculated Column group header and download a copy of the TextToHTML-v2.1.1 text file.
  2. Upload the HTML script file to a document library on your site. As you can see in the screen shot below, I uploaded my file to a document library named Site config files. It doesn't matter what document library you use to store your file, but make sure all site users have at least read-only access to the library you use. This will ensure the HTML script file can be accessed to render the color coding you’re going to set up.
  3. Validate that the SharePoint list or document library that you want to color code is set up with a Priority field with the following basic settings. (Note that these settings come with the out-of-the-box Priority site column, which you can add to your list or document library.)
  4. Browse the color formatting options at http://blog.pathtosharepoint.com/2008/09/01/apply-color-coding-to-your-sharepoint-lists/ and determine which option (e.g. traffic light indicator, font color shading, background shading, KPI icon indicator) you’d like to implement.
  5. Copy the formula provided for your desired formatting. In my case, I’m looking to implement a traffic light indicator so I copied the following formula:
    ="<DIV style=’font-weight:bold; font-size:24px; color:"&CHOOSE(RIGHT(LEFT(Priority,2),1),"red","orange","green")&";’>&bull;</DIV>"
  6. Add a new calculated column to your SharePoint list. Paste the HTML formula string you copied into the new column’s Formula field. Click OK to save your changes.

  1. When you return to your list view, you’ll see your new calculated column displaying with <DIV> tags. Not very attractive.

  1. To correct this issue, we’re going to add our HTML script to the page. Click on Site Actions > Edit Page.
  2. Click Add a Web Part and add a new Content Editor Web Part to your page.
  3. Move your new Content Editor Web Part (CEWP) to the bottom of the page. You need it to display below your list view web part.
  4. Click on the CEWP’s open the tool pane hyperlink.
  5. When the web part configuration panel appears, place your cursor in the Content Link field and enter the location where you stored your HTML script file. Click OK to save your changes.
That’s it! Your formatting is applied and your page should now display your new color coded field. Here’s a screen shot of my finished view, complete with a Priority Level column that displays red, yellow and green traffic lights that correlate with the priority level of each help desk request:

Now that you've set up color coding on one list view, you can continue adding more color coding to this view or add color coding to other views. Note that you will need to add one CEWP to each list view page that you want to color code. There is no limit, however, to the number of calculated columns with HTML encoding you can add to your list.
SharePoint 2010 setup
  1. Validate that the SharePoint list or document library that you want to color code is set up with a Priority field with the following basic settings. (Note that these settings come with the out-of-the-box Priority site column, which you can add to your list or document library.)
  2. Browse the color formatting options at http://blog.pathtosharepoint.com/2008/09/01/apply-color-coding-to-your-sharepoint-lists/ and determine which option (e.g. traffic light indicator, font color shading, background shading, KPI icon indicator) you’d like to implement.
  3. Copy the formula provided for your desired formatting. In my case, I’m looking to implement a traffic light indicator so I copied the following formula:
    ="<DIV style=’font-weight:bold; font-size:24px; color:"&CHOOSE(RIGHT(LEFT(Priority,2),1),"red","orange","green")&";’>&bull;</DIV>"
  4. Add a new calculated column to your SharePoint list. Paste the HTML formula string you copied into the new column’s Formula field. Click OK to save your changes.
  5. When you return to your list view, you’ll see your new calculated column displaying with <DIV> tags. Not very attractive.
  6. To correct this issue, we’re going to need to modify this new calculated column. Open your site in SharePoint Designer 2010.
  7. Click on Lists and Libraries in your SharePoint Designer 2010 navigation bar. When the list of your site’s document libraries and lists display, click on the list or document library we’re working on.
  8. When the list or document library details page displays, look for and click on the name of the view you’re applying color coding to. In my case, I am updating the All Issues view.
  9. Once your view opens, click on of the fields that are displaying those ugly
    tags. Notice that the <xsl:value-of> tag in the bottom right-hand corner of your screen lights up in yellow once your field is selected.
  10. Hover over the <xsl:value-of> tag until a black drop-down arrow appears. Click on the drop-down arrow and select Edit Tag…
  11. A dialog box will pop up with the following text:
    Place your cursor between the last quotation mark and the closing > bracket. Now type the text disable-output-escaping=“yes”
  12. Your Quick Tag Editor box should now read like this:
  13. Click on the Quick Tag Editor box’s green check mark icon to save your changes. Your SharePoint Designer page will refresh and your color coding will appear!
  14. Click File > Save to save your changes.
That’s it! Your formatting is applied and your page should now display your new color coded field. Here’s a screen shot of my finished view, complete with a Priority Indicator column that displays red, yellow and green traffic lights that correlate with the priority level of each help desk request:
Now that you've set up color coding on one list view, you can continue adding more color coding to this view or add color coding to other views. Note that you will need to modify the <xsl:value-of> tag for each column you want to display in HTML format. There is no limit, however, to the number of calculated columns with HTML encoding you can add to your list.

Tuesday, April 22, 2014

Browser compatibility testing with modern.ie tools

http://modern.ie/en-us

We can use this Site to test the Browser Compatibility and get a Compatibility Report. We can download Virtual Machines with test versions of IE.

Monday, April 21, 2014

Download multiple Documents one time from SharePoint 2007 & 2010 Document Libraries

NOTE: THIS FEATURE WORKS IN INTERNET EXPLORER (IE) BROWSER ONLY.

SharePoint 2007: Go to ‘Actions’ and Click on ‘Open with Windows Explorer’ (as shown in the below Screenshot).



SharePoint 2010: Click on ‘Library’ Tab and Click on ‘Open with Explorer’ (as shown in the below Screenshot).


You will see the Shared Documents Folder opened in Windows Folder format.

You can browse all the content in the folder and download them at a time using Copy – Paste.




-------------------------------------

For Some Users, when they navigate to a document library and click “Open with Explorer” button on the ribbon, they receive the following error message:

Your client does not support opening this list with Windows Explorer


Resolution 1: To successfully make “Open with Explorer” work, we need ensure WebClient service is started in Services.msc

WebClient service which the WebDav protocol enables Windows-based programs such as Windows Explorer to create, access and modify Internet-based files.
Important Note: If you are running a server type Windows OS, for example, you use Window Server 2008, installDesktop Experience feature first to get WebClient service installed.

From the Start menu, point to Administrative Tools, and click Services.
Scroll down, right-click WebClient, and click Properties.
In the Startup type list box, click Automatic.
Click Apply.
In the Service status section, click Start.
Click OK.

Resolution 2: Add https://*.sharepoint.com to Trusted Sites
To configure Web browser, open “Internet Options” menu, navigate to the “Security Tab”, and add https://*.sharepoint.com to Trusted Sites

Note: “Open with Explorer” may not work if you have 64-bit Internet Explorer and 64-bit Microsoft Office installed.


Then restart the browser and try it again.


For sure it will work!

ApplicationXtender (AX) - How to kill user sessions

Login into Application Generator


Right Click on Users and go to Show PID Table


Select the user and click on Delete



Click on Refresh to see the current logged in users. click on Close to close the PID Table.

Editions, Licenses & Versions of MOSS 2007 and SharePoint 2010

https://spsfarmreport.codeplex.com/

SPS Farm Report in the codeplex is the Awesome Tool to get the Farm Config, Servers in farm, Shared Service Providers and Web Application details.
________________________________________________________________________________
EDITIONS

How to Find the Edition of SharePoint 2010 that is Installed.

To know if it is Standard or Enterprise version of SPS 2010Go to the Central administration -> Upgrade and Migration-> Enable Enterprise features.  This will show you whether it is standard or enterprise.


  • ---------------------------------------------------------------------------------------------------------
  • To know if it is Standard or Enterprise version of MOSS 2007Go to the Central administration -> Operations-> Enable Enterprise features.  This will show you whether it is standard or enterprise.
  • _________________________________________________________________________________
  • VERSIONS
  • MOSS 2007: In Central Admin, look at the Servers in Farm as it will tell you what version you have running. 
  • Central Administration > Operations > Servers in Farm  


  • SPS 2010: In Central Admin, look at the Servers in Farm as it will tell you what version you have running. 
  • Central Administration > System Settings > Servers in Farm  

  • ------------------------------------------------------------------------------------------------------
  • LICENSES
  • MOSS 2007: To determine whether you are running Standard or Enterprise, you can look in Central Administration where you would convert the current license.

    1. Central Administration > Operations > Convert License Type   




  • SPS 2010: To determine whether you are running Standard or Enterprise, you can look in Central Administration where you would convert the current license.

    1. Central Administration > Upgrade and Migration > Convert farm license type   



    Tuesday, April 1, 2014

    Export Rich Text Field data from Notes Document to HTML File

    Export Rich Text Field data from Notes Document to HTML File

     The requirement is to pull data from a rich text field called Activity History from Lotus Notes Document to Text or HTML File. One HTML file will be created for each Document.


    Option Public
    Option Declare

    Dim db As NotesDatabase
    Dim GSLdb As NotesDatabase
    Dim GSLview As NotesView
    Dim dc As NotesDocumentCollection
    Dim doc As NotesDocument
    Dim docRecord As NotesDocument
    Dim docEmail As NotesDocument
    Dim x As Integer
    Dim fileNum As Integer
    Dim fileName As String
    Dim CustName As String
    Dim CustID As String
    Dim AHUnformattedText As String
    Dim strFilePathSource As String
    Dim item As NotesItem
    Dim rtitem As NotesRichTextItem
    Dim rtBodyItem As NotesRichTextItem


    Sub Initialize

    Dim session As New NotesSession
    Set db = session.CurrentDatabase
    Set GSLdb = session.Getdatabase("HAWDEV/RSP-Dev", "CC0436_TEST.nsf")
    Set GSLview = GSLdb.Getview("By Customer")
    Set docRecord = GSLview.GetFirstDocument
    While Not (docRecord Is Nothing)
    If docRecord.Hasitem("ActivityHistory") Then
    Set item = docRecord.GetFirstItem("ActivityHistory")
    x% = item.Type
    If X% = "1" Then
    Set rtitem = docRecord.GetFirstItem("ActivityHistory")
    AHUnformattedText = rtitem.GetFormattedText(False, 0)
    Call ReplaceSubstring(AHUnformattedText, Chr(13), "<BR>")
    CustName = docRecord.CUSTOMERNAME(0)
    CustID = docRecord.CUSTOMERID(0)

    fileNum% = FreeFile()
    fileName$ = "E:\Temp\"+CustID+"_"+Format(docRecord.Created, "Medium Date")+".html"
    'You can use the TXT to HTML as a File to get the data saved.
                'fileName$ = "E:\Temp\"+CustID+"_"+Format(docRecord.Created, "Medium Date")+".txt"
    Open fileName$ For Output As fileNum
    Write #fileNum%, AHUnformattedText
    Close fileNum%
    End If
    End If
    Set docRecord = GSLview.GetNextDocument(docRecord)
    AHUnformattedText = ""
    Wend

    '-----------------------------------------------------------------------------------------------------------------------------------------------
    ' Notify CC Admin with attached processed time report
    '-----------------------------------------------------------------------------------------------------------------------------------------------

    Set docEmail = db.CreateDocument

    With docEmail
    .Form = "memo"
    .Subject = "CC Activity creation to Specified folder is completed"
    .SendTo = "gvr11@live.com"
    End With

    Set rtBodyItem = docEmail.CreateRichTextItem("Body")

    With rtBodyItem
    Call .AppendText ("Hello,")
    Call .AddNewLine(2)
    Call .AppendText("CC Activity creation to Specified folder is completed")
    Call .AddNewLine(2)
    Call .AppendText("Thank you,")
    Call .AddNewLine(1)
    Call .AppendText ("CC Administrator")
    End With

    'Send email
    docEmail.Send True
    End Sub
    -----------------------------------------------------------------------------------------------
    Function ReplaceSubstring (Text As String, find As String, repl As String) As Integer ' "replace" cannot be used - change to "repl"
    Const PROCNAME = "ReplaceSubstring"

    Dim intReturn As Integer
    intReturn = True 'Generic error condition

    On Error GoTo errHandler

    Dim pos As Long 'Integer - will overflow on large files
    pos = InStr(Text, find)

    Do While (pos > 0)
    Text = Left$(Text, pos - 1) & repl & Mid$(Text, pos + Len(find))
    pos = InStr(pos + Len(repl), Text, find)
    Loop

    intReturn = False 'No Error
    GoTo endFunc

    errHandler:
    On Error Resume Next
    intReturn = Err
    Resume endFunc

    endFunc:
    ReplaceSubstring = intReturn
    End Function

    ----------------------------------------------------------------------------------------------------------------
    The requirement is to pull data from a rich text field called Activity History from Lotus Notes Document to Text or HTML File. One HTML or CSV file will be created for All Documents.


    Option Public
    Option Declare

    Dim db As NotesDatabase
    Dim GSLdb As NotesDatabase
    Dim GSLview As NotesView
    Dim dc As NotesDocumentCollection
    Dim doc As NotesDocument
    Dim docRecord As NotesDocument
    Dim docEmail As NotesDocument
    Dim x As Integer
    Dim fileNum As Integer
    Dim fileName As String
    Dim CustName As String
    Dim CustID As String
    Dim CustDispCom As String
    Dim AHUnformattedText As String
    Dim strFilePathSource As String
    Dim item As NotesItem
    Dim rtitem As NotesRichTextItem
    Dim rtBodyItem As NotesRichTextItem

    Sub Initialize

    Dim session As New NotesSession
    Set db = session.CurrentDatabase
    Set GSLdb = session.Getdatabase("ISQD02/SLHC-Dev", "Developers\Venu\us0418_TEST.nsf")
    Set GSLview = GSLdb.Getview("By Customer")

    fileNum% = FreeFile()
    fileName$ = "E:\Temp\Credit Collections Activity History.csv"
    'fileName$ = "E:\Temp\Credit Collections Activity History.html"
    Open fileName$ For Output As fileNum
    'Write #fileNum%, "<meta http-equiv=","Content-Type"," content=","text/html;charset=ISO-8859-1",">"
    Set docRecord = GSLview.GetFirstDocument
    While Not (docRecord Is Nothing)
    If docRecord.Hasitem("ActivityHistory") Then
    Set item = docRecord.GetFirstItem("ActivityHistory")
    x% = item.Type
    If X% = "1" Then
    Set rtitem = docRecord.GetFirstItem("ActivityHistory")
    AHUnformattedText = rtitem.GetFormattedText(False, 0)
    'Call ReplaceSubstring(AHUnformattedText, Chr(13), "<BR>")
    Call ReplaceSubstring(AHUnformattedText, Chr(13), " ")
    Call ReplaceSubstring(AHUnformattedText, Chr(10), " ")
    Call ReplaceSubstring(AHUnformattedText, Chr(9), " ")
    Call ReplaceSubstring(AHUnformattedText, """", " ")
    CustName = docRecord.CUSTOMERNAME(0)
    CustID = docRecord.CUSTOMERID(0)
    CustDispCom = docRecord.CustomerDisputeComment(0)
    ' Write #fileNum%, "<table border=",1," style=width:100%>","<tr><td>"
    ' Write #fileNum%, "<h4>", CustID,"-", CustName,"</h4>" ,"<BR>"
    Write #fileNum%, CustID,"-", CustName
    Write #fileNum%, "Dispute Comments - ",CustDispCom
    Write #fileNum%, "ActivityHistory - ",AHUnformattedText
    Write #fileNum%, "-----------------------------------------------------------------------------------------"
    ' Write #fileNum%, "</td></tr></table>"
    End If
    End If
    Set docRecord = GSLview.GetNextDocument(docRecord)
    AHUnformattedText = ""
    CustDispCom = ""
    Wend
    Close fileNum%

    '-----------------------------------------------------------------------------------------------------------------------------------------------
    ' Notify CC Admin with attached processed time report
    '-----------------------------------------------------------------------------------------------------------------------------------------------

    Set docEmail = db.CreateDocument

    With docEmail
    .Form = "memo"
    .Subject = "CC Activity creation to Specified folder is completed"
    .SendTo = "vreddy@osi-systems.com"
    End With

    Set rtBodyItem = docEmail.CreateRichTextItem("Body")

    With rtBodyItem
    Call .AppendText ("Hello,")
    Call .AddNewLine(2)
    Call .AppendText("CC Activity creation to Specified folder is completed")
    Call .AddNewLine(2)
    Call .AppendText("Thank you,")
    Call .AddNewLine(1)
    Call .AppendText ("CC Administrator")
    End With

    'Send email
    docEmail.Send True
    End Sub
    -----------------------------------------------------------------------------------------------
    Function ReplaceSubstring (Text As String, find As String, repl As String) As Integer ' "replace" cannot be used - change to "repl"
    Const PROCNAME = "ReplaceSubstring"

    Dim intReturn As Integer
    intReturn = True 'Generic error condition

    On Error GoTo errHandler

    Dim pos As Long 'Integer - will overflow on large files
    pos = InStr(Text, find)

    Do While (pos > 0)
    Text = Left$(Text, pos - 1) & repl & Mid$(Text, pos + Len(find))
    pos = InStr(pos + Len(repl), Text, find)
    Loop

    intReturn = False 'No Error
    GoTo endFunc

    errHandler:
    On Error Resume Next
    intReturn = Err
    ' nLog.LogError Err, "[" & PROCNAME & " " & Erl & "] " & Error
    Resume endFunc

    endFunc:
    ReplaceSubstring = intReturn

    End Function

    -----------------------------------------------------------------------------------------------

    FBA Feature Issue Fixed

    Just now heard back from Chris Coulson about the release of new fix
    • Fixed issue where users cannot access sub sites if they did not have any permissions to the site collection root web
      https://sharepoint2010fba.codeplex.com/releases/view/120324

    I re-installed the Solution Successfully.

    Tested the Sites and Sub-sites logging with FBA users and was able to login successfully.
    The FIX is working fine.

    FBA Feature Issue

    Issue where users cannot access sub sites if they did not have any permissions to the site collection root web

    We had Issues with Visigo FBA Feature downloaded from http://sharepoint2010fba.codeplex.com/ when we upgraded the latest version. We bought the service from http://www.visigo.com/ (Owner for FBA Tool).

    We were able to re-deploy the solution successfully but still we have the issue.

    The issue persists with the Sub- Site 2 (Site Collection >> Sub-site 1 >> Sub-site 2) when permissions were not inherited from the Sub-site 1.

    Chris Coulson ( Visigo - Expert ) had a look on the issue and promised to give us a new build of the solution which will fix the issue.