Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

How to search with the filter "is one of" character strings that contain commas

Victor Mesa
Tera Contributor

I want to search the list of users in sys_user for records that have values ​​with a comma character in the user_name field, but the "is one of" filter does not allow me to do that search. Any idea how to find them?

 

Thanks.

1 ACCEPTED SOLUTION

Mike_R
Kilo Patron

Straight from ServiceNow's documentation

Note: Do not use the [is one of] operator on fields that contain commas, as the query does not return the expected set of records. Instead, create a filter using multiple [or] statements.

https://docs.servicenow.com/bundle/sandiego-platform-user-interface/page/use/using-lists/task/t_Filt...

 

What's the use case /requirement exactly? Maybe I can help come up with another query to yield the same result.

 

View solution in original post

6 REPLIES 6

Mike_R
Kilo Patron

Straight from ServiceNow's documentation

Note: Do not use the [is one of] operator on fields that contain commas, as the query does not return the expected set of records. Instead, create a filter using multiple [or] statements.

https://docs.servicenow.com/bundle/sandiego-platform-user-interface/page/use/using-lists/task/t_Filt...

 

What's the use case /requirement exactly? Maybe I can help come up with another query to yield the same result.

 

Hi Mike_R

 

I have a list of users with the "user_name" field that contains a string with commas,
there are around 400 records and when trying to apply the filter "is one of"
it does not return a correct result because of those commas.

 

Any idea how to find them?

 

Thanks,

is it feasible for you to use another field such as email?

 

No, I can't use another field.