Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

273
Views
How to group by in service now?

I am new in service now and I don't know yet how to manipulate the data unlike in MySQL and SQL. I just want to know how can I group by the data.

Here is my code to show the data:

var group = new GlideRecord("table");
    
group.addEncodedQuery('u_active=True');
group.orderBy('u_order_in_services');
group.query();
            
while (group.next()) {
gs.info(group.group_name);  

}

The result is:

Group 1
Group 1
Group 2 
Group 2
Group 3
Group 3

Needed result is:

Group 1
Group 2
Group 3
about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!