How to buid a related list of request[sc_request] filtered by requested item[sc_req_item] item

Ramonrdd3
Tera Expert

Hello SNOW community, this is my first post.
So i'm doing the nowGurukul ServiceNow Hands-On Challenge 2024 #Week_3
I'm a bit stuck on the 5th requirement for related lists that says:
"On the ‘Employee’ table, add/create a related list to show a list of E-Voucher Requests raised by the current Employee. Only Current Users should have the option to Edit it."
I was able to query the Requested Item[sc_req_item] table and get a list of requested items ordered by the same employee, with next relationship script:

Ramonrdd3_0-1706548086254.png

and got next result:

Ramonrdd3_1-1706548159763.png

 

If you notice closely, the first 2 ritm's belong to the same request.
So, since the requirments asks explicitly for E-Voucher requests raised by the current employee, i wanted to show a list of req records, instead of ritms.
That way if a user created a request with 2 items in the cart, that list would only display the request, and would not repeat them, avoiding any confusion.
Here is where i got stuck.
The request item item[cat_item] is located on the sc_req_item table, not on the request[sc_request] table. And i need that field to filter the query.

However i only want to show a list of request items.
So how can i build the query to only get a list of requests that have requested item of "E-Voucher Request"

2 REPLIES 2

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Did you try reaching out to the people behind that challenge? It's not an official ServiceNow thing.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Hi Mark,
Yes i did, thou i wanted also to ask the community as well.
Maybe someone has encountered a similar scenario before.
Thanks for checking.