【Query Builder】Try using Prompt Only Filter

`Query Builder` is a [Sharperlight](https://www.sharperlight.com/) application that supports the creation of queries that are absolutely necessary in applications that handle data.
The `Query Builder` has a **Prompt Only Filter** among the options for defining filters.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/2530698/931845c6-ab38-815e-2a21-b07da2fc5e89.png)
This time, I'll try using that **Prompt Only Filter**.

Queries created with the Sharperlight Query Builder are dynamically converted into SQL statements and executed by the Sharperlight engine.
Filters that are defined are basically created on the columns that exist in the queried table and they make up the WHERE clause of the SQL statement.
However, if you turn on the **Prompt Only Filter** option for such a regular filter, the filter will be <font color="Red">**excluded from WHERE clause**</font>.

Also, when using columns that do not exist in the queried table as arguments or variables in query expansion, those columns are forced into **Prompt Only Filter** and are not generated in the WHERE clause.

## Prompt Only Filter Behavior ##
I have a query like this and use the filter **Canceled**.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/2530698/2f977845-3898-bba7-e5f1-a624e5f6cc36.png)
Normally, the WHERE clause of the SQL statement for this query would look like this. Notice that the **Canceled** filter is used.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/2530698/54c0d97e-8f62-0333-ca29-865741882573.png)
Now try turning on the **Prompt Only Filter** option.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/2530698/8b50fbb2-d735-b6d5-ce5f-938a990be94d.png)
The background becomes light yellow.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/2530698/350eb517-23ae-71b3-6ee5-5350a96db0c1.png)
In the generated SQL statement it will not be present in the WHERE clause like this.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/2530698/be83a0d1-0477-cbaf-6918-c6bc21c36f84.png)

## Examples of using Prompt Only Filter ##
### When debugging ###
As you build your query, work while checking the results. There are times when you want to temporarily remove a filter from the WHERE clause to check the results even though it is a filter you need for the query you are working on. Instead of deleting the filter in such cases, turn on the **Prompt Only Filter** option, check the results, then turn it off again without having to redefine the filter again. This is especially true for filters with complex definitions.
### Indirectly as a filter ###
It is used as an argument to the query.
Pass the value to the filter you defined as **Prompt Only Filter**. Use that value to determine the value of another normal filter.
See more: [【Query Builder】Prompt Filter: Used as a determinant of the value for another normal filter](https://qiita.com/Miki_Yokohata/items/1505cb2ec7e1fad71c80)
### Pass values to query outputs ###
This is also used as an argument to a query.
Pass the value to the filter you defined as **Prompt Only Filter**. Output that value as an output item, or calculate the value of other output items based on that value.
See more: [【Query Builder】Prompt Filter: Used in output items](https://qiita.com/Miki_Yokohata/items/0731a40734046f29c62a)
<br>
By using the **Prompt Only Filter**, the range of query definitions can be greatly expanded.