How to populate employee id field on a Service Catalog form using the Reference variable pointing to sys_user table.

Zubair Alam1
Mega Contributor

I have a reference type variable that I need to populate on a Service Catalog form with only the employee id coming from sys_user table. 

Is there a special variable attribute that will do it or a script? Please help. Thanks. 

1 ACCEPTED SOLUTION

Tony Cattoi
Mega Guru

Depending on what you are trying to accomplish, you could look at the lookup select box variable type instead of reference.  Using that you can select the ID field as the label and whatever value you want (sys_id for example) as the value field.

 

View solution in original post

5 REPLIES 5

Pranesh072
Mega Sage
Mega Sage

You want to see employee id value instead of user name in sys_user reference field?

Tony Cattoi
Mega Guru

Depending on what you are trying to accomplish, you could look at the lookup select box variable type instead of reference.  Using that you can select the ID field as the label and whatever value you want (sys_id for example) as the value field.

 

Look up from which table?

Brad Bowman
Kilo Patron
Kilo Patron

If you want to be able to type a field such as the employee number to see the search results and then select the user, you can add the column and the search (type ahead) capability to the Variable attributes like this

ref_ac_columns=employee_number,ref_ac_columns_search=true

This will allow you to type part of the name or employee number to find the record, but a reference type variable will always store the sys_id as the value assigned to the variable.