Showing posts with label Customize. Show all posts
Showing posts with label Customize. Show all posts

Sharepoint Designer 2010 List views

Can I find anything good on how these work? - can I heck as like ... not a sausage. Well that's not entirely true there are three blog posts , here is the first:
http://blogs.msdn.com/b/sharepointdesigner/archive/2009/11/16/sharepoint-2010-list-view-blog-series-part-1-introduction-to-the-new-list-view.aspx by Greg Chan, but though he promises oodles of posts we have but three. So like the Flash Gordon style cliff-hangers of old we are left not knowing how Flash escapes certain doom, in our case we don't know how we are to get out of list view doom.
Don't get me wrong, list view are good because they look to scale much better than what we had before but but how do you do any of the things we'd do in DVWP's I've not found out yet, excepting to say that jquery looks to come to our aid for the purpose of representing lists in whatever way we need for example you want horizontal lists, here is some jquery that looks to do the trick http://social.msdn.microsoft.com/Forums/en/sharepointcustomization/thread/ef43f6bd-1276-4760-8996-a6c9eedf75db
I am hoping there are great untapped depth in this that I just haven't got to the bottom of yet.

Sharepoint and redirects.

What I have learnt - using the source in the url is all very well but I have not found it to be universally useable SO.
If you just want to submit a form and have it wizz off to somewhere other than the all items view then you want somethig like this

<input type="button" value="Form Action" name="btnFormAction" onclick="javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={your address goes here with no quotes}')}" /&gp;

However if you want the redirect to be dynamic - and of course that is what you want
then MR autosponge has the answer here

http://autosponge.spaces.live.com/blog/cns!D7F85948C20F0293!233.entry

However what this post doesn't say explicitly is what to do when you want to redirect to a child site that or to a child list so you need the ID of the item to generate the URL - here's what I used


<xsl:variable name="dvt_1_automode">0</xsl:variable>
<xsl:param name="ListItemId">


<xsl:variable name="rec"<>xsl:value-of select="@Title"></xsl:variable>
<xsl:variable name="RedirectLoc">https://blah/sites/isms/<xsl:value-of select="/dsQueryResponse/Rows/Row/@Title"></xsl:variable

or

<xsl:variable name="RedirectLoc">https://blah.com/auditrecnfollowups.aspx?recid=<xsl:value-of select="/dsQueryResponse/Rows/Row/@Title"/>%lt;/xsl:variable>


the xpath /dsquery/Rows/Row/@Title is the important bit that uniquely identifies the attribute. This cost me much swearing, the chief reason being that when the redirect url is wrong IN ANY WAY it just does nothing and gives you a 404 so the only way to test this is to have the $redirectloc redisplayed on the screen till its right.

Got to get started with Jquery

Nice looking introductions and such for those wanting a way in to this http://docs.jquery.com/Tutorials

and here is Jan Tielens - every reliable intro to jquery and sharepoint

http://weblogs.asp.net/jan/archive/2008/11/20/sharepoint-2007-and-jquery-1.aspx

and those nice people at endusersharepoint have some pretty cool stuff too

http://www.endusersharepoint.com/?p=1075

Calculated columns, formulas etc

Sharepoint calculated column Common formulas list http://office.microsoft.com/en-us/sharepointtechnology/HA011609471033.aspx

You've tried [Today] and [Me] here are some more functions http://office.microsoft.com/en-us/sharepointtechnology/CH100650061033.aspx

Introduction to the subject http://office.microsoft.com/en-us/sharepointtechnology/HA101215881033.aspx

http://www.sharepointblogs.com/mkruger/archive/2007/06/26/howto-using-sharepoint-calculated-columns-to-display-a-list-item-as-quot-x-quot-days-old.aspx

Using [Today] inside a calculated column

Well there is a bit of a problem is that you can't - not really though this looks like it does the trick
http://blog.gemsolution.co.uk/2008/01/05/calculated-column-using-today/.
BUT the big problem is this

"the formula will not calculate all list items on refresh but rather by the addition and deletion of a new Today column or by editing each of the list items individually."

So this formula - pretty though it is won't cut the musturd

IF(TEXT(Today,"mmm yyyy")=TEXT([Meeting Date],"mmm yyy"),"Yes","No")

nor can you use this to organize items in a list or library by year by using this formula http://glorix.blogspot.com/2007/07/filter-by-year.html

But to the rescue comes pathtosharepoint

http://pathtosharepoint.wordpress.com/2008/11/24/countdowns-a-second-method/