client-scripts
Client Script Patterns for ServiceNow
Client Scripts run in the user's browser and control form behavior. Unlike server-side scripts, client scripts can use modern JavaScript (ES6+) in modern browsers.
Client Script Types
| Type | When it Runs | Use Case |
|---|---|---|
| onLoad | Form loads | Set defaults, hide/show fields, initial setup |
| onChange | Field value changes | React to user input, cascading updates |
| onSubmit | Form submitted | Validation before save |
| onCellEdit | List cell edited | Validate inline edits |
The g_form API
Getting and Setting Values
// Get field value
More from groeimetai/snow-flow
knowledge-management
This skill should be used when the user asks to "create knowledge article", "KB article", "knowledge base", "knowledge workflow", "article template", "publish article", or any ServiceNow Knowledge Management development.
87reporting-dashboards
This skill should be used when the user asks to "create report", "dashboard", "chart", "visualization", "analytics", "scheduled report", "export data", or any ServiceNow reporting and dashboard development.
78document-management
This skill should be used when the user asks to "attachment", "document", "file upload", "document template", "PDF generation", "document workflow", or any ServiceNow Document Management development.
74predictive-intelligence
This skill should be used when the user asks to "predictive intelligence", "machine learning", "ML", "classification", "similarity", "clustering", "prediction", "AI", or any ServiceNow Predictive Intelligence development.
72mcp-tool-discovery
This skill should be used when the user asks about "available tools", "what tools", "how to find tools", "tool search", "MCP servers", "list tools", "discover tools", "which tools", or needs guidance on discovering and using Snow-Flow MCP tools.
69vendor-management
This skill should be used when the user asks to "vendor", "supplier", "contract", "procurement", "SLA", "vendor risk", "vendor performance", or any ServiceNow Vendor Management development.
68