none
how to filter view for not null in a multiline text field? RRS feed

  • Question

  • I am trying to create a view through the SP UI.  I want to include those list items that have any text at all in the field I am checking. I tried "is greater than"  (nothing entered into the next box) and I tried "is not equal to" (nothing entered into the next box). 
    Nothing seems to get what I want.

    Is there a way to filter for  not null in a field?
    • Edited by Mike Walsh FIN Friday, January 1, 2010 8:47 AM Don't write NOT in caps. There is no need for it. Leave Titles normal. We can read them without Caps
    • Moved by Mike Walsh FIN Friday, January 1, 2010 8:48 AM How can doing something via "the SP UI" possibly be a programming question? Moving to Admin. (From:SharePoint - Development and Programming)
    • Edited by run4it Monday, January 4, 2010 8:45 PM
    Thursday, December 31, 2009 9:02 PM

Answers

  • Hi,

    I think it is by design that the data type multiple lines of text can only use “contains” and “begins with” operators. You can filter the list view using SharePoint Designer, Open your list AllItem.aspx page in SPD > "Convert to XSLT Data View"> in the “Comman Data View Tasks”, click “Filter” > in “Field Name” select your field, in “Comparison” select “Not Null”. After this, the list view will display the items when this column is not null.

    Hope it helps.


    Xue-Mei Chang
    Tuesday, January 5, 2010 9:39 AM
    Moderator

All replies

  • By using "is not equal to" in the filter and entering no value in the text box should work. Is the column on which you are applying a filter "Text" field?
    • Proposed as answer by Sushma677 Friday, May 27, 2011 8:49 PM
    Friday, January 1, 2010 6:34 AM
  • This does not work.  I get a popup box that reads "The filter type you selected cannot be used with this field.  To filter fields that contain multiple lines of text, use "contains" or "begins with" operators.

    My column type is Multiple lines of text.

    Later --- I was able to accomplish my task by creating 5 filters, each one checking for a vowel.  Example --
    "contains"  value "i".  This seems really hokey to me.  There's got to be a better way .....
    Monday, January 4, 2010 7:47 PM
  • Hi,

    I think it is by design that the data type multiple lines of text can only use “contains” and “begins with” operators. You can filter the list view using SharePoint Designer, Open your list AllItem.aspx page in SPD > "Convert to XSLT Data View"> in the “Comman Data View Tasks”, click “Filter” > in “Field Name” select your field, in “Comparison” select “Not Null”. After this, the list view will display the items when this column is not null.

    Hope it helps.


    Xue-Mei Chang
    Tuesday, January 5, 2010 9:39 AM
    Moderator
  • thank you.  I can try that.  Can you tell me please, if there are any ramifications I should know about if I convert my list to XSLT Data View?  I am not sure what that actually does.

    Also, I only want to apply that condition on one specific column in a view, and I display that view in a ListViewWebPart.  So I'm thinking I just do that conversion on that file, correct?
    Tuesday, January 5, 2010 4:51 PM
  • Hi,

    “Convert to XSLT Data View” will covert list view to a xslt data view, SPD retrieves data from a data source in the form of XML (Extensible Markup Language (XML): A condensed form of Standard Generalized Markup Language (SGML) that enables developers to create customized tags that offer flexibility in organizing and presenting information.) and displays that data by using XSLTs (XSL Transformation (XSLT): A file that is used to transform XML documents into other types of documents, such as HTML or XML. It is designed for use as part of XSL.). Data Views present live views of data that you can filter, sort, or group. You can also change the layout, apply styles, or apply conditional formatting in a completely WYSIWYG (what you see is what you get) environment. For more information about Data View, please refer to: http://office.microsoft.com/en-us/sharepointdesigner/CH100667641033.aspx

    If you only apply the filter in one view, you only need to covert the view. Or you can create a data view to display the list data and then filter the data view.

    Hope it helps.

     

     


    Xue-Mei Chang
    Thursday, January 7, 2010 9:50 AM
    Moderator
  • A quick fix I came up with was to create a list view filter using

    "Open Text Contains 'a'"

    or

    "Open Text Contains 'e'"

    or

    <etc. for I, O, U, Y>

    I know... it doesn't play well with other filter criteria and it's english language-dependent but I was happy with the results and I'm on to better things. I hope MS will improve the filter set in the future.  


    Jay

    • Proposed as answer by ran009 Friday, May 13, 2016 10:23 PM
    Tuesday, June 25, 2013 3:55 PM
  • Jay....you are a genius.   This works like a charm!!!!!!

    Sterling Heights Michigan

    Monday, November 11, 2013 4:45 PM
  • So simple, and very effective. Thank you!
    Wednesday, November 25, 2015 2:39 AM
  • Interesting discovery, if your multi-line field accepts rich text, it will match on "i" every time (probably a DIV statement under the covers).  So, you may need to go with the 80% rule and look for a,e,o, and u only.

    Tuesday, September 6, 2016 10:11 PM