Skip to content

Add Incident Count Snippet for Hacktoberfest 2025#1985

Closed
rishanmenezes wants to merge 3 commits intoServiceNowDevProgram:mainfrom
rishanmenezes:add-incident-count-snippet
Closed

Add Incident Count Snippet for Hacktoberfest 2025#1985
rishanmenezes wants to merge 3 commits intoServiceNowDevProgram:mainfrom
rishanmenezes:add-incident-count-snippet

Conversation

@rishanmenezes
Copy link

PR Description:

This PR contributes a new code snippet for counting ServiceNow incident records using the GlideRecord API. This is a Hacktoberfest 2025 contribution that adds educational value for ServiceNow developers learning to work with the GlideRecord API.

What's Added:

  • Core ServiceNow APIs/GlideRecord/IncidentCount/incident_count.js - JavaScript code snippet demonstrating how to count incident records
  • Core ServiceNow APIs/GlideRecord/IncidentCount/README.md - Comprehensive documentation with usage examples, API references, and notes

Key Features:

  • Simple, clear example of using GlideRecord.getRowCount()
  • Demonstrates proper query execution before counting
  • Includes detailed README with usage instructions
  • Provides context for where this code can be used (Background Scripts, Script Includes, etc.)
  • Links to official ServiceNow documentation

Pull Request Checklist

Overview

  • Put an x inside of the square brackets to check each item.
  • I have read and understood the CONTRIBUTING.md guidelines
  • My pull request has a descriptive title that accurately reflects the changes and the description has been filled in above.
  • I've included only files relevant to the changes described in the PR title and description
  • I've created a new branch in my forked repository for this contribution

Code Quality

  • My code is relevant to ServiceNow developers
  • My code snippets expand meaningfully on official ServiceNow documentation (if applicable)
  • I've disclosed use of ES2021 features (if applicable) - N/A, using standard ServiceNow API
  • I've tested my code snippets in a ServiceNow environment (where possible)

Repository Structure Compliance

  • I've placed my code snippet(s) in one of the required top-level categories:
    • Core ServiceNow APIs/
  • I've used appropriate sub-categories within the top-level categories - GlideRecord
  • Each code snippet has its own folder with a descriptive name - IncidentCount

Documentation

  • I've included a README.md file for each code snippet
  • The README.md includes:
    • Description of the code snippet functionality
    • Usage instructions or examples
    • Any prerequisites or dependencies
    • (Optional) Screenshots or diagrams if helpful

Restrictions

  • My PR does not include XML exports of ServiceNow records
  • My PR does not contain sensitive information (passwords, API keys, tokens)
  • My PR does not include changes that fall outside the described scope

Hacktoberfest 2025 🎃

Added incident_count.js file to demonstrate counting incident records using GlideRecord API
Added comprehensive README documentation for the incident count snippet with usage examples and API references
@snamjosh snamjosh self-assigned this Oct 9, 2025
@snamjosh
Copy link
Contributor

snamjosh commented Oct 9, 2025

Thank you for your contribution. However, this submission is not relevant to this repository. We encourage contributors to review the project's objectives and guidelines (see the README.md and CONTRIBUTING.md files) before submitting pull requests. Closing this for now.

Code snippets reused from the ServiceNow Documentation or API References are acceptable only if they are expanded in a meaningful way (e.g., with additional context, documentation, or variations). Remember: "QUANTITY IS FUN, QUALITY IS KEY."

@snamjosh snamjosh closed this Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants