AnsweredAssumed Answered

How to query a sublibrary recursively?

Question asked by JelleD on May 9, 2018
Latest reply on May 23, 2018 by JelleD

Hi,

I am currently working on a validation where I have to check whether a certain field (yes/no) is set to yes in  a subLIBRARY.

 

I am using the querylist  function and have setup the following function:

 

var evidence = [[@Web.QueryList('RiskAttachments', '<Where><And><Eq><FieldRef Name="Link_Control"/><Value Type="Lookup">[[ControlNr]]</Value></Eq><Eq><FieldRef Name="isEvidence"/><Value Type="Boolean">Yes</Value></Eq></And></Where>', 100, 'ID', 'Scope=\"Recursive\"')]];

When I execute the code above it runs but does not return any result. I expect one returned row. I have checked the same CAML query in other tooling and then it return my desired result.
I use as variable in the query the [[ControlNr]]. Even when I pass the value hardcoded is returns an empty result.

(my variable evidence is empty).

 

I assume that my attribute (Scope = recursice)  does not work / isn't working.

Due to the fact that SkyBow RichForms stores documents in sublibraries in folders I expect that I have to query the library recursively.

How to perform a recursive query on the library? Or any other ideas to check for a value in a library?
Any help would be heavily appreciated.

Outcomes