# FieldAttributes Class

Namespace: [Qlik.Engine](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.htm)  
Assembly: Qlik.Engine.dll

Sets the formatting of a field.

The properties of `qFieldAttributes` and the formatting mechanism are described below.

#### Formatting mechanism

The formatting mechanism depends on the type set in `qType,` as shown below:

#### Type is DATE, TIME, TIMESTAMP or INTERVAL

The following applies:

* If a format pattern is defined in qFmt , the formatting is as defined in qFmt .
* If qFmt is empty, the formatting is defined by the number interpretation variables included at the top of the script ( TimeFormat , DateFormat , TimeStampFormat ).
* The properties qDec , qThou , qnDec , qUseThou are not used.
* If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the formatting mechanism uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
* If no format pattern is defined in qFmt , no formatting is applied. The properties qDec , qThou , qnDec , qUseThou and the number interpretation variables defined in the script are not used .
* If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
* If no format pattern is defined in qFmt , and if the value is almost an integer value (for example, 14,000012), the value is formatted as an integer. The properties qDec , qThou , qnDec , qUseThou are not used.
* If no format pattern is defined in qFmt , and if qnDec is defined and not 0, the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
* If no format pattern is defined in qFmt , and if qnDec is 0, the number of decimals is 14 and the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
* If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
* If no format pattern is defined in qFmt , the properties qDec and qnDec are used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
* If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of any script ( MoneyDecimalSep and MoneyThousandSep ).
* If no format pattern is defined in qFmt , the engine uses the number interpretation variables included at the top of the script ( MoneyDecimalSep and MoneyThousandSep ).

#### Type is INTEGER

The following applies:

#### Type is REAL

The following applies:

#### Type is FIX

The following applies:

#### Type is MONEY

The following applies:

#### Type is ASCII

No formatting, `qFmt` is ignored.

## Inheritance

* System.Object
  * FieldAttributes

## Syntax

```
[ValueClass]
public class FieldAttributes : IFieldAttributes
```

## Constructors

| Name | Description |
| --- | --- |
| [FieldAttributes()](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.FieldAttributes.-ctor.htm#Qlik_Engine_FieldAttributes__ctor) |  |

## Properties

| Name | Description |
| --- | --- |
| [Dec](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.FieldAttributes.Dec.htm#Qlik_Engine_FieldAttributes_Dec) | Defines the decimal separator.<br><br>Example: **.**<br><br>JSON property name: qDec |
| [Fmt](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.FieldAttributes.Fmt.htm#Qlik_Engine_FieldAttributes_Fmt) | Defines the format pattern that applies to `qText` .<br><br>Is used in connection to the type of the field (parameter **qType** ).<br><br>For more information, see `Formatting mechanism`.<br><br>Example: `YYYY-MM-DD` for a date.<br><br>JSON property name: qFmt |
| [nDec](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.FieldAttributes.nDec.htm#Qlik_Engine_FieldAttributes_nDec) | Number of decimals.<br><br>Default is 10.<br><br>JSON property name: qnDec |
| [Thou](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.FieldAttributes.Thou.htm#Qlik_Engine_FieldAttributes_Thou) | Defines the thousand separator (if any).<br><br>Is used if **qUseThou** is set to 1.<br><br>Example: **,**<br><br>JSON property name: qThou |
| [Type](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.FieldAttributes.Type.htm#Qlik_Engine_FieldAttributes_Type) | Type of the field.<br><br>Default is U.<br><br>JSON property name: qType |
| [UseThou](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.FieldAttributes.UseThou.htm#Qlik_Engine_FieldAttributes_UseThou) | Defines whether or not a thousands separator must be used.<br><br>Default is 0.<br><br>JSON property name: qUseThou |