Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Fetch active user details based on the job role from RITM and display it under related list as a tab

Hemamani Prabha
Tera Contributor

Hello all, 

 

I have a requirement as such:

On a catalog item MRP Task, show a related list tab named 'Users'
That tab must show the Active Users on the Job Role that the task refers to with the columns User, User ID, Active

 

I've created a new record in "System definition -- > Relationships" as Users and now how do I fetch the active user details based on the job role from the RITM. Please help me with the query.

I've queried the req item table and fetched the job role name , how to proceed further? 

 

Thanks,

Hema

5 REPLIES 5

Not applicable

Hi,

is the job role is variable or field on the RITM? and u can try with Current.variable_name or current.job_role_field_name.

Hi @Community Alums it's a variable in the RITM. I want to display the active users on the job role that is displayed in the RITM.

Anil Nemmikanti
Tera Guru

Hi, is the job role is variable or field on the RITM? and u can try with Current.variable_name  or current.job_role field name in the script which will be used in the relationships.

 

If it is correct, please mark it as helpful.

Hi @Anil Nemmikanti 
it's a variable in the RITM. I want to display the active users on the job role that is displayed in the RITM.