Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
    
Clayton: Can you post the actual query you are using? Hard to know what's happening without looking at it. –  Marc D Anderson Mar 18 '10 at 23:02
    
Sorry Marc. Code now included in post. –  Clayton Firth Mar 18 '10 at 23:31

2 Answers 2

have you tried running the query in something like U2U caml builder?

If you are getting the data in the query builder, then try double checking the query in your datasource for the dataview web part. Also check that the data is not being cached from old data.

If all looks good try looping through the nodeset, like below, to see what fields are actualy being returned. It could be that it is looking at the wrong list or even possible that the fieldname is different.


share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.