Create related list on User Table and Requested Item Table

phil34
Tera Expert

I am quite new to Service Now but I would like assistance to filter a related list please.

On the sys_user table form I am displaying a custom relationship related list based on the sc_req_item table. The issue I have is that the related list displays all the records in the sc_req_item table.

I only want the ones where caller in the sc_req_item table matches the user in the the current displayed user form.

 e.g, UserFirstName+" "+UserLastName = Caller(in requested Item list)

Below is the screenshots of the required result and also the relationship I have

Any assistance would be greatly appreciated.

find_real_file.png

 

find_real_file.png

1 ACCEPTED SOLUTION

Hi @phil 

yes, that is possible. The following relationship should do the job.

 

find_real_file.png

Kind regards
Maik

View solution in original post

5 REPLIES 5

Maik Skoddow
Tera Patron
Tera Patron

Hi

it seems that you have a customization on your RITM table as OOTB there is no field "Caller".

Which type is that field? I hope it is a reference type because in that case you can just add the prebuilt Related List. That means you don't need a relationship.

Kind regards
Maik

Hello Maik,

Yes it looks to be a custom Field u_caller and unfortunately is a string field.

Could I concatenate the first name and last name in the user table and do a lookup on the RITM table based on that value? as in my example above? in this use case it will not be much of an issue if there are multiple matches because of the same name.  

Hi @phil 

yes, that is possible. The following relationship should do the job.

 

find_real_file.png

Kind regards
Maik

Hello Maik

Thank you again for your assistance so far it is greatly appreciated.

The results from the relationship has not quite worked as expected the related list of 11 records below is showing for any and all user records. Maybe I have missed something?

Thanks

Phil

find_real_file.png

find_real_file.png