I want to select all the data not by sys_id how we will achieve this ?

1dusjhyahnt
Tera Contributor
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 ?Screenshot 2024-02-05 at 8.21.24 PM.jpegScreenshot 2024-02-05 at 8.21.33 PM.jpegScreenshot 2024-02-05 at 8.25.07 PM.jpeg
2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@1dusjhyahnt 

can you explain what's your business requirement here?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar fetch the value from artificatories table and its will update by user in portal and reflect in servicenow table