---
id: SCR-PFM-QRY-001
title: Query library
route: '/console/{tenantId}/queries'
surface: console
product_area: platform
module: queries
revision: 1
status: draft
design_intent: proposed
implementation_evidence: observed
inference: []
source_sha:
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
purpose: 'Find reusable questions, open a saved query or begin authoring from a recipe.'
supports:
  - JNY-PFM-QRY-002
  - CAP-PFM-QRY-006
  - CAP-PFM-QRY-008
  - CAP-PFM-QRY-007
permission: platform.saved-queries.read (console alias tools.queries.view)
entry_from:
  - main navigation (Queries)
  - older address /queries/schedules (redirects to the Schedules tab)
exits_to:
  - '/console/{tenantId}/queries/new'
  - '/console/{tenantId}/queries/{id}'
  - Schedules tab (SCR-PFM-QRY-002)
displays:
  - field: >-
      Question name, application, kind, owner, audience, delivery indicator, runtime-input marker
      and last update.
    source: listSavedQueries (numbered library page with facets)
  - field: Available recipes arranged by category.
    source: listQueryRecipes
  - field: Library audience scope and current search filters.
    source: listSavedQueries query parameters
actions:
  - label: Open
    operation_id: getSavedQuery
    permission: platform.saved-queries.read
    confirm: false
  - label: Duplicate
    operation_id: createSavedQuery
    permission: platform.saved-queries.use
    confirm: false
  - label: Edit Details
    operation_id: updateSavedQuery
    permission: platform.saved-queries.use
    confirm: false
  - label: Delete Query
    operation_id: deleteSavedQuery
    permission: platform.saved-queries.use
    confirm: true
  - label: Schedule
    operation_id: createQuerySchedule
    permission: platform.query-schedules.use
    confirm: false
  - label: New query or start from a recipe
    operation_id: listQueryRecipes
    permission: platform.queries.read
    confirm: false
states:
  - empty library
  - initial loading
  - load failure
  - read access without edit access
  - no rows match the filters
validation:
  - BR-CAP-PFM-QRY-006-01
  - BR-CAP-PFM-QRY-006-03
  - BR-CAP-PFM-QRY-006-14
  - BR-CAP-PFM-QRY-006-15
  - BR-CAP-PFM-QRY-008-01
patterns:
  - Standard layout
  - design-system page header
  - 'data table with search, facets and pagination'
  - row actions menu
  - confirmation dialog for destructive actions
  - unsaved-changes guard
component: components/queries/query-library.tsx (PlatformQueryLibrary)
evidence:
  - >-
    react-console at baf6dae: app/(console)/console/[tenantId]/queries/page.tsx;
    components/queries/query-library.tsx, library-pagination.tsx, facet-filter.tsx;
    lib/queries/platform/library.ts
controls: [TC-AVL-001, TC-AVL-004, TC-AVL-005, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-005, TC-CHG-001, TC-CHG-002, TC-CHG-003, TC-CHG-004, TC-CHG-005, TC-CHG-006, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-DAT-004, TC-IAM-001, TC-IAM-002, TC-IAM-003, TC-IAM-004, TC-IAM-005, TC-IAM-006, TC-LOG-001, TC-LOG-004, TC-LOG-005, TC-MON-001, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-004, TC-PI-005, TC-PRV-001, TC-PRV-002, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-TEN-004, TC-VEN-001, TC-VEN-002, TC-VEN-003]
---

# Query library

## What the Screen Is For

Find reusable questions, open a saved query or begin authoring from a recipe.

## What It Shows and Lets People Do

The library combines owner and shared questions with search, facets and paging. Row controls open, copy, edit details, remove or schedule eligible questions. Write controls depend on grants and returned powers; dependent reports and schedules can refuse deletion.

## States and Errors

An empty library differs from a filtered result with no matches. Failed loading offers recovery, and refused deletion retains the named dependencies for the user to resolve.

## Patterns It Must Respect

The existing page uses the console header and table patterns with filters, paging and row menus. Destructive removal uses confirmation; unsaved work retains its navigation guard.
