Sort by RITM number in sc order status widget

Moedeb
Tera Guru

I have cloned the sc order status widget, tried to set the orderby to the request item number field but I just can't get it to work.

 

Anyone know how I can do this?

 

Moedeb_0-1699249341234.png

 

Adding it to the option schema so you can choose based on the field would also be great, but not that important, I just want it to order by RITM really.

 

 

 

1 ACCEPTED SOLUTION

Tai Vu
Kilo Patron
Kilo Patron

Hi @Moedeb 

Let's try to add this line into your cloned widget.

reqItemGr.orderBy('number'); //Line 111

 

Screenshot 2023-11-06 at 15.45.32.png

 

Cheers,

Tai Vu

View solution in original post

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@Moedeb 

so what did you try so far?

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

Tai Vu
Kilo Patron
Kilo Patron

Hi @Moedeb 

Let's try to add this line into your cloned widget.

reqItemGr.orderBy('number'); //Line 111

 

Screenshot 2023-11-06 at 15.45.32.png

 

Cheers,

Tai Vu

Moedeb
Tera Guru

Thank you @Tai Vu that worked perfectly 🙂

 

I had tried something similar, just had it in the wrong spot 🙂