# HasValue

{% hint style="info" %}
The **`HasValue()`** function checks whether the input parameter is not empty and has a specific value.

This function is SQL compatible. For more information about SQL compatibility, see our [documentation](https://docs.wem.io/platform/wemreference/sql-compatibility).
{% endhint %}

{% hint style="warning" %}
If the input parameter is a list or a collection (like a Concept-Set), then the `HasValue()` function checks if the list has at least 1 row.

The [IsEmpty](https://docs.wem.io/platform/wemreference/functions/validation/isempty)() function checks the opposite of this function.
{% endhint %}

{% hint style="success" %}
Returns <mark style="color:green;">`true`</mark> if <mark style="color:blue;">`parameter`</mark> is not empty and contains a specific value.\
Returns <mark style="color:red;">`false`</mark> if <mark style="color:blue;">`parameter`</mark> is empty.&#x20;
{% endhint %}

### Syntax

<details>

<summary><code>HasValue(</code><mark style="color:blue;"><code>parameter</code></mark><code>)</code></summary>

`HasValue( "1" )`\
\&#xNAN;*=> True*

`HasValue(`*`unknownnumber`*`)`\
\&#xNAN;*=> False*

`HasValue( "" )`\
\&#xNAN;*=> False*

`HasValue( "` `" )`\
\&#xNAN;*=> True*

`HasValue( '' )`\
\&#xNAN;*=> True*

`HasValue( {} )`\
\&#xNAN;*=> False*

`HasValue( [List WithRows] )`\
\&#xNAN;*=> True*

`HasValue( [List WithNoRows] )`\
\&#xNAN;*=> False*

</details>

### Parameters

<table><thead><tr><th width="150">Name</th><th width="150">Type</th><th width="150" align="center">Required</th><th width="284.6178790534619">Description</th><th data-hidden>Required?</th></tr></thead><tbody><tr><td><mark style="color:blue;">parameter</mark></td><td>any</td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2611">☑️</span></td><td>Field that is checked for a value </td><td>yes</td></tr></tbody></table>
