# Conditional Value

> Compare two values and output one of two values based on the result.

- ID: `ternary_conditional_value`
- Type: Block
- Category: [Logic](https://inventor.bot/docs/reference/blocks/logic.md)

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `value_1` | yes | The first value to compare. | e.g. `"hello"` |
| `condition` | yes | The comparison operator. | `"equals (=)"`, `"equals (case insensitive)"`, `"equals (numeric)"`, `"equals (float)"`, `"does not equal (!=)"`, `"does not equal (case insensitive)"`, `"greater than (>)"`, `"greater than (float)"`, `"less than (<)"`, `"less than (float)"`, `"greater or equal (>=)"`, `"greater or equal (float)"`, `"less or equal (<=)"`, `"less or equal (float)"`, `"contains"`, `"contains (case insensitive)"`, `"does not contain"`, `"does not contain (case insensitive)"`, `"is in the comma-separated list"`, `"is in the comma-separated list (case insensitive)"`, `"is not in the comma-separated list"`, `"is not in the comma-separated list (case insensitive)"`, `"starts with"`, `"starts with (case insensitive)"`, `"does not start with"`, `"does not start with (case insensitive)"`, `"ends with"`, `"ends with (case insensitive)"`, `"does not end with"`, `"does not end with (case insensitive)"`, `"is empty"`, `"is not empty"` |
| `value_2` | yes | The second value to compare. | e.g. `"hello"` |
| `output_if_true` | yes | The value to output when the condition is true. | e.g. `"yes"` |
| `output_if_false` | yes | The value to output when the condition is false. | e.g. `"no"` |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `output` | The selected output value. | e.g. `"yes"` |

**Example**

```go
check := ternary_conditional_value(Args{
	value_1:         "hello",
	condition:       "equals (=)",
	value_2:         "hello",
	output_if_true:  "yes",
	output_if_false: "no",
})
send_text_message(Args{channel_id: trigger.channel_id, message_content: "Output: " + check.output})
```