Nintex Connect

The Official Community Site for Nintex Software Products, including Nintex Workflow 2007, Nintex Podcast 2007 and Nintex SmartLibrary.
Welcome to Nintex Connect Sign in | Join | Help
in Search

CAML Query to access items in Document Library with folders not working

Last post 02-10-2010, 6:56 PM by Stiegl. 7 replies.
Sort Posts: Previous Next
  •  12-23-2009, 10:05 PM 8017

    CAML Query to access items in Document Library with folders not working

    I am trying to read items stored in folders at multiple levels within a Document Library. I am using the CAML version of the Query List function using the following, but no data is being returned.  I have seen some other discussions on this subject in the forum, and tried various alternatives such as using 'RecursiveAll' for the scope, but there doesn't seem to be anything that works for me.  Have you any ideas?

     <Query>
        <Lists>
            <List ID="{C8C3F2F7-D243-4C91-9C38-1212AFD471D5}" />
        </Lists>
        <ViewFields>
            <FieldRef Name="ID" />
        </ViewFields>
        <Where>
            <Eq>
                <FieldRef Name="Contact_x0020_ID" />
                <Value Type="Text">{WorkflowVariable:ContactFromIDText}</Value>
            </Eq>
        </Where>
        <QueryOptions>
           
            <ViewAttributes Scope="Recursive" />
        </QueryOptions>
    </Query>

    Filed under: , ,
  •  12-24-2009, 3:07 PM 8029 in reply to 8017

    Re: CAML Query to access items in Document Library with folders not working

    Hi,

    Try the following CAML without QueryOptions.

    <Query>
        <Lists>
            <List ID="{C8C3F2F7-D243-4C91-9C38-1212AFD471D5}" />
        </Lists>
        <ViewFields>
            <FieldRef Name="ID" />
        </ViewFields>
        <Where>
            <Eq>
                <FieldRef Name="Contact_x0020_ID" />
                <Value Type="Text">{WorkflowVariable:ContactFromIDText}</Value>
            </Eq>
        </Where>
        <ViewAttributes Scope="Recursive" />
    </Query>

  •  12-30-2009, 6:43 PM 8083 in reply to 8029

    Re: CAML Query to access items in Document Library with folders not working

    Many Thanks Peter - that's fixed it!
  •  02-05-2010, 9:07 PM 8722 in reply to 8029

    Re: CAML Query to access items in Document Library with folders not working

    Hello Peter,

    I have tried your solution, this is my query:
    <Query>
        <Lists>
            <List ID="{D069C0D4-09D8-4A93-9D80-0BC03378CD18}" />
        </Lists>
        <ViewFields>
            <FieldRef Name="ID" />
        </ViewFields>
        <Where>
           <And>
                <And>
                    <Eq>
                        <FieldRef Name="ContentType" />
                        <Value Type="Text">test</Value>
                    </Eq>
                    <Eq>
                        <FieldRef Name="Start_x0020_Review_x0020_workflow_x0020_now" />
                        <Value Type="Boolean">No</Value>
                    </Eq>
                </And>
                <Leq>
                    <FieldRef Name="Review_x0020_Date" />
                    <Value Type="DateTime">{WorkflowVariable:DateString}</Value>
                </Leq>
            </And>
        </Where>
        <ViewAttributes Scope="Recursive" />
    </Query>

    But it seems that after adding the ViewAttributes, it completely ignores the Where clause and returns all documents.

    Any ideas?

  •  02-08-2010, 10:50 AM 8744 in reply to 8722

    Re: CAML Query to access items in Document Library with folders not working

    Hi,

    Can you please let us know which version of Nintex Workflow you are using, we found an issue where recursive was causing the Where clause to be ignored. This has been fixed in the latest builds.

    There are two ways to determine which version and build of Nintex Workflow 2007 you have installed.

    The first is to navigate to any list or library in a site that has Nintex Workflow 2007 activated.  Then load the Workflow Designer by choosing to create a new workflow or by editing an existing workflow.  Open the configuration dialog for any workflow action and a build number will appear at the bottom left in grey text. The number is comprised of 5 digits in the format “1XXXX”.

     

    The other way to determine your version number is from within SharePoint Central Administration.  In Central Admin, click the “Application Management” tab, then scroll to the Nintex Workflow section and click the Licensing link.  The build number should be visible at the bottom of the licensing information that is displayed.

     

  •  02-08-2010, 8:44 PM 8758 in reply to 8744

    Re: CAML Query to access items in Document Library with folders not working

    Hi Peter,

    The version number appears to be 10905

    Regards,
    Klaas

    Filed under:
  •  02-09-2010, 3:16 PM 8774 in reply to 8758

    Re: CAML Query to access items in Document Library with folders not working

    Hi,

    I have emailed you a link to the latest version and update instructions via support@nintex.com.

  •  02-10-2010, 6:56 PM 8807 in reply to 8774

    Re: CAML Query to access items in Document Library with folders not working

    Thanks Peter, I'll try that.
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems