Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

112
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
6 months ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.