> ## 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:else

> Executes an alternate block of code when its parent conditional keyword (such as arc:exists or arc:match) does not satisfy its condition.

Use the `arc:else` keyword to execute an alternate block of code when a test like [arc:exists](https://docs.arc.cdata.com/26.4/cloud/en/scripting/keyword-reference/op-arc-exists.md) or [arc:match](https://docs.arc.cdata.com/26.4/cloud/en/scripting/keyword-reference/op-arc-match.md) fails. You can also use it to execute an alternate block of code in an [arc:call](https://docs.arc.cdata.com/26.4/cloud/en/scripting/keyword-reference/op-arc-call.md) when the call fails to produce any output items.

Unlike other languages, ArcScript requires the `arc:else` statement to be within the scope of the test it belongs to.

## Parameters

None

## Control Attributes

None

## Example

Return a placeholder title if the file does not have a name:

```xml theme={null}
<arc:call op="fileListDir" out="out">
  <arc:null attr="filename">
    <arc:set attr="title" value="Unnamed File"/>
    <arc:else>
      <arc:set attr="title" value="[filename]"/>
    </arc:else>
  </arc:null>
  <arc:push title="[title]">
  [out.*]
  </arc:push>
</arc:call> 
```

## See Also

* [arc:exists](https://docs.arc.cdata.com/26.4/cloud/en/scripting/keyword-reference/op-arc-exists.md): Check if an attribute exists.
* [arc:equals](https://docs.arc.cdata.com/26.4/cloud/en/scripting/keyword-reference/op-arc-equals.md): Check for equality.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.