I want to select all the data not by sys_id how we will achieve this ?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2024 06:57 AM
how to fetch all the data not single data how we will achieve this ?(check screenshot )
(function() {
/* populate the 'data' object */
/* e.g., data.table = $sp.getValue('table'); */
/*1. Declare the array*/
data.array=[];
/*2. Glide record on table*/
var grInc = new GlideRecord('u_artificatory');
grInc.addQuery('sys_id','458688b893c04210e4f0398efaba10e7');
grInc.query();
if(grInc.next()){
/*2.1 Create empty object*/
data.array.push({
/*2.2 Set object values*/
name:grInc.u_name.toString(),
email:grInc.u_class.toString(),
mobile:grInc.u_section.toString()
});
}
if(input)
{
var gr1=new GlideRecord('u_artificatory');
gr1.addQuery('sys_id', '458688b893c04210e4f0398efaba10e7');
gr1.query();
if(gr1.next())
{
gr1.u_class=input.email;
gr1.u_section=input.mobile;
gr1.update();
}
}
})();
I want to select all the data not by sys_id how we will achieve this ?


2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2024 07:27 AM
can you explain what's your business requirement here?
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2024 07:35 AM
Hi @Ankur Bawiskar fetch the value from artificatories table and its will update by user in portal and reflect in servicenow table