Archive

Archive for December, 2008

SPQuery DateTime query and the Time ignored

December 11th, 2008 2 comments

The U2U CAML Editor is great but it does mean you don’t take the time to learn CAML properly, eh-hum!

My queries were going very wrong and I couldn’t figure out why, so I pasted them into the CAML query tool and tested it and noticed it didn’t matter what time I set in my query it was ignored.  The CAML editor doesn’t have an option to include time values, so I could not tell what was needed to make it work.

I found this blog post http://ucsharp.wordpress.com/2007/10/11/9/.

It basically tells you that you need to tell the Query to use the timevalues and not to ignore them, this particular part of the query needs that little bit extra

<Value Type=”DateTime” IncludeTimeValue=’TRUE’>2008-12-11T16:07:00</Value>

Go test it in the CAML creator tool and see for yourself!

Thanks ucsharp.

It would seem that CAML girl looks for posts on her great tool, (I would not presume that she reads my blog!), did I miss something ? if not can you tweak a new version to have an includetimevalue checkbox (it shows people its possible)

P.S. Whilst you at it can you add

a Recently opened sites bit too

Remember user creds (securley stored in isolated storage perhaps)

I should shut up really as you can’t complain about something so handy that’s so free.

Technorati Tags: ,,
Categories: development, Sharepoint Tags:

WSS3, Workflow Hint

December 10th, 2008 No comments

When exploring workflow you might want to create a bit of code and have it execute and fire of the debugger to investigate all the properties your expecting are there.

Hint.  In your Execute Code block where you write the code to check stuff out, its worthwhile placing this BEFORE any timeout events you have in your workflow, here I am sitting waiting for the next 60 minutes before my event fires.

In fact I’m finding that a call to Debugger.Break()  doesn’t start the debugger after a timer has started, how queer normally this works on everything.

Needless to say I’m making a quick change to my workflow order for now.

 

Technorati Tags: ,,,
Categories: development, Sharepoint Tags:

Using a ListViewWebPart for Search Results

December 5th, 2008 4 comments

I have had to try and create a Search page that displays its result set in the style of a ListViewWebPart.  This has proven quite tricky.

After a lot of Searching I found various articles on using SPQuery and then the List.RenderAsHtml(Query) to achieve this.  However I found a rather large problem with this method, whilst it queries what I want it to the resulting HTML looks nice but does not do any kind of paging also whilst the sort and filter  drop downs appear at the top of the columns, they don’t actually do any sorting or filtering.

Now that was completely unacceptable.

Read more…