Query List with AND condition (e. g. filtering by content type and URL) does not work

Hallo dear community,


I am struggling with the following situation:

I have a library with a workflow triggered by uploading of a document (create event).

In this workflow I get the URL of the item (checked log: works!)

I truncate this URL via /[^/]*$ pattern to get the URL of the parent folder (checked log: works!)

Now I use query list on same library to find another document in same folder and extract it's ID or name or any other property: for this I use it's content type (Auftragsvorlage) AND the encoded absolute URL of the parent folder (variable sltParentURL) via "contains" or "begins with " condition.

Unfortunately I don't get any results, whatever I try - if I remove the URL condition, the query gives me correct results in form of all available documents of that content type throughout the library. But it does not let me filter that down to the one in the folder with known URL.

In following the CAML query - can someone hint me at what I am doing wrong here? I tried so many things and somehow suspect that maybe the syntax of the URL is wrong here - my workflow gives me the URL as follows: 

Item Url: http.../AUT%2022-001/2.pdf

Parent Url after truncation: http.../AUT%2022-001 


<List ID="{3AF695DA-41CB-4850-8E8F-037FC5DA46DF}" />
<FieldRef Name="ID" />
<FieldRef Name="ContentType" />
<Value Type="Computed">Auftragsvorlage</Value>
<FieldRef Name="EncodedAbsUrl" />
<Value Type="Computed">{WorkflowVariable:sltParentURL}</Value>
<ViewAttributes Scope="RecursiveAll" />


Thanks a lot!

P. S: since I have very limited experience with CAML Query, I put it together in Nintex and then just switched to CAML Editor adding "ALL" to recursive. 

Labels: (1)
0 Kudos