10,730
edits
Line 213: | Line 213: | ||
</entity> | </entity> | ||
</fetch></syntaxhighlight> | </fetch></syntaxhighlight> | ||
== Active questionnaire templates and recent answers == | |||
This fetch for the questionnaire entity includes: | |||
* Active and published questionnaire templates | |||
:: Consider including also archived templates if you are using full template dependency - to ensure that answered questionnaires dependent on archived templates can be displayed. | |||
* Answered questionnaires completed within the last 30 days. | |||
All snippets are excluded. | |||
<syntaxhighlight lang="xml><fetch version="1.0"> | |||
<?xml version="1.0"?> | |||
<fetch version="1.0"> | |||
<entity name="resco_questionnaire"> | |||
<filter type="and"> | |||
<filter type="or"> | |||
<filter type="and"> | |||
<condition attribute="resco_istemplate" operator="eq" value="1"/> | |||
<filter type="or"> | |||
<condition attribute="statuscode" operator="eq" value="1"/> | |||
<condition attribute="statuscode" operator="eq" value="473220002"/> | |||
</filter> | |||
</filter> | |||
<filter type="and"> | |||
<condition attribute="resco_istemplate" operator="eq" value="0"/> | |||
<filter type="or"> | |||
<condition attribute="modifiedon" operator="today"/> | |||
<condition attribute="modifiedon" operator="last-x-days" value="30"/> | |||
</filter> | |||
</filter> | |||
</filter> | |||
<filter type="or"> | |||
<condition attribute="resco_issnippet" operator="eq" value="0"/> | |||
<condition attribute="resco_issnippet" operator="null"/> | |||
</filter> | |||
</filter> | |||
</entity> | |||
</fetch> | |||
</syntaxhighlight> | |||
== Complex example == | == Complex example == |