how to create pop up ui page with choice fields in incident form on servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2023 10:22 AM
in incident form whenever we select an assignment group, we need ui pop page with 3 different choice fields questions, once we submit popup and after saving the form, i want to see those 3 fields in incident variable section, anyone please help me to solve this.
i have created record producer, so i just need help on ui page code
#ui page#incident#pop up
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2023 07:02 PM
Hi Siva,
As far as I know, you cannot use UI pages in traditional service portal.
I suggest to create a modal template and use as modal.
This link should help: Modals in SP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2023 07:34 PM
Hi @siva14 ,
Can u try this code , please modify as per your requirement.
<!DOCTYPE html>
<html>
<head>
<title>Custom UI Page</title>
<style>
body {
padding: 20px;
}
.question {
margin-bottom: 10px;
}
</style>
</head>
<body>
<h2>Response Questions</h2>
<div class="question">
<label for="response1">Question 1:</label>
<select id="response1">
<option value="option1">Option 1</option>
<option value="option2">Option 2</option>
<option value="option3">Option 3</option>
</select>
</div>
<div class="question">
<label for="response2">Question 2:</label>
<select id="response2">
<option value="option1">Option 1</option>
<option value="option2">Option 2</option>
<option value="option3">Option 3</option>
</select>
</div>
<div class="question">
<label for="response3">Question 3:</label>
<select id="response3">
<option value="option1">Option 1</option>
<option value="option2">Option 2</option>
<option value="option3">Option 3</option>
</select>
</div>
<button onclick="submitResponses()">Submit</button>
<script>
function submitResponses() {
// Get selected values
var response1 = document.getElementById('response1').value;
var response2 = document.getElementById('response2').value;
var response3 = document.getElementById('response3').value;
// Pass the selected values to the client script
onSubmit(response1, response2, response3);
}
</script>
</body>
</html>
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2023 07:28 AM
is there anything can we write on client script ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2023 01:10 AM
could you please help me on client script as well