how to filter the organizations according based on custom filed | Community
Skip to main content

how to filter the organizations according based on custom filed

  • February 7, 2022
  • 1 reply
  • 0 views

i am using following code for retriving organizations.

   client.request('/api/v2/search.json?'+encodeURI('query=type:organization name:'+searchString+'*')).then(updateUI);

 

i want to filter using by checking if the custom field is null or not.
but the filtering is not working.
i have tried using custom_field_<field_id>=none

client.request('/api/v2/search.json?'+encodeURI('query=type:organization name:'+searchString+'*')).then(updateUI);

but didn't worked.

         

 

1 reply

Guided
  • February 7, 2022

Hello suyogAgent,

I think you're close, you should change two things:

  1. Replace the equal sign "=" with a colon ":"
  2. Drop the "custom_field_"-prefix, that's only used for ticket fields, for organization fields just use the field key. Something like: custom_organization_text:none