Reference variable

Cupcake
Mega Guru

In my catalog item I have a variable that is a reference variable. It is referencing the user table which contains may fields like (Name, Employee ID, Title, etc.). What I want to do is make the reference field show the Employee ID #. 

I was successful in doing this using a variable type = Lookup select box; however, it slowed the system down drastically so I changed it to a reference field.

 

Any help and any ideas on why when I used the lookup select box it slowed the system down. 

I am using Jakarta Patch 8B & Service Portal.

Thanks,

Karen

1 ACCEPTED SOLUTION

SanjivMeher
Kilo Patron
Kilo Patron

Since the number of users will be more and there is no index on employee id, it will slow down the performance if you use that field in lookup. Instead I would suggest you to use Reference field and add employee number as a ref_ac_columns in the variable attribute

 

https://docs.servicenow.com/bundle/kingston-it-service-management/page/product/service-catalog-manag...

 

 


Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

5 REPLIES 5

SanjivMeher
Kilo Patron
Kilo Patron

Since the number of users will be more and there is no index on employee id, it will slow down the performance if you use that field in lookup. Instead I would suggest you to use Reference field and add employee number as a ref_ac_columns in the variable attribute

 

https://docs.servicenow.com/bundle/kingston-it-service-management/page/product/service-catalog-manag...

 

 


Please mark this response as correct or helpful if it assisted you with your question.

Thank you much.

Hi,

Please mark his response as Correct as this helps show others that this was the correct answer for you.

Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Cupcake
Mega Guru

Here is what you need to put in the variable attributes to make this happen: ref_ac_columns_search=true,ref_ac_columns=name;employee_number,ref_auto_completer=AJAXTableCompleter,ref_ac_columns_display_value=true

 

This will display the name and the employee number from the user table. In my opinion it is best to have both the name and the employee number to confirm that you are selecting the correct person.

 

Karen