DVWP Query with multi user field returns empty field

Clayton Firth
  • DVWP Query with multi user field returns empty field Clayton Firth

    I have created a recursive query that contains 2 multi user fields. After much thrashing, where I would add the and had my query return no results, I found that the FieldRef needed to include Nullable="TRUE" and Type="UserMulti".

    This works, in the query now returns the correct number of records, however the value in my 2 multi user fields is empty.

    <View>
      <Webs Scope="Recursive"></Webs>
      <View>
        <ViewFields>
          <FieldRef Name="Development_x0020_Status" />
          <FieldRef Name="Title" />
          <FieldRef Name="FileDirRef" />
          <FieldRef Name="ID" />
          <!-- Field which do not return values -->
    
          <FieldRef Name="Responsible" Nullable="TRUE" Type="UserMulti" />
          <FieldRef Name="Accountable" Nullable="TRUE" Type="UserMulti" />
    
          <!-- // Field which do not return values -->
          <ProjectProperty Name="Title" />
        </ViewFields>
      </View>
      <Query>
        <OrderBy>
          <ProjectProperty Name="Title" Ascending="TRUE" />
          <FieldRef Name="Title" Ascending="TRUE" />
        </OrderBy>
      </Query>
    </View>
    

    I'm trying to access "Accountable".

    <xsl:value-of select="@Accountable" />
    

    I've seen a few posts that indicate that this was a problem pre-SP2 however my farm is already running SP2 with the August CU.

    Has anyone managed to get this sort of query working?

  • I generally try outputting the raw XML onto the page. That will tell me if the raw data is there to be had or whether it is my xslt.

    <xmp><xslt:copy-of select="." /></xmp>
    

    Once you know what the XML looks like, post it and we can see if the xslt needs work or if the query needs to change.

Tags
data-view-web-part
Related questions and answers
  • ;FieldRef Name="StreamName" Ascending="TRUE" /&gt; &lt;FieldRef Name="Title" Ascending="TRUE" /&gt; &lt;/OrderBy> &lt;/Query>; &lt;/View> One of the things i would now...I have successfully created a DVWP which queries all lists in my subsites and returns the correct columns using the following selectcommand: &lt;View> &lt;Webs Scope="Recursive"&gt;&lt;/Webs> &lt;View> &lt;ViewFields> &lt;FieldRef Name="Development_x0020_Status" /&gt; &lt;FieldRef Name="Title" /&gt; &lt;FieldRef Name="FileDirRef" /&gt

  • ' /&gt; &lt;Value Type='Lookup'&gt;1&lt;/Value> &lt;/Eq> &lt;/Where> &lt;/Query>; The problem is that this SPQuery returns results only for the first 13 lookup columns. If I put in the FieldRef the internal name for lookup column no 14 or above, it is not working anymore. Why? If I don't use LookupId='TRUE' and do this: (use the value of the lookup and not the id) &lt;Query>; &lt;Where> &lt;Eq> &lt;FieldRef Name='Relaterat_x0020_till_x0020_avtal' /&gt; &lt;Value Type='Lookup'&gt;Test avtal</Value>

  • ;/RenderPattern> In WSS 3.0, this would render the 2nd column in the field as a hyperlink in the LVWP, which is what I want. In SharePoint 2010, I tried adding TRUE to my field type definition...Has anybody upgraded an old custom field type to use the new XSL transform in SharePoint 2010? I have a multi-column field type, and want the Display pattern to render the 2nd "column", which contains a hyperlink. My CAML render pattern looks like: &lt;RenderPattern Name="DisplayPattern"&gt; &lt;Switch> &lt;Expr> &lt;Column /&gt; &lt;/Expr> &lt;Case Value

  • Name = "ItemName" /&gt; &lt;HTML>&lt;![CDATA[&lt;/a>&lt;br/&gt;Thank You<br/&gt;]]&gt;&lt;/HTML> &lt;/Case> &lt;Case Value = "2"&gt... Name="DisplayName#{Field}" HTMLEncode="TRUE" /&gt; &lt;HTML>&lt;![CDATA[ : ]]&gt;&lt;/HTML> &lt;GetVar Name="NewValue#{Field}" /&gt; &lt...="EventType" /&gt; &lt;/Expr> &lt;Case Value = "1"&gt; &lt;HTML>New Content on Latest Events</HTML> &lt;/Case> &lt;Case Value = "2"&gt

  • " DataSourceMode="List" UseInternalName="true" selectcommand="&lt;View&gt;&lt;Query&gt;&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name=&quot;ID&quot;/&gt;&lt;Value Type=&quot;Counter&quot;&gt;{ID}&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&lt;OrderBy&gt;&lt;FieldRef Name=&quot;PublishedDate&quot; Ascending...;_ModerationStatus&quot;/&gt;&lt;Value Type=&quot;Text&quot;&gt;Approved&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&lt;OrderBy&gt;&lt;FieldRef Name=&quot

  • "/&gt; &lt;xsl:value-of select="sum($Rows/@Distance[.!=''])" /&gt; &lt;/xsl:template> &lt;/xsl:stylesheet> The result is: "NaN", so I figure that my XSLT is wrong. Question is: How do I write the XSLT to calculate and show the sum of all values in the "Distance" column in a Data View Web Part? The column might have empty values (does not have empty values now by the way... processor stylesheet. expected token ')' found 'NAME'. Update 2: &lt;xsl:template match="/"&gt; xsum //Distance = &lt;xsl:call-template name="xsum"&gt;&lt;xsl:with-param name="currnode" select="//row

  • uses a DataFormWebPart which contains xsl stylesheet. It has a 'Complete Task' button as below: &lt;td>&lt;input type="button" name="btnMarkSubmited" value="Complete Task" onclick="javascript: {ddwrt...:EcmaScriptEncode($ListName),'};'))}"&gt;&lt;/input>&lt;/td> I need to add javascript within the DataFormWebPart so I can update another form field when the user clicks the 'Complete Task' button. I...;DataSources> &lt;SharePoint:SPDataSource runat="server" DataSourceMode="ListItem" UseInternalName="true" selectcommand="&lt;View&gt;&lt;ViewFields&gt;&lt;FieldRef Name

  • ="{CE8F7528-E643-4473-94E0-BAA57BD2F6E6}" Name="TeamName" StaticName="TeamName" DisplayName="Team Name" Type="Text"&gt; &lt;/Field> &lt;Field ID="{E508D1FA-D3A5-4e91-828B-3BFB43D4F7C5}" Name... happening. When I activate ContentTypes, the content type and field are deployed as expected into my site collection. When I activate Registration, the list is provisioned and the content type is added as expected. When I try to add a new item to the list, the list form only shows the Title field from Item. Now, here's the weird part. If I add a second content type to the list (through the UI

  • I have a list with an URL-field. Nothing special, just the OOTB Hyperlink-field. I want to execute a CAML-query that selects items with a certain value in the description part of the URL-field. CAML &lt;Query>; &lt;Where> &lt;Contains> &lt;FieldRef Name="URL" /&gt; &lt;Value Type="URL"&gt;text</Value> &lt;/Contains> &lt;/Where> &lt;/Query>; Result Only items with 'text' in de url part are selected, if a item has 'text' in the description part it is not selected. How do i select items based the description of the URL?

Data information