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

# NSArchiveRestrictionInfo

> Carries information about a restriction on the query of an archive provider.

Carries information about a restriction on the query of an archive provider.

## Constructors

### NSArchiveRestrictionInfo()

```crmscript theme={null}
NSArchiveRestrictionInfo
```

Initializes a new instance of the NSArchiveRestrictionInfo class.

## Methods

## GetColumnInfo()

```crmscript theme={null}
NSArchiveColumnInfo GetColumnInfo()
```

**Returns:** [CRMScript.NetServer.NSArchiveColumnInfo](CRMScript.NetServer.NSArchiveColumnInfo) - Optional complete NSArchiveColumnInfo for this restriction; in that case, ColumnInfo.Name == this.Name will always be true.

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
NSArchiveColumnInfo columnInfo = thing.GetColumnInfo();
```

## GetDisplayValues()

```crmscript theme={null}
String[] GetDisplayValues()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String)\[] - Display representation of values.

<Note>
  List ID's are decoded to display texts, other values are represented in a format suitable for decoding and display through the CultureDataFormatter.
</Note>

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
String[] displayValues = thing.GetDisplayValues();
```

## GetInterOperator()

Gets inter-restriction operator that describes how this restriction is related to the next one in an array.

```crmscript theme={null}
Integer GetInterOperator()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - inter-restriction operator 0 = None; 1 = And; 2 = Or.

<Note>
  Default for new ArchiveRestrictionInfo objects is And
</Note>

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
Integer interOperator = thing.GetInterOperator();
```

## GetInterParenthesis()

Gets the parenthesis (if any) associated with this restriction.

```crmscript theme={null}
Integer GetInterParenthesis()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer)

<Note>
  Positive values indicate a number of opening parentheses (deepening nesting level), while negative numbers indicate closing parentheses. Zero means no change in nesting level (no parentheses).
</Note>

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
Integer interParenthesis = thing.GetInterParenthesis();
```

## GetIsActive()

```crmscript theme={null}
Bool GetIsActive()
```

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - Is this restriction active?

<Note>
  Inactive restrictions will not influence the generated query.
</Note>

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
Bool isActive = thing.GetIsActive();
```

## GetName()

```crmscript theme={null}
String GetName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The programmatic column name, including any required prefixes.

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
String name = thing.GetName();
```

## GetOperator()

```crmscript theme={null}
String GetOperator()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The operator, such as =

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
String operator = thing.GetOperator();
```

## GetParenthesis()

```crmscript theme={null}
Integer GetParenthesis()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer)

## GetSubRestrictions()

```crmscript theme={null}
NSArchiveRestrictionInfo[] GetSubRestrictions()
```

**Returns:** [CRMScript.NetServer.NSArchiveRestrictionInfo](CRMScript.NetServer.NSArchiveRestrictionInfo)\[] - Optional collection of sub criteria, usually null but set for Saint counter fields.

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
NSArchiveRestrictionInfo[] subRestrictions = thing.GetSubRestrictions();
```

## GetUniqueHash()

```crmscript theme={null}
Integer GetUniqueHash()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer)

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
Integer uniqueHash = thing.GetUniqueHash();
```

## GetValues()

```crmscript theme={null}
String[] GetValues()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String)\[] - Values to test against.

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
String[] values = thing.GetValues();
```

## SetColumnInfo(NSArchiveColumnInfo)

```crmscript theme={null}
Void SetColumnInfo(NSArchiveColumnInfo columnInfo)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
NSArchiveColumnInfo columnInfo;
thing.SetColumnInfo(columnInfo);
```

## SetDisplayValues(String\[])

```crmscript theme={null}
Void SetDisplayValues(String[] displayValues)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

<Note>
  List IDs are decoded to display texts, other values are represented in a format suitable for decoding and display through the CultureDataFormatter.
</Note>

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
String[] displayValues;
thing.SetDisplayValues(displayValues);
```

## SetInterOperator(Integer)

Gets inter-restriction operator that describes how this restriction is related to the next one in an array.

```crmscript theme={null}
Void SetInterOperator(Integer operator)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

<Note>
  Default for new ArchiveRestrictionInfo objects is And
</Note>

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
Integer interOperator;
thing.SetInterOperator(interOperator);
```

## SetInterParenthesis(Integer)

Gets the parenthesis (if any) associated with this restriction.

```crmscript theme={null}
Void SetInterParenthesis(Integer interParenthesis)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

<Note>
  Positive values indicate a number of opening parentheses (deepening nesting level), while negative numbers indicate closing parentheses. Zero means no change in nesting level (no parentheses).
</Note>

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
Integer interParenthesis;
thing.SetInterParenthesis(interParenthesis);
```

## SetIsActive(Bool)

Activates or deactivates a restriction.

```crmscript theme={null}
Void SetIsActive(Bool isActive)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

<Note>
  Inactive restrictions will not influence the generated query.
</Note>

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
Bool isActive;
thing.SetIsActive(isActive);
```

## SetName(String)

```crmscript theme={null}
Void SetName(String name)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
String name;
thing.SetName(name);
```

## SetOperator(String)

```crmscript theme={null}
Void SetOperator(String operator)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
String operator;
thing.SetOperator(operator);
```

## SetParenthesis(Integer)

```crmscript theme={null}
Void SetParenthesis(Integer p)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

## SetSubRestrictions(NSArchiveRestrictionInfo\[])

```crmscript theme={null}
Void SetSubRestrictions(NSArchiveRestrictionInfo[] subRestrictions)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
NSArchiveRestrictionInfo[] subRestrictions;
thing.SetSubRestrictions(subRestrictions);
```

## SetUniqueHash(Integer)

```crmscript theme={null}
Void SetUniqueHash(Integer uniqueHash)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
Integer uniqueHash;
thing.SetUniqueHash(uniqueHash);
```

## SetValues(String\[])

```crmscript theme={null}
Void SetValues(String[] values)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSArchiveRestrictionInfo thing;
String[] values;
thing.SetValues(values);
```


## Related topics

- [NSArchiveRestrictionGroup](/en/automation/crmscript/reference/CRMScript.NetServer.NSArchiveRestrictionGroup.md)
- [Archive agent](/en/automation/crmscript/netserver/crmscript-archiveagent.md)
- [NSFindAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSFindAgent.md)
- [NSCriteriaInformation](/en/automation/crmscript/reference/CRMScript.NetServer.NSCriteriaInformation.md)
- [NSSelectionAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSSelectionAgent.md)
- [Namespace CRMScript.NetServer](/en/automation/crmscript/reference/CRMScript.NetServer.md)
