Search Caller Field with Integer

chrisp83
Kilo Expert

Hi All,

I have a requirement to search for callers based on a unique number, this is a custom field I've added to the sys_user table as type Integer called u_id.

I've configured the attributes on the Caller field on the Incident form to ref_contributions=user_show_incidents,ref_auto_completer=AJAXTableCompleter,ref_ac_columns=user_name;u_id;last_name;email,ref_ac_columns_search=true,ref_ac_order_by=name

This works fine for the OOTB columns however if i search for a value in the new column u_id which is also an integer no records are found.

I was wondering if this was because the field is an integer? Has anyone had any issues with searching the Caller field for any custom columns?

Thanks,

Chris

1 ACCEPTED SOLUTION

chrisp83
Kilo Expert

I found the solution to the caller searching issue.



It turns out that you will only be able to search on String fields, using integer or even email will not work you must make sure the fields are a String.



I recreated my custom field (luckily I could still do this at this point) as a String and searching on a value in that field return the correct result.



Hope this helps others.


View solution in original post

3 REPLIES 3

antin_s
ServiceNow Employee
ServiceNow Employee

Hi Chris,



To search for callers based on a unique number(or any filter), you can always do the following. Custom field and Integer Type doesn't matter. If you have more logic to be included, you may call a javascript function which returns the filter.



find_real_file.png



Reference Qualifiers - ServiceNow Wiki



Hope this helps. Mark the answer as correct/helpful based on impact.



Thanks


Antin


Hi Antin,



Thanks for the reply. I've been asked to make the caller field searchable based on the employee id number so a service desk agent can type in the employee id and find the employee.



Will using a reference qualifier like you have above only return the same employee all the time?



Thanks



Chris


chrisp83
Kilo Expert

I found the solution to the caller searching issue.



It turns out that you will only be able to search on String fields, using integer or even email will not work you must make sure the fields are a String.



I recreated my custom field (luckily I could still do this at this point) as a String and searching on a value in that field return the correct result.



Hope this helps others.