Search Results chk_criteria_unique




Overview

HXC_TK_GRP_QUERY_CRITERIA_API is a public PL/SQL API package owned by APPS and declared with AUTHID CURRENT_USER. It manages the criteria rows that define timekeeper group queries within Oracle E-Business Suite time and labor functionality. A timekeeper group query stores a saved selection of employees or assignments, and each query is composed of one or more criteria entries that describe how that selection is filtered. This package provides the programmatic interface for creating, maintaining, and validating those criteria records, ensuring the underlying HXC_TK_GROUP_QUERY_CRITERIA table remains consistent with its parent query entity.

The package header carries the version identifier hxctkgqcapi.pkh 120.0 and is classified as an API in the ETRM 12.2.2 registry. It is referenced by two other packages, indicating it participates in a broader dependency chain within the timekeeping module rather than operating in isolation.

Key Procedures and Functions

  • CREATE_TK_GRP_QUERY_CRITERIA — Inserts a new criteria row for a timekeeper group query. It accepts a validation flag, allowing callers to exercise the business logic without committing changes. On success it returns the primary key of the new criteria row and its object version number; on failure it raises an application error and performs no insert.
  • UPDATE_TK_GRP_QUERY_CRITERIA — Modifies an existing criteria row, including optimistic locking through the object version number.
  • DELETE_TK_GRP_QUERY_CRITERIA — Removes a criteria row from the query definition.
  • CHK_CRITERIA_TYPE — Validates that the supplied criteria type is a recognized value.
  • CHK_CRITERIA_ID — Verifies that the criteria identifier is valid for the given type.
  • CHK_TK_GROUP_QUERY_ID — Confirms the parent timekeeper group query exists.
  • CHK_DELETE — Determines whether a criteria row may be deleted under current conditions.
  • GET_CRITERIA — Retrieves criteria information for a given query or criteria entry.
  • CHK_CRITERIA_UNIQUE — Enforces that duplicate criteria are not created for the same query.
  • GET_TC_PERIOD — Returns timecard period information used in criteria evaluation.
  • CHECK_AUDIT_ENABLED — Reports whether audit functionality is active for the relevant entity.
  • TC_PERIOD_OK — Validates that a timecard period is acceptable for the criteria being processed.

Tables Accessed

  • HXC_TK_GROUP_QUERY_CRITERIA — The primary table maintained by this package; holds individual criteria rows.
  • HXC_TK_GROUP_QUERIES — The parent query entity validated through CHK_TK_GROUP_QUERY_ID.
  • HXC_RECURRING_PERIODS and HXC_PREF_HIERARCHIES — Period and preference hierarchy sources used in criteria and timecard period evaluation.
  • FND_LOOKUP_VALUES — Lookup validation for criteria types and related values.
  • FND_SESSIONS — Session context, typically for audit or environment checks.
  • DUAL — Used for scalar validation calls.

Usage Notes

This API is normally invoked from the timekeeper group setup forms and from concurrent or batch processes that populate saved query definitions, rather than being called directly by end users. Custom integrations should always pass p_validate as TRUE first to confirm that criteria types, identifiers, and uniqueness constraints pass validation before committing. The object version number must be carried through update operations to preserve optimistic locking. Because the package is AUTHID CURRENT_USER and public, calling schemas must have appropriate grants on the APPS synonyms and on HXC_TK_GROUP_QUERY_CRITERIA. Timecard period helpers such as GET_TC_PERIOD and TC_PERIOD_OK should be treated as supporting validation services when criteria reference time-related attributes.