# Wildcard possible in listWorkflowExecutions()

**URL:** https://community.temporal.io/t/wildcard-possible-in-listworkflowexecutions/3105
**Category:** Community Support
**Tags:** workflow-options
**Created:** [October 6, 2021, 3:38am UTC](https://community.temporal.io/t/wildcard-possible-in-listworkflowexecutions/3105 "2021-10-06T03:38:46Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![sonyantony](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/sonyantony/32/1209_2.png) [@sonyantony](https://community.temporal.io/u/sonyantony)
#### Post date: [October 6, 2021, 3:38am UTC](https://community.temporal.io/t/wildcard-possible-in-listworkflowexecutions/3105/1 "2021-10-06T03:38:46Z")

</div>

1. Is it possible to use wildcards ( ‘\*’ , ‘%’ etc. ) in listWorkflowExecutions() ?
2. Is it possible to listWorkflowExecutions() based on whether a specific search attribute is present or not ?
3. is there any way I can listWorkflowExecutions() all workflows on a Temporal server ?

---

<div class="post-metadata">

### Author: ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)
#### Post date: [October 6, 2021, 6:22pm UTC](https://community.temporal.io/t/wildcard-possible-in-listworkflowexecutions/3105/2 "2021-10-06T18:22:46Z")

</div>

For 1. Yes you can do it for search attributes that have the “String” type. You can run  
`tctl cluster get-search-attributes`  
to see all available search attributes and their types.  
If you had a search attribute “ProductId” of type string:  
`tctl admin cluster add-search-attributes --name ProductId --type String`

with possible values like “book abc”, “book xyz” you could run query:  
`ProductId LIKE "book%"`

If search attribute value was for example “my favorite book”  
you could search for example  
`ProductId LIKE "%favorite%"`

Note that search is currently word based, meaning that if the value of your search attribute is a single word, you will need to search for its entire value. and cannot at this time use partial matches with “LIKE”.  
This is something that will be added in the future.

---

<div class="post-metadata">

### Author: ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)
#### Post date: [October 6, 2021, 6:38pm UTC](https://community.temporal.io/t/wildcard-possible-in-listworkflowexecutions/3105/3 "2021-10-06T18:38:52Z")

</div>

For 2. Yes you can use

```auto
MySearchAttribute IS NOT NULL
MySearchAttribute IS NULL

```

---

<div class="post-metadata">

### Author: ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)
#### Post date: [October 6, 2021, 6:45pm UTC](https://community.temporal.io/t/wildcard-possible-in-listworkflowexecutions/3105/4 "2021-10-06T18:45:56Z")

</div>

For 3. You have to set the namespace on ListWorkflowExecutionsRequest so you can list all workflows per namespace (don’t specify a query). To list all, I would assume you could iterate over all namespaces you have, get workflows for that namespace, and accumulate.

---

<div class="post-metadata">

### Author: ![sonyantony](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/sonyantony/32/1209_2.png) [@sonyantony](https://community.temporal.io/u/sonyantony)
#### Post date: [October 6, 2021, 6:55pm UTC](https://community.temporal.io/t/wildcard-possible-in-listworkflowexecutions/3105/5 "2021-10-06T18:55:52Z")

</div>

Big thanks Tikomir  
Exactly what I wanted to know
