Finding gaps in your work with Data Viewer
Sometimes it's necessary to find records which do not contain certain types of work. For example, you may want to find all Stewardship Sites which do not have Baseline reports uploaded. Or you may want to find sites which have not been monitored in the past year. The following query type in Data Viewer allows you to do so.
Let's use the example of finding all Stewardship Sites which do not have Baseline Report work items. First, create a new view, then click 'edit view'. Choose 'Portfolio Records' as the type of data you want to find.
Next, under 'Add fields and criteria to limit view results, change 'All' to 'None'. This is what tells the view to search for records which do NOT meet the query you build next.
Next, click on the dropdown menu in the query builder and find and expand the work item type. In this case, 'Baselines'
Since we're only concerned with whether the record has a Baseline Report or not, we're going to use 'Id' as the basis for the query. All objects in Landscape, include Baseline Report work items, automatically have this Id assigned, and so all Baseline Reports will have this number.
We want to find those records where this 'ID' is not empty. In other words, any record that has a Baseline Report.
Next, we want to pull out only Portfolio Records which are designated as Stewardship Sites. Click on 'Advanced' in the lower right corner of the query builder and choose 'Add another set of Criteria'. This time, keep the query type as 'All', and select 'Is Stewardship Site' as the field you want to query on. Then select 'Is' > 'Yes' to finish the query.
The final query should look like this:
Click 'OK', and you'll get a list of all Stewardship Sites that do not contain Baseline Reports. You may wish to make additional fields visible by using the 'Fields' button.
Hint: If you wanted to make a similar view but for sites which hadn't been monitored, you could simply make the first part of the query 'Site Visits > End Date > Between > This Year's Start and This Year's End'.