# ConditionalRule Interface

> ConditionalRule interface in the TX Sheet Control TypeScript API for Node.js, with 4 properties and a TypeScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Interface
- **Path:** TX Sheet Control > API Reference > TypeScript API > Node.js Server > ConditionalRule Interface
- **432 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/conditionalrule/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/conditionalrule/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/conditionalrule/llms-full.txt

---

Native conditional rule payload. Additional validated fields depend on the rule type.

Package: `@txtextcontrol/tx-sheet-control-server`. Version: **2.0.0**.

Related workbook object-model type, returned through the server control. Obtain it from its owning workbook or collection; it is not a required browser-package import.

### Members

#### Properties

| Property | Description |
|---|---|
| [formatting](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/conditionalrule/formatting-property/llms-full.txt) | The formatting value of ConditionalRule. |
| [id](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/conditionalrule/id-property/llms-full.txt) | The id value of ConditionalRule. |
| [ranges](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/conditionalrule/ranges-property/llms-full.txt) | The ranges value of ConditionalRule. |
| [type](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/conditionalrule/type-property/llms-full.txt) | The type value of ConditionalRule. |

### Examples

Pass the ConditionalRule value obtained from its owning control, collection, callback or operation. The function reads that value without constructing a replacement document object.

```typescript
import type { ServerSheetControl } from '@txtextcontrol/tx-sheet-control-server';

function inspectConditionalRuleId(
    conditionalRule: Parameters<ServerSheetControl['workbook']['addConditionalRule']>[0],
) {
    const value = conditionalRule['id'];
    console.log('ConditionalRule.id', value);
}
```

### See Also

- [TypeScript Node.js Server API](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/llms-full.txt)
- [Workbooks and Worksheets](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/workbooks/llms-full.txt)

---

## In This Section

- [ConditionalRule.formatting Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/conditionalrule/formatting-property/llms-full.txt): ConditionalRule.formatting property in the TX Sheet Control TypeScript API for Node.js, with its type Partial<CellStyle> | undefined and a TypeScript example.
- [ConditionalRule.id Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/conditionalrule/id-property/llms-full.txt): ConditionalRule.id property in the TX Sheet Control TypeScript API for Node.js, with its type string | undefined and a TypeScript example.
- [ConditionalRule.ranges Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/conditionalrule/ranges-property/llms-full.txt): ConditionalRule.ranges property in the TX Sheet Control TypeScript API for Node.js, with its type string[] and a TypeScript example.
- [ConditionalRule.type Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/conditionalrule/type-property/llms-full.txt): ConditionalRule.type property in the TX Sheet Control TypeScript API for Node.js, with its type string and a TypeScript example.

---

## Nearby

- **Previous:** [ChartTypeDefinition.threeD Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/charttypedefinition/threed-property/llms-full.txt)
- **Next:** [ConditionalRule.formatting Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/conditionalrule/formatting-property/llms-full.txt)
