Skip to content

Commit

Permalink
Adding placeholder text on Resolution notes Client Script (ServiceNow…
Browse files Browse the repository at this point in the history
…DevProgram#1535)

* Create README.md

* Create script.js
  • Loading branch information
prash5595 authored Oct 28, 2024
1 parent a598c86 commit 2724cfe
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Client Scripts/Adding Placeholder on Resolution Notes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Adding Placeholder Text in Resolution Notes

To maintain consistency and ensure specific information is captured in resolution notes, process owners may require fulfillers to follow a predefined format when resolving tickets.

By adding **placeholder** text in the resolution notes, fulfillers are reminded of the required information(e.g., Root cause, Steps taken, Resolution provided), reducing the risk of missing important details. The placeholder disappears as soon as the fulfiller begins entering their notes, ensuring it doesn't interfere with their input.

## How It Works

### When?
- The placeholder text is automatically added when the state of the ticket changes to Resolved (6).

### What Happens?
- A placeholder text appears in the resolution notes field to guide the fulfiller.
- As soon as the fulfiller starts typing, the placeholder disappears.
- This ensures consistency and alignment with the process requirements.
10 changes: 10 additions & 0 deletions Client Scripts/Adding Placeholder on Resolution Notes/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var res = g_form.getElement('close_notes');
if (newValue == 6)
res.placeholder = "1. Root Cause" + "\n" + "2. Steps taken" + "\n" + "3. Resolution provided"; //Placeholder text as required
else
res.placeholder = "";
}

0 comments on commit 2724cfe

Please sign in to comment.