Nintex Connect

The Official Community Site for Nintex Software Products, including Nintex Workflow 2007, 2010 and 2013; Nintex Workflow for Project Server 2010; Nintex Reporting 2008 and Nintex Analytics 2010; Nintex Forms 2010; Nintex Live and Nintex SmartLibrary.
Welcome to Nintex Connect Sign in | Join | Help
in Search

Question: Query list action and CAML Editor

Last post 01-22-2013, 5:17 PM by Vadim_Tabakman. 9 replies.
Sort Posts: Previous Next
  •  06-02-2011, 3:41 PM 17310

    Question: Query list action and CAML Editor

    Scenario: We've built a CAML query to go and grab a record from another list.  Ideally, we want to grab a single column.  Assuming we have the complete record is there a way we can select the field we want so we can store it in the 'People & Groups' field and pass it over? 

    Filed under: , ,
  •  06-03-2011, 1:50 AM 17317 in reply to 17310

    Re: Question: Query list action and CAML Editor

    Hi,

    Behind the action configuration the query list aciton also uses a CAML query. You can change the editor to CAML and then enter your query. You can then configure the query list action to return a specifc field only.

    Also, when defining the query you should be able to specify a single field to return.

  •  06-03-2011, 8:00 AM 17324 in reply to 17317

    Re: Question: Query list action and CAML Editor

    Peter D:

    Hi,

    Behind the action configuration the query list aciton also uses a CAML query. You can change the editor to CAML and then enter your query. You can then configure the query list action to return a specifc field only.

    Also, when defining the query you should be able to specify a single field to return.

     I might be missing something.  I switch to CAML editor, have the option to query an alternative site, enter the URL, then enter a CAML query to grab the appropriate record based on the <where> tag.  At that point I'm not certain how to configure the query list action to return a specific field only.  The builder is inaccessible and so it appears (to me at least) that I can only use the CAML editor to complete the query.  If this is the case, then I'm not clear on is the CAML syntax to grab a specific field. 

     If you have any further clarification to offer on this I'd be very grateful :)

  •  06-03-2011, 10:12 AM 17331 in reply to 17324

    Re: Question: Query list action and CAML Editor

    Hi Carmien,

    this is what I do in situations like this.

    Firstly, the Query List action will only return one field.  That is all it is built to return.  If you needed multiple fields, you'd have to have multiple Query List actions.  So that already helps.

    Next, what I do is open the Query List action and select a list that is similar to the one I'm going to query.  If you are going to be querying another site, just for this step, go to that site, go to the list and start creating a workflow.  (you won't be publishing it or saving it).  Add a Query List action, select your list and then you'll be able to configure the filter part.

    Once you have done this, click the CAML Editor check box, and you'll see the CAML that has been built for you.  You can now copy this CAML (xml) and go back to your real workflow, open your Query List action and in the CAML Editor mode, paste in your CAML query.

    The hard work is done.  Now you just need to make some small modifications to the filter part to make sure you are filtering based on information you currently have in your workflow.  eg. you may need to insert a workflow variable or a common property.

    I hope this helps.

  •  06-03-2011, 2:34 PM 17337 in reply to 17331

    Re: Question: Query list action and CAML Editor

    Vadim, as always you deliver the goods!  What a simple solution.  I love it. Thanks very much.
  •  06-03-2011, 3:10 PM 17338 in reply to 17337

    Re: Question: Query list action and CAML Editor

    Always happy to help.
  •  01-22-2013, 4:35 PM 27647 in reply to 17338

    Re: Question: Query list action and CAML Editor

    I have the same scenario, and I tried the solution given but am getting the following error when I try and run the Query List.  "Data at the root level is invalid. Line 1, position 1."  I have specified the site url where the list is located and put that in the alternate path.  And here is my CAML query.  Any idea why I'm getting the error?

    Query>
    <Lists>
      <List ID="{AEDAE4DC-A18D-4D99-8F20-8EF0143BB2D2}" />
    </Lists>
    <ViewFields>
      <FieldRef Name="AssignedTo" />
    </ViewFields>
    <Where>
      <Eq>
        <FieldRef Name="Title"  />
        <Value Type="Text">Release Management Admin</Value>
      </Eq>
    </Where>
    </Query>

  •  01-22-2013, 4:53 PM 27648 in reply to 27647

    Re: Question: Query list action and CAML Editor

    Hi Murphybp2,

    What I try, is copy and paste the xml into an online xml formatter to see if it's valid xml.

    eg. http://www.xmltoolbox.com/

  •  01-22-2013, 4:57 PM 27649 in reply to 27648

    Re: Question: Query list action and CAML Editor

    Thanks.  I was missing the "<" before the word Query.  It works now.
  •  01-22-2013, 5:17 PM 27650 in reply to 27649

    Re: Question: Query list action and CAML Editor

    Oh good one.  I actually saw that, but I thought it was just a copy and paste thing.

    Glad it was something simple.

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems