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

# arc:notnull

> 使用 arc:notnull 檢查指定物件中的屬性是否有值；arc:exists 是此關鍵字的同義詞。

export const siteNameShort = "知行之橋";

arc:notnull 關鍵字可以在指定的物件中檢查屬性是否有值。[arc:exists](./op-arc-exists) 關鍵字與 arc:notnull 同義。

## 參數

* **item**：要檢查的物件。如果未指定，則使用預設的輸出物件。
* **attr**：要檢查的屬性名稱。
* **action**：如果運算式計算結果為 true 時執行的操作。允許的值有：break，continue。

## 控制屬性

無

## 範例

定義缺少的 title 屬性。

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

## 另請參閱

* [arc:else](./op-arc-else)：建立一個程式碼塊，如果條件不滿足的話則執行該程式碼塊。
