Queries and Rules Screen

Other versions

The Queries and Rules section allows you to create automatic or manual actions to manage the content settings or create custom reports on SharePoint objects. Crawl your SharePoint farm settings and enforce SharePoint governance policies wherever you need them, in just a couple of steps.

Home Ribbon

SPDocKit - Queries and Rules - Home Ribbon

The following buttons are available in the Queries and Rules home ribbon:

  • New Rule – start a wizard to guide you through the creation of a new rule report.
  • New Query – start a wizard to guide you through the creation of new query report.
  • Edit – make changes in your rule/query configuration.
  • Delete – delete previously created rule, query, or history item.
  • Run – start a manual rule/query execution.
  • Run with Service – start an automatic rule/query execution in the background. Choose whether you would like to receive query results via email or just browse them through the query history once the SPDocKit service has finished.
  • Refresh – refresh query/rule history to receive the latest result updates.
  • Add – create a new folder.
  • Rename – rename an existing folder.
  • Delete – delete the existing history.

Icon Set

While both queries and rules have different icons for manual and automatic executions, only queries have a different icon for history results. A tooltip with a description will appear when you hover over the selected object icon in the Queries and Rules definition tree.


Use the query wizard to create custom reports that will help you determine if all your governance policies have been properly enforced across your SharePoint farm.

Wizard Scope: web applications, site collection(s), subsite(s) for subsite properties, list(s) and libraries for list properties
Supported SharePoint objects: site collections, subsites, lists, list items
Supported Query properties:

  • For site collections: allow designer, anonymous access enabled, customizing pages enabled, database name, detaching pages enabled, language, last modified, lock status, managing URL structure enabled, number of subsites, primary administrator, resource quota exceeded, sandbox solutions enabled, secondary administrator, storage, template, title, UI version, url.
  • For subsites: access request email, access request enabled, created on, has unique permissions, index site content, is root web, language, last modified, offline client availability, title, url.
  • For lists: appear in search, attachments enabled, can create folders, create major versions, create minor versions, created on, dialogs enabled, display on quick launch, has external data source, item count, last modified, list template, major version limit, minor version limit, offline client availability, quick edit enabled, require check out, require content approval, title, url.
  • For list items: checked out to, created by, created on, last modified, list, modified by, site collection, subsite, title, url.

Use the rule wizard to create manual or automatic procedures that will help you enforce SharePoint governance policies.

Wizard Scope: web applications, site collection(s), subsite(s), list(s) and libraries
Supported rule types:

  1. List Rules
    • Attachments – to specify if users can attach files to items in a list.
    • Dialogs – whether to launch a new, edit and display forms in the dialog.
    • Display on the quick launch – whether the documents will be displayed on the quick launch.
    • Document version history – whether a version is created each time you edit a file in a document library.
    • Folders – whether the “New Folder” command is available.
    • Item-level Permissions – specify which items user can read and edit.
    • Offline Client availability – whether this document library should be available for offline clients.
    • Opening Documents in the Browser – whether browser-enabled documents should be opened in the client or browser by default when user clicks on them.
    • Quick edit – whether Quick Edit can be used on this list to bulk edit data.
    • Rating Settings – whether or not items in a list can be rated.
    • Require Check Out – whether users must check out documents before making changes in this document library.
    • Search – list visibility in search results.
  2. Subsite Rules
    • Request Access Mail – specify an email address used for approving access requests for subsite.

Manual Execution

To run a rule or query manually means that you have to start SPDocKit, find appropriate rule or query and press Run button. There is a special way of manual execution, using SPDocKit service. This means that you still have to manually select rule and press Run with Service button, but service will crawl your SharePoint farm in the background and once it finishes, results will appear in rule or query history.

Specially, query wizard allows you to specify whether the query results, both automatic and manual, will be visible only in query history or will also be sent to a specified email addresses. Rule results can be explored only within the SPDocKit user interface.


Automatic Execution

If you choose automatic execution, following triggering options are available:

1. One-Time – configure one specific date and time at which selected wizard will be executed. Wizard will no longer be automatically executed after the specified scheduled time.

In this case, wizard will run only on November 24 at 8:00 hours exactly.

2. Daily – configure the wizard start date and time at which this rule will be executed on a daily basis. You can choose recurrence period, that is if this wizard will run every x days, or will it run every weekday. Minimal recurrence period is one day.

In this case, wizard will run every two days at 8:00 hours, starting from November 24.

3. Weekly – configure the wizard start date and time at which this rule will be executed on a weekly basis. Choose on which days rule will run and recurrence period (every x weeks).

In this case, wizard will run on Tuesday and Wednesday every week, starting from November 24.

4. Monthly configure the wizard start date and time at which this rule will be executed on a monthly basis. Choose on which days of the month rule will run and recurrence period (every x months). The other option is to run wizard on a specified day of the week, every x months.

In this case, wizard will run on first Monday every month, starting from November 24.

5. Quarterly –  configure the wizard start date and time at which this rule will be executed quarterly.

Tips & Tricks

Press Ctrl+Alt+T while focused on Triggers part of the wizard, and see on which dates wizard is scheduled to run!

Each time a selected query wizard is executed, SPDocKit saves the results in the wizard run history. You can see them under the Queries folder structure, under each query definition, marked with an orange arrow. Results are sorted by date and time of the rule execution, so you can see which changes were made with each run.


Also, each time a rule is executed, SPDocKit creates a history record. Records are sorted by date and time of the rule execution. Select a specific rule definition, click the desired date, and a list of applied changes will appear in a grid below.

SPDocKit Queries and Rules - Rule history