Add field to catalog item that looks up incidents raised by requested for user

0ldNick
Tera Contributor

Hi Everybody,

 

I've got a catalog item to request a smart phone on which one of the options is to replace a lost/stolen phone. I need to add a field to the form that looks up incidents for the user under requested for field (the user should have raised an incident to report the phone loss). 

 

The 'requested for' field is a reference variable looking up the sys_user table and the Incident field needs to be look up the incidents raised.

 

I hope I've explained that ok, and help would be gratefully received.

Thanks,

Nick  

4 REPLIES 4

Sujatha V M
Kilo Patron
Kilo Patron

@0ldNick  I have replicated your use case based on the inputs shared above.

 

Please follow the below steps for your use case,

 

1. Created a form with fields "Requested For" and "Incidents of requested for"

 

SujathaVM_0-1726468739549.png

2. On the variable "Incidents of requested for", add the reference qualifier as below (with extra filter conditions if you wish like only active incidents) 

 

Make sure to update the current.variables.<requested_for_variable_of_yours>. 

 

SujathaVM_1-1726469496607.png

 

Results: 

 

1. If the user is Beth Angelin, 

 

SujathaVM_2-1726469657900.png

 

2. If the user is Abel Tuter, 

SujathaVM_3-1726469720900.png

 

Cross verify the count on the incidents list view, 

SujathaVM_4-1726469809568.png

 

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.

0ldNick
Tera Contributor

That's superb, thanks Sujatha, I'll try that tomorrow.

 

Thanks,

Nick

Sure! Kindly try and update the status on the post and mark it as “Helpful” and “Accept it as solution” which will be helpful for others too. 

 

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.

0ldNick
Tera Contributor

Hi Sujatha, thanks for your help with this but I just can't get it on working on our instance, I'm wondering is there a script include on the developer instance that's doing some of the work in the background.

I'll keep playing around with it anyway.

Thanks,

Nick