Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Querying for Cases that Contain Substring in Custom Field #128

Closed
verbecee opened this issue Aug 7, 2019 · 2 comments
Closed

Querying for Cases that Contain Substring in Custom Field #128

verbecee opened this issue Aug 7, 2019 · 2 comments

Comments

@verbecee
Copy link

verbecee commented Aug 7, 2019

Querying for Cases that Contain a Substring in Custom Field

Is it possible to use the find_cases function using a string that would be found in a larger string in a custom field? For example:

I have a custom field called "specialID", and some example values found in cases are "EXAMPLE123", "EXAMPLE489", and "DIFF1098." Is there a way to query for only cases that contain "EXAMPLE?" I have been able to find cases using the entire specialID, but cannot find cases using a substring. Meaning,

query = {"_string": "customFields.specialID.string:'EXAMPLE123'"}

returns one case. The following query does not return any values:

query = {"_string": "customFields.specialID.string:'EXAMPLE'"}

I have also tried using "In" but that returns an Invalid query exception:

query = In("customFields.specialID.string", "EXAMPLE")

Thanks for your time, I appreciate any help!

@cndycc
Copy link

cndycc commented Jul 15, 2020

I am in a similar situation. Any update?

@nadouani
Copy link
Contributor

Hello, what about

query = ContainsString("customFields.specialID.string", "Example*")

or

query = ContainsString("customFields.specialID.string", "Example*")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants