1

search_items - propValueMask value containing comma

(05/01/2017 18:36:52 отредактировано m-ram)

Тема: search_items - propValueMask value containing comma

Hi Guys,

I am trying to use the search_items  API to search for  an account and I have a case where the account name itself contains a comma, for example : while searching for "ResourceName, Inc.", since the character comma is used in propValueMask to search multiple values, it's not returning the account. Please see below the complete API parameters:

svc=core/search_items&params={"spec":{ "itemsType":"avl_resource", "propName":"rel_is_account,sys_name", "propValueMask":"1,ResourceName, Inc.", "sortType":"sys_name", "propType":"property,property"}, "force":1,    "flags":1, "from":0,"to":0}

Is there a way to escape the characters with special meanings in propValueMask  ( * | , > < =)

Thanks in advance!

2

search_items - propValueMask value containing comma

Re: search_items - propValueMask value containing comma

Hi m-ram
Unfortunately there's no way to find items with commas in name

Maybe you can try to change request logic, e.g use sys_id instead of sys_name
Or get all resources once, put them to cache and then filter in any way you need

3

search_items - propValueMask value containing comma

Re: search_items - propValueMask value containing comma

Thanks for the information!