forked from ServiceNowDevProgram/code-snippets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding placeholder text on Resolution notes Client Script (ServiceNow…
…DevProgram#1535) * Create README.md * Create script.js
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
Client Scripts/Adding Placeholder on Resolution Notes/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
10
Client Scripts/Adding Placeholder on Resolution Notes/script.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = ""; | ||
} |