Live Framework DataEntry Query $filter startswith does not work with Type fieldI have found a potential bug and need some validation or a work around.<br/><br/>i have a LINQ query that looks like:<br/><br/> <pre lang="x-c#"> var tagEntries = (from te in mc.TagsDF.CreateQuery&lt;DataEntry&gt;() where te.Resource.Type.StartsWith(type) select te);</pre> <p><span style="font-size:x-small">This is generating a URL like:<br/><br/><a href="https://user-ctp.windows.net/V0.1/Mesh/MeshObjects/&lt;MeshObjectID&gt;/DataFeeds/&lt;DataFeedID&gt;/Entries/?$filter=startswith(Type,'Tag'">https://user-ctp.windows.net/V0.1/Mesh/MeshObjects/&lt;MeshObjectID&gt;/DataFeeds/&lt;DataFeedID&gt;/Entries/?$filter=startswith(Type,'Tag'</a>)<br/><br/>Problem: This query does not work.  Same behavior executing directly from the LiveFX Browser...<br/><br/>However, the following query with Title instead of Type will work:<br/><br/><a href="https://user-ctp.windows.net/V0.1/Mesh/MeshObjects/&lt;MeshObjectID&gt;/DataFeeds/&lt;DataFeedID&gt;/Entries/?$filter=startswith(Title,'Tag'">https://user-ctp.windows.net/V0.1/Mesh/MeshObjects/&lt;MeshObjectID&gt;/DataFeeds/&lt;DataFeedID&gt;/Entries/?$filter=startswith(Title,'Tag'</a>)<br/><br/>There is very little documentation on $filter limitations--only a small list of examples, of which startswith(Type,'value') is excluded.<br/><br/>Please advise asap.<br/></span></p>© 2009 Microsoft Corporation. All rights reserved.Thu, 09 Jul 2009 03:33:57 Z610566a9-03b8-4b52-bc8f-2a5907e93ba9http://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/610566a9-03b8-4b52-bc8f-2a5907e93ba9#610566a9-03b8-4b52-bc8f-2a5907e93ba9http://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/610566a9-03b8-4b52-bc8f-2a5907e93ba9#610566a9-03b8-4b52-bc8f-2a5907e93ba9Shawn Davisonhttp://social.msdn.microsoft.com/Profile/en-US/?user=Shawn%20DavisonLive Framework DataEntry Query $filter startswith does not work with Type fieldI have found a potential bug and need some validation or a work around.<br/><br/>i have a LINQ query that looks like:<br/><br/> <pre lang="x-c#"> var tagEntries = (from te in mc.TagsDF.CreateQuery&lt;DataEntry&gt;() where te.Resource.Type.StartsWith(type) select te);</pre> <p><span style="font-size:x-small">This is generating a URL like:<br/><br/><a href="https://user-ctp.windows.net/V0.1/Mesh/MeshObjects/&lt;MeshObjectID&gt;/DataFeeds/&lt;DataFeedID&gt;/Entries/?$filter=startswith(Type,'Tag'">https://user-ctp.windows.net/V0.1/Mesh/MeshObjects/&lt;MeshObjectID&gt;/DataFeeds/&lt;DataFeedID&gt;/Entries/?$filter=startswith(Type,'Tag'</a>)<br/><br/>Problem: This query does not work.  Same behavior executing directly from the LiveFX Browser...<br/><br/>However, the following query with Title instead of Type will work:<br/><br/><a href="https://user-ctp.windows.net/V0.1/Mesh/MeshObjects/&lt;MeshObjectID&gt;/DataFeeds/&lt;DataFeedID&gt;/Entries/?$filter=startswith(Title,'Tag'">https://user-ctp.windows.net/V0.1/Mesh/MeshObjects/&lt;MeshObjectID&gt;/DataFeeds/&lt;DataFeedID&gt;/Entries/?$filter=startswith(Title,'Tag'</a>)<br/><br/>There is very little documentation on $filter limitations--only a small list of examples, of which startswith(Type,'value') is excluded.<br/><br/>Please advise asap.<br/></span></p>Fri, 03 Jul 2009 17:33:37 Z2009-07-03T17:33:37Zhttp://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/610566a9-03b8-4b52-bc8f-2a5907e93ba9#4ed0b24a-1769-47e2-a7ea-bab7dac29425http://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/610566a9-03b8-4b52-bc8f-2a5907e93ba9#4ed0b24a-1769-47e2-a7ea-bab7dac29425Shawn Davisonhttp://social.msdn.microsoft.com/Profile/en-US/?user=Shawn%20DavisonLive Framework DataEntry Query $filter startswith does not work with Type fieldUpdate<br/><br/>It appears my problem is currently isolated to a particular DataFeed.  I have tested the $filter=startswith(Type,'Tag') function on other DataFeeds with success.  However, on the feed i need it to work on, i'm receiving the following error:<br/><br/> <pre>{ &quot;Title&quot; : &quot;ErrorResource&quot;, &quot;Code&quot; : 410, &quot;Message&quot; : &quot;An error has occurred.&quot; }</pre> Cause of Problem<br/><br/>After more investigation, I have determined the cause of this problem--these functions break if there are DataEntries without a Type field or Type == null.  In summary:<br/><br/>- You CANNOT use the startswith() or contains() filters if the DataFeed contains a DataEntry where the field referenced in the function (in this case Type) == null.  I presume this applies to other fields; however, i haven't confirmed it--i know it's the case with Type.<br/><br/>- The operators, such as eq and ne work fine on null fields.  Only the partial match functions startswith, contains, etc. will fail.<br/><br/><br/>Work Around<br/><br/><strong>THIS IS A BUG</strong> from my perspective.  I would like the LiveFX team to validate that or explain why if this is as it was intended.<br/><br/>If you use any of the partial match functions, then the work-around is simply to ensure no DataEntries have null values for that field.  In my case, once all of my DataEntries had a value for Type, the partial match functions work.<br/>Fri, 03 Jul 2009 18:20:21 Z2009-07-03T20:48:13Zhttp://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/610566a9-03b8-4b52-bc8f-2a5907e93ba9#d76c36be-c5bd-4aee-b3dc-f46de2ad15ffhttp://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/610566a9-03b8-4b52-bc8f-2a5907e93ba9#d76c36be-c5bd-4aee-b3dc-f46de2ad15ffYi-Lun Luohttp://social.msdn.microsoft.com/Profile/en-US/?user=Yi-Lun%20LuoLive Framework DataEntry Query $filter startswith does not work with Type fieldHello, thanks for reporting this issue. I can reproduce it on my side. Can you please submit a feedback on <a href="https://connect.microsoft.com/site/sitehome.aspx?SiteID=630">https://connect.microsoft.com/site/sitehome.aspx?SiteID=630</a>?<hr class="sig">Lante, shanaolanxing This posting is provided &quot;AS IS&quot; with no warranties, and confers no rights.Mon, 06 Jul 2009 07:08:38 Z2009-07-06T07:08:38Zhttp://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/610566a9-03b8-4b52-bc8f-2a5907e93ba9#9799d1c5-e7aa-4340-9c45-71e79e658da3http://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/610566a9-03b8-4b52-bc8f-2a5907e93ba9#9799d1c5-e7aa-4340-9c45-71e79e658da3Vikas-Ahujahttp://social.msdn.microsoft.com/Profile/en-US/?user=Vikas-AhujaLive Framework DataEntry Query $filter startswith does not work with Type field<p>Thanks shwan for reporting this, please go ahead and log a bug at following link:</p> <p><a href="https://connect.microsoft.com/liveframework/feedback?wa=wsignin1.0">https://connect.microsoft.com/liveframework/feedback?wa=wsignin1.0</a><br/><br/>thanks a lot!</p><hr class="sig">This posting is provided &quot;AS IS&quot; with no warranties, and confers no rights.Wed, 08 Jul 2009 04:58:56 Z2009-07-08T04:58:56Zhttp://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/610566a9-03b8-4b52-bc8f-2a5907e93ba9#b0205ebb-4d35-45a7-99b8-8a6f00d19718http://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/610566a9-03b8-4b52-bc8f-2a5907e93ba9#b0205ebb-4d35-45a7-99b8-8a6f00d19718Shawn Davisonhttp://social.msdn.microsoft.com/Profile/en-US/?user=Shawn%20DavisonLive Framework DataEntry Query $filter startswith does not work with Type fieldBug has been submitted: <div><a href="https://connect.microsoft.com/liveframework/feedback/ViewFeedback.aspx?FeedbackID=473353">https://connect.microsoft.com/liveframework/feedback/ViewFeedback.aspx?FeedbackID=473353</a></div> <div><br/></div> <div><br/></div> <div>It would be very helpful if you could address a related issue:</div> <div><a href="http://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/0fdc319f-296d-4aa6-a6a0-00c397af94e4">http://social.msdn.microsoft.com/Forums/en-US/liveframework/thread/0fdc319f-296d-4aa6-a6a0-00c397af94e4</a></div> <div><br/></div> <div>Thanks, -Shawn.</div>Wed, 08 Jul 2009 22:06:07 Z2009-07-08T22:06:07Z