How to change message if theres no entry in list RRS feed

  • Question

  • Hello :)

    I'm using SP Foundation '10 and I want to change the message, which appears if theres no entry in a list.

    Within the Settings of the List I haven't found anything and also I can't change it by clicking on the Text in SPD.



    Friday, February 4, 2011 10:41 AM

All replies

  • hi

    it is almost same question you have asked before

    if you will customize the XSL of your list you can change default message 

    by default it looks like


    <xsl:template name="dvt_1.empty">

    <xsl:variable name="dvt_ViewEmptyText">There are no items to show in this view.</xsl:variable>

    <table border="0" width="100%">


    <td class="ms-vb">

    <xsl:value-of select="$dvt_ViewEmptyText"/>





    Just change bold message

    Please mark this as answer if it helps.
    Microsoft Certified Trainer
    Microsoft Certified Professional Developer
    BizTalk blog:
    • Marked as answer by JesAndJes Friday, February 4, 2011 1:24 PM
    • Unmarked as answer by JesAndJes Friday, February 4, 2011 2:15 PM
    Friday, February 4, 2011 10:51 AM
  • Oh, you're right. sorry and a big Thanks :D


    But somehow i can't see the xsl, I only see this for the List:


    <WebPartPages:ListViewWebPart runat="server" __MarkupType="xmlmarkup" WebPart="true" __WebPartId="{D291256E-D576-4A74-A964-E8BFAAAAFE9A}" >
    <WebPart xmlns:xsi="" xmlns:xsd="" xmlns="">
      <Title>Test Liste</Title>
    ] and so on

    Friday, February 4, 2011 1:23 PM
  • Don't mean to hijack this thread, but I am having this problem as well.  I am using SharePoint 2010 Standard. In 2007 there was an easy dialog window that you could bring up on a DataView webpart to enter your custom message. Not so in 2010. I looked for the "<xsl:variable name="dvt_ViewEmptyText">" tag but it isn't there.  Instead there is;  

    <xsl:if test="$dvt_RowCount = 0 and not (@BaseViewID='3' and List/@TemplateType='102')">
                 <table width="100%" border="0" dir="{List/@Direction}">
                    <xsl:call-template name="EmptyTemplate" />

    I am unable to access this emptytemplate to modify the text.  What happened to the quick and easy dialog to modify this message?

    Tuesday, April 24, 2012 4:43 PM
  • Hi

    Armen's answer is correct for DataFormWebPart

    But you have 2 situation

    A. For DataFormWebPart, you will find the message directly in the code side of the page

    B ( for your case ) ListViewWebPart

    What you have to do

    1.  Using SHPDedigner, select the webPart and from the ribon, select as bellow

    Now, you will see in the code side that the code a real code.

    What you have to do, search for this  code

          <td class="ms-vb" colspan="99">
            <xsl:value-of select="$NoAnnouncements"/>
            <xsl:if test="$ListRight_AddListItems = '1'">
              	<xsl:text ddwrt:whitespace-preserve="yes" xml:space="preserve"> </xsl:text>
              <xsl:value-of select="$NoAnnouncementsHowTo"/>

    In the line

    <xsl:value-of select="$NoAnnouncements"/>

    insert you message , like

          <td class="ms-vb" colspan="99">
            <xsl:value-of select="'No News, Good News :)'"/>
            <xsl:if test="$ListRight_AddListItems = '1'">
              	<xsl:text ddwrt:whitespace-preserve="yes" xml:space="preserve"> </xsl:text>
              <xsl:value-of select="$NoAnnouncementsHowTo"/>

    Romeo Donca, Orange Romania (MCSE, MCTS, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

    • Proposed as answer by JeremyGB Wednesday, September 11, 2013 5:24 PM
    Tuesday, April 24, 2012 8:05 PM
  • Romeo - thank you for this guidance.   I made the changes you outlined and see the "No News is Good News" appear in the grid, replacing the default text.  However, when I save the page that contains this webpart, it retains the default $NoAnnouncements message.  I have ensured I am checking the page out, publishing, and approving it.  But I see no difference in the webpart no items message. 

    Any further advice?  Can someone say how to alter the default no items text in an xsltwebpart?  Thank you.

    • Edited by swhite88 Monday, November 12, 2012 7:43 PM
    Monday, November 12, 2012 7:43 PM
  • swhite88 - Try adding a single quote around your new message and inside the double quote.  --> "'No News is Good News'"

    That worked for me.

    Thanks Romeo.

    Wednesday, September 11, 2013 5:27 PM
  • As a note to folks looking for a solution to this question for Office 365 or SharePoint 2013, you can edit the message using JS Link and CSR. For details and example code see this blog post

    SharePoint Consultant | SharePoint MVP | <a href=""> My Blog</a> | <a href="">Minnesota SharePoint User Group (MNSPUG)</a>

    Wednesday, January 14, 2015 7:59 AM