How to add Jquery Datatable into Servicenow to create UI page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2016 11:45 PM
Please help me to include Jquery Datatable - //cdn.datatables.net/1.10.11/js/jquery.dataTables.min.js -
How we can create a UI page using the above Jquery script -
Please give me the exact steps to include this in a scoped application.
Thanks in advance !!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2016 12:34 AM
I don't have much experience in apps and their scope. But adding the script in its scope would be better if it is not going to be used by other apps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2016 12:48 AM
But while adding this jquery library in UI script - I am getting the following code in the Script text box -
var x_37731_testapp_int = x_37731_litmos_int || {};
x_37731_testapp_int.test = (function() {
"use strict";
/* set your private variables and functions here. For example:
var privateVar = 0;
function private_function() {
return ++privateVar;
}
*/
/* Share variables between multiple UI scripts by adding them to your scope object. For example:
x_37731_testapp_int .sharedVar = 0;
Then access them in your scripts the same way. For example:
function get_shared() {
return x_37731_testapp_int .sharedVar;
}
*/
return {
/* set your public API here. For example:
incrementAndReturnPrivateVar: function() {
return private_function();
},
*/
type: "test"
};
})();
In this where I have to copy - paste the jquery librabry, as I am getting some errors while doing so -
Any idea ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2016 12:51 AM
Delete everything. Copy-Paste and check.