- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2020 02:54 PM
For service Catalog
Using 'Lookup select Box' variable to insert user name from table 'sys_user' , it show limited number of records as user count is too high.
My Requirement:
1)Want the usernam1 field in drop down format only
2)Is it possible to show username with email id in drop down.
3)Can i put condition that user having company name 'comp1' or 'comp2' should be visible for username1 field.
Solved! Go to Solution.
- Labels:
-
Team Development
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2020 04:30 PM
#1 - Yes, It's dropdown only. It's better if you change it to reference field.
#2 - you can add below to variable attributes on your variable
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=email,ref_ac_columns_search=true,ref_ac_order_by=name
#3 - Once you change the variable type to reference you should be able to see filters and add your condition.
If you still want to use Lookup select box than you need to add something like below to ref equl
company.name=comp1^ORcompany.name=comp2

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2020 10:04 AM
Than use attribute and on label field just have name as value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2020 10:22 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2020 10:26 AM
Can you share screenshot of what do you see when you start typing in lookup variable.
Docs for code - https://docs.servicenow.com/bundle/orlando-platform-administration/page/administer/field-administrat...
If you want same as reference than it is not possible on lookup select box.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2020 11:04 AM
Mike,
for variable attributes-ref_auto_completer=AJAXTableCompleter,ref_ac_columns=user_name;company,ref_ac_columns_search=true,ref_ac_order_by=company
Lookup from table=sys_user
Lookup value field-user ID
Output I am getting i.e only user ID not user_name with company
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2020 11:06 AM
variable attribute only work if i will select variable reference field type.