> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# arc:case

> Defines a conditional branch within arc:select that executes when the select value matches the case value, supporting exact, regex, and glob matching.

export const siteNameShort = "Arc";

Use the `arc:case` keyword with the [arc:select](./op-arc-select) keyword. `arc:case` consists of a block of {siteNameShort}Script that is executed if the value in `arc:select` matches the value in `arc:case`.

## Parameters

* **value**: The pattern or value to compare against the value specified in `arc:select`.
* **match**: The type of matches to find to determine whether the case statement should be executed. The default is `exact`, which requires an exact match of the value. Other supported types are `regex` for regular expression matching, and `glob`, which supports a simple expression model similar to the one used in file-name patterns (such as `*.txt`). The .NET edition of the application uses the .NET Framework version of regular expression matching. The Cross-Platform edition uses Java regular expression constructs.

## Control Attributes

None

## Example

Display an icon based on a condition. The `arc:case` elements match `CompanyA` and `CompanyB` in the `company_name` attribute. If any occurrences are found, take the action associated with that case.

```xml theme={null}
<arc:select value="[company_name]">
  <arc:case value="CompanyA">
    <img src="http://www.companya.com/favicon.ico" />
  </arc:case>
  <arc:case value="CompanyB">
    <img src="http://www.companyb.com/favicon.ico" />
  </arc:case>
  <arc:default>
    <img src="http://www.myhosting.com/generic.ico"/>
  </arc:default>
</arc:select>
```

## See Also

* [arc:select](./op-arc-select): Write a multiselect {siteNameShort}Script block.
* [arc:default](./op-arc-default): Write a default case for [arc:select](./op-arc-select).
