Search reference field with integer column

nicofcanlas
Tera Expert

Hi All,

 

I have a requirement to make the vendor id field searchable in the reference field so I use the variable attributes

ref_auto_completer=AJAXTableCompleter,ref_ac_columns_search=true,ref_ac_columns=name;u_vendor_id

 

but for some reason this doesn't work on the vendor id, I tried it on different fields and its working fine. The thing I found out is that its not working on the field with integer data type.

Does anyone has an idea on how to make integer searchable ?

3 ACCEPTED SOLUTIONS

J Siva
Tera Sage

Hi @nicofcanlas 
I don't think this is feasible. However, as a workaround, you can create a custom string-type field to store the integer value and use that custom field in the reference qualifier.
Regards,
Siva

View solution in original post

Ankur Bawiskar
Tera Patron
Tera Patron

@nicofcanlas 

I remember few years ago similar question was asked and I believe ref_ac_columns_search doesn't work well with Integer field and it's a platform limitation

Please inform this to your customer.or make that field type as String but remember for this it might have data impact as you are changing field type

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

nicofcanlas
Tera Expert

For this scenario we can use "=<Integer value>" to search for records eg. =12345

View solution in original post

5 REPLIES 5

J Siva
Tera Sage

Hi @nicofcanlas 
I don't think this is feasible. However, as a workaround, you can create a custom string-type field to store the integer value and use that custom field in the reference qualifier.
Regards,
Siva

M_Taimoor Jawai
Tera Expert

1) Can you change the type to string, or will there be other issues because of that?

Regards,

Taimoor

there would be a bigger impact for that so no I can't change the data type

 

Ankur Bawiskar
Tera Patron
Tera Patron

@nicofcanlas 

I remember few years ago similar question was asked and I believe ref_ac_columns_search doesn't work well with Integer field and it's a platform limitation

Please inform this to your customer.or make that field type as String but remember for this it might have data impact as you are changing field type

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader