Wildcard exclusions in Explore Queries | Community
Skip to main content

Wildcard exclusions in Explore Queries

  • October 12, 2021
  • 7 replies
  • 0 views

Lou11

Is there a way to filter a row in an Explore query to exclude items using a wildcard?

Use case: We auto-create our Orgs from our customer system using an API. At the same time, we auto-create a default requester. That requester has "nouser" in the email address.

I have a simple query that pulls orgs and requesters, but I want to exclude the "nouser" requesters. I can filter the field by paging through ALL the nouser(s) and selecting them, but it would be so much easier to use some kind of wildcard.

Thank you,

7 replies

Erin21
  • October 12, 2021

Hi @Lou, for the use case you described, I think you could create a standard calculated attribute with the following formula:

CONTAINS([Requester email],"nouser")

Then you could add that attribute as a query filter and set it to "false" so that your query returns only requester emails that don't include "nouser". Hope that helps!


Lou11
  • Author
  • October 12, 2021

I figured it would be a calculated metric. What I don't see is how to set as false.


Erin21
  • October 12, 2021

Ah, for my suggestion to work, it has to be an attribute, not a metric. :) After you create the attribute, you'll be able to add it as a filter to your query:

  1. Next to Filters at the top of your query, click Add.
  2. Select the standard calculated attribute you created and click Apply.
  3. Then click the filter you just added (the gray box) and click false, then Apply.

 


Lou11
  • Author
  • October 13, 2021

I typed metric, but I meant attribute :)

I saw that "false", but wasn't sure. Thank you for clarifying. It works.


Erin21
  • October 13, 2021

Excellent, glad it worked!


Lou11
  • Author
  • October 13, 2021

One additional question. The query pulls from the Support Tickets Dataset. As a result, I only get orgs and requesters that have tickets. Those that we have created with no tickets are not queried. Is there a way to query ALL orgs and requesters?


Erin21
  • October 13, 2021

It looks like this recipe should do the trick! Explore recipe: Displaying organizations with no tickets