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

What I normally tend to do is convert the dates to YYYYMMDD format for both the @StartDate and the Today(), that way they're 8 digit numbers which I then compare.


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 ...


5

AFAIK there are not significant improvements for Datasheet functionality for end users in SharePoint 2010, and I haven't seen any in your focus areas.


5

If you are using SP2010 you can connect to a SQL Server table using BCS External Content types and read/write them pretty easily. What version of SharePoint are you using?


5

On your DVWP field, do you have disable-output-escaping="yes" added to the xslt reference for that item? This will display apostrophe's and ampersands properly.


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

If you use a Dataview Webpart of one site in another site, It will not work as it refers sites and lists by GUIDs which will change even if their name are same. Try to update the GUIDs as well.


4

In the Ajax properties of the webpart, uncheck "enable asynchronous update" (the text may be slightly different, Im working with SP with Spanish language pack)


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 ...


4

I do not think that can be done. It shows the 4th view only once we click on it. (Dynamic HTML) But I found a workaround. Go to Edit Page. Click on Add web part and add a content editor with the links to all 4 views. Edit list view web part and disable the view selector menu. Also if needed, set tool bar to no tool bar and remove search. (Look where to ...


3

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 ...


3

The ID won't be there. You'll need to look up the value in the source list to get at the ID: <xsl:variable name="LookupID" select="/dsQueryResponse/List2/Rows/Row[@Title = current()/@ColumnX]"/>


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

This should work: <xsl:value-of select="sum($Rows[string-length(@Distance) &gt; 0]/@Distance)" /> M.


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

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

Assuming you already have a working data view webpart: Open SharePoint designer and the page that the data view web part exists on From the Options tab of the Data View Tools section in the ribbon, select Parameters Create a new parameter of type Query String - specifiy the parameter name, the query string variable name (what its called in the URL), and ...


3

You don't need to manipulate the web part settings manually in the code. These settings are also available on the ribbon. Select the DVWP in SharePoint Designer 2010 in Design View and then use the Paging command on the Options ribbon of the Data View Tools:



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