- This topic is empty.
- AuthorPosts
-
- 04/27/2010 at 2:43 am #4864
AnonymousParticipantHi
One way to get around this is to use Calculated Column with formatting rule for the Body column. My suggestion is to use the formmating runction TRIM for the Calculated column on Body column. White space including new line character can be removed allowing the CAML filter to check on the Calculated column.
1. Create a Calculated Column "Body2" with formmatting: =TRIM([Body])
2. Use CAML Filter on Calcualted Column
<IsNotNull><FieldRef Name="Body2"/></IsNotNull>Let me know if this helps.
Thanks, - 04/27/2010 at 4:05 am #3833
AnonymousParticipantThis might be a CAML question or maybe just a web part configuration question. I have a list field (Body) that I would like to use as a filter so that I display only those list items that have content in the “Body” field. I have created a CAML filter that says <IsNotNull> <FieldRef Name=”Body” /> </IsNotNull> The problem is that the some of the body fields contain a carriage return only in that field so it displays as it would if there were other content in it. Does anyone know of a way to filter out the white-space so that I only get valid list items with content?
- 04/27/2010 at 4:05 am #7251
AnonymousParticipant– thanks very much for this tip! I can see this coming up many times in the future and I am glad to here that there is a good trim function available.
- 04/27/2010 at 10:19 am #4866
AnonymousParticipanttest response
-
- AuthorPosts
You must be logged in to reply to this topic.