Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This script is a Client Script (onLoad) for ServiceNow which retrieves all field names present on the current form and displays them in an alert message.

Example: Hi Sai, please find the elements of the form short_description, description, number, etc.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function onLoad() {
//Type appropriate comment here, and begin script below
var arr = [];
for (var i = 0; i < g_form.elements.length; i++) {
arr.push(g_form.elements[i].fieldName);
}
alert("Hi Sai, please find the form elements: " + arr.join(","));
}
Loading