Tag Info

Hot answers tagged

8

I'm not sure if XSLT 1.0 have today's date method. However, XSLT 2.0 has an equivalent current-date() Have you tried? ddwrt:Today() <xsl:value-of select="ddwrt:Today()"/> ddwrt:TodayIso() <xsl:value-of select="ddwrt:FormatDateTime(ddwrt:Today(),1033,'yyyyMMdd')"/>


8

When you add a DVWP to the page in SharePoint Designer, SPD defined a variable which contains the current date for you in the ParameterBindings section: <ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/> Be sure to declare Today as a param at the top of the stylesheet: <xsl:param name="Today" /> Then you can ...


7

I've noticed you've marked your post with 2010, so this makes sense as to why you cannot easily connect to a different datasource. In a nutshell, here's the answer. I'm really not sure why the 'Connect to another library' option was removed. Seems to me, like it was a feature often used. If it's any consolation, at least we are still able to code it.


6

This blog post from Microsoft is highly linked to and describes what you want to do. I've used it before, these days I typically use jQuery and SPServices. Setting lookups typically requires you to pass in the Lookup ID value or the ID;Descriptor. Here's an actual example from a site of mine, it's setting a person/group field, not a lookup though. You ...


4

This issue will sometimes pop up if you commonly access your pages with two urls, i.e. http://mysite.company.com and http://machinename. Verify that the user is accessing the site using the URL specified as the primary address for that zone in Alternate Access Mappings. If you are using the http://machinename url convention, I would strongly recommend that ...


4

If your XML is structured like your file structure try this: /dsQueryResponse/Requests/Rows[ LabID=/dsQueryResponse/Labs/Rows/Row[DataOwner='Abe Miessler']/LabID ] I am assuming that you have a LabID under Rows that was just left out of the screen shot. UPDATE: I tested it with the following XML and it appeared to work: <dsQueryResponse> ...


4

It's rendering as HTML character code. Check out this article: http://www.petestilgoe.com/2010/07/displaying-html-in-the-dataview-webpart-dvwp/ The article suggests changing your XSL to: xsl:value-of disable-output-escaping="yes" select="@MyHTMLFormattedColumn"


4

Basically, it can be done with css with header and table changing: .s4-wpTopTable { background: #FEE; } .ms-WPHeader { background: #FEE; } If you want to apply this to particular web-part, you can add additional css-marker class on you web-part render methods to find you web part instance later or use js/jQuery-client bases techniques to apply/change ...


4

The master page of the mysite is the normal v4.master and doesn't load any user profile. There is a web control in every article page in the mysite that makes sure the profile gets loaded. <SPSWC:ProfilePropertyLoader id="m_objLoader" LoadFullProfileOfCurrentUser="true" runat="server" /> If you like to get this done in the masterpage you need to add ...


3

You need a custom web part that impersonates an authorized user to retrieve the metatdata of the prohibited lists. My first thought was that you could give users access to the lists and use information rights management to stop them viewing the documents, or give them view but not open permissions, but that really only stops a user accidentally viewing the ...


3

Marc Anderson has a blog post that covers stripping HTML from rich text fields to display the first n number of characters of a field. You can probably use a portion of his post to accomplish what you're looking to do: http://mdasblog.wordpress.com/2009/01/20/displaying-the-first-n-words-of-a-long-text-column-with-xsl/


3

YYYMMDDHHmm should work, per James' suggestion in the comments above. Remember that XSL operates on text values, not binary values. <xsl:value-of select="ddwrt:FormatDateTime(string(@Modified) ,1033 ,'yyyyMMdd HHmmss')"/> <xsl:value-of select="ddwrt:FormatDateTime(string(ddwrt:TodayIso()) ,1033 ,'yyyyMMdd HHmmss')"/> Those are the two values ...


3

You can use DataViewWebPart in SharePoint 2010 without any limitations, as far as I know. I often use it from SharePoint Designer 2010. It is even not obsolete or deprecated, as you can see from it's MSDN reference.


3

The XSLT View Web Part is the baby brother of the DVWP, it's easier to set up and configure, but the limitations are with how customisable it is, which are probably the problems you're coming across. Laura Rogers has a screencast video here, where she explains the differences between the two.


3

The DVWP is very much still alive and kicking in 2010. I've moved quite a lot of DVWPs and XSL snippets from 2007 to 2010 and I've not seen any issues. It may be a little hard to see where to insert a DVWP in SharePoint Designer 2010 rather than an XLV Web Part. In the ribbon, go to Insert / Data View, and at the bottom of the menu, you'll see "Empty Data ...


3

At first glance, you are closing off your xsl param in the first line. Then you have an unnecessary and mistyped closing xsl param tag which can be removed. You'll also want to include an xsl:otherwise so that if no multiple selection is made, the text is returned. This might be helpful, look at question 1. You'll need to do a recursive template to do ...


3

You need to modify the XSLT generated to create your custom look. Once you add your DVWP, SPD adds the XSLT to the page. If you switch to split view, you can click your DVWP, and the code block will be highlighted. Before you modify the XSL directly, there are a couple of things you can do to make it easier. Select the base layout that is closest to ...


3

You can add the additional filter clause inside the brackets with and. If both conditions are true, the row (item) will be included in the sum. @Author is a Person or Group column, so you'll need to parse out the part of the HTML which represents the person that you need. See my XSL templates at the SPXSLT Codeplex Project (http://SPXSLT.codeplex.com).


3

This article, by Phil Wicklund, is an article I always go back to that suits your requirements. It uses a dataview web part and a form web part to do wild card searching of the DVWP content. It's geared towards 2007, but the principles apply to 2010.


3

I think the friendly URL is stored in the catalog, not the page itself. You'd probably be better off using a Content Search Web Part (in most cases). It's the "new" way to do DVWP-like stuff, but it's also different tech than you are used to. You can build your own Display Template that sits underneath the CSWP to display the data.


2

Answering my own question! Whatever next? Well, I figured it out. In the value-of statement which displays the Person or Group field, I simply need to disable "output-escaping", so the web part actually renders the HTML instead of simply displaying the raw text. <xsl:value-of select="@Sourced_x0020_By" disable-output-escaping="yes" />


2

Would I be right in thinking that the Workflow action triggered by the button's OnClick is triggered before your jQuery click event? This would mean the form data is captured and the list updated before the jQuery updates your form field... In which case, try updating the form field from within the Workflow itself rather than the jQuery?


2

The question is pretty ambiguous. Something that is "essential" needs to solve a business need, so it depends on what problems you are trying to solve. Documentation may or may not be an issue. I've had web parts that I installed once and never had to think about again. The most common requests I've seen involve Roll-ups. The DVWP can do this, but there ...


2

You can use the values of Query String parameters by setting up parameters in your DVWP and then using those values in your filters. The net effect of this is to alter the CAML to contain the filtering. Creation of each parameter will create a line in the ParameterBindings section like this: <ParameterBinding Name="ID" Location="QueryString(ID)" ...


2

I had the same problem before when I would add a field from the SQL Server data source and make it a dropdown box. The solution, as strange as it seems, was to not drag the dropdown from the data source, but rather add it manually and then bind it to the appropriate field. Taking this approach it seemed to work. I blogged about it last year. This will ...


2

Looks like it is a Microsoft bug, and nothing can be done about this :( Second AttachmentsField control on the page is always displaying this text: ["Attachments" column value] I found that inside both controls' HTML, where is a table with static id: <table id="idAttachmentsTable" border="0" cellSpacing="0" cellPadding="0"> So, this could be ...


2

You'll need to do some substring functions to get the data. In this case, you'd do something like this, you might need to encode the special characters like " < >: <xsl:value-of select="substring-after(substring-before(@YourColumn, '</a>'), 'RootFolder=*">')" /> This is also the case with fields like Person/group fields if you want ...


2

Add a DataView web part for your Picture Library to your page using SharePoint Designer. Customize the XSL to reformat your output into the tags expected by the jQuery. Include the jQuery script and css file reference at the top of your page. Call the jQuery method using the example code you referenced in your question.


2

UserID is simply a parameter which is bound to the CurrentUser CAML variable. SharePoint Designer creates this binding for you whenever you add a DVWP to a page. UserID actually contains more information than just the name, but SharePoint interprets it differently depending on the context. If you output the value it contains with xsl:value-of, you'll see ...



Only top voted, non community-wiki answers of a minimum length are eligible