Table "CSV Buffer"
Table to store CSV (comma-separated values).
Properties
| Name | Value |
|---|---|
| Caption | CSV Buffer |
| ReplicateData | False |
| DataClassification | CustomerContent |
Fields
| Name | Type | Description |
|---|---|---|
| "Line No." | Integer | |
| "Field No." | Integer | |
| Value | Text[250] | |
| SystemId | Guid | |
| SystemCreatedAt | DateTime | |
| SystemCreatedBy | Guid | |
| SystemModifiedAt | DateTime | |
| SystemModifiedBy | Guid | |
| SystemRowVersion | BigInteger |
Methods
InsertEntry
Inserts an entry to the record.
procedure InsertEntry(LineNo: Integer, FieldNo: Integer, FieldValue: Text[250])
Parameters
| Name | Type | Description |
|---|---|---|
| LineNo | Integer |
The line number on which to insert the value. |
| FieldNo | Integer |
The field number (or position) on which to insert the value. |
| FieldValue | Text[250] |
The value to insert. |
LoadDataFromStream
Loads data from a stream.
procedure LoadDataFromStream(CSVInStream: InStream, CSVFieldSeparator: Text[1], CSVCharactersToTrim: Text)
Parameters
| Name | Type | Description |
|---|---|---|
| CSVInStream | InStream |
The stream from which to laod data. |
| CSVFieldSeparator | Text[1] |
The character to use to split the values. |
| CSVCharactersToTrim | Text |
Characters to trim from the beginning and the end of the read values. |
LoadDataFromStream
Loads data from a stream.
procedure LoadDataFromStream(CSVInStream: InStream, CSVFieldSeparator: Text[1])
Parameters
| Name | Type | Description |
|---|---|---|
| CSVInStream | InStream |
The stream from which to laod data. |
| CSVFieldSeparator | Text[1] |
The character to use to split the values. |
SaveDataToBlob
Saves the data stored in the record to a BLOB.
procedure SaveDataToBlob(var TempBlob: Codeunit "Temp Blob", CSVFieldSeparator: Text[1])
Parameters
| Name | Type | Description |
|---|---|---|
| TempBlob | Codeunit System.Utilities."Temp Blob" |
The BLOB in which to save the data. |
| CSVFieldSeparator | Text[1] |
The character to use as separator. |
InitializeReaderFromStream
Initializes the CSV buffer.
procedure InitializeReaderFromStream(CSVInStream: InStream, CSVFieldSeparator: Text[1], CSVCharactersToTrim: Text)
Parameters
| Name | Type | Description |
|---|---|---|
| CSVInStream | InStream |
The stream from which to read data. |
| CSVFieldSeparator | Text[1] |
The character to use to split the values. |
| CSVCharactersToTrim | Text |
Characters to trim from the beginning and the end of the read values. |
Remarks
No data is inserted into the buffer.
InitializeReaderFromStream
Initializes the CSV buffer.
procedure InitializeReaderFromStream(CSVInStream: InStream, CSVFieldSeparator: Text[1])
Parameters
| Name | Type | Description |
|---|---|---|
| CSVInStream | InStream |
The stream from which to read data. |
| CSVFieldSeparator | Text[1] |
The character to use to split the values. |
Remarks
No data is inserted into the buffer.
LoadDataFromStream
Loads data from a stream.
procedure LoadDataFromStream(CSVInStream: InStream, CSVFieldSeparator: Text[1], EncodingCodePage: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| CSVInStream | InStream |
Instream from which to read data. |
| CSVFieldSeparator | Text[1] |
The character to use to split the values. |
| EncodingCodePage | Integer |
Encoding page from the file that was loaded in the stream. For more references you can see the Encoding.GetEncoding(EncodingCodePage) in C#. |
LoadDataFromStream
Loads data from a stream.
procedure LoadDataFromStream(CSVInStream: InStream, CSVFieldSeparator: Text[1], CSVCharactersToTrim: Text, EncodingCodePage: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| CSVInStream | InStream |
Instream from which to read data. |
| CSVFieldSeparator | Text[1] |
The character to use to split the values. |
| CSVCharactersToTrim | Text |
Characters to trim from the beginning and the end of the read values. |
| EncodingCodePage | Integer |
Encoding page from the file that was loaded in the stream. For more references you can see the Encoding.GetEncoding(EncodingCodePage) in C#. |
InitializeReaderFromStream
Initializes the CSV buffer.
procedure InitializeReaderFromStream(CSVInStream: InStream, CSVFieldSeparator: Text[1], CSVCharactersToTrim: Text, EncodingCodePage: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| CSVInStream | InStream |
The stream from which to read data. |
| CSVFieldSeparator | Text[1] |
The character to use to split the values. |
| CSVCharactersToTrim | Text |
Characters to trim from the beginning and the end of the read values. |
| EncodingCodePage | Integer |
Encoding page from the file that was loaded in the stream. For more references you can see the Encoding.GetEncoding(EncodingCodePage) in C#. |
ResetFilters
Resets the filters on the record.
procedure ResetFilters()
GetValue
Gets a value from the record.
procedure GetValue(LineNo: Integer, FieldNo: Integer): Text[250]
Parameters
| Name | Type | Description |
|---|---|---|
| LineNo | Integer |
The line number to identify the value. |
| FieldNo | Integer |
The field number (or position) to identify the value. |
Returns
| Type | Description |
|---|---|
| Text[250] |
The value stored on line |
GetCSVLinesWhere
Gets all the lines that contain a specific value on a specific field/position.
procedure GetCSVLinesWhere(FilterFieldNo: Integer, FilterValue: Text, var TempResultCSVBuffer: Record "CSV Buffer" temporary)
Parameters
| Name | Type | Description |
|---|---|---|
| FilterFieldNo | Integer |
The field number (or position) of the value. |
| FilterValue | Text |
The value to filter on. |
| TempResultCSVBuffer | Table System.IO."CSV Buffer" |
Out parameter to store the result. |
GetValueOfLineAt
Gets the value on the current line with a specific field number (or position).
procedure GetValueOfLineAt(FieldNo: Integer): Text[250]
Parameters
| Name | Type | Description |
|---|---|---|
| FieldNo | Integer |
The field number (or posistion) to identify the value. |
Returns
| Type | Description |
|---|---|
| Text[250] |
The value on the current line and field number |
GetValueOfLineAt
Gets the value on the current line with a specific field number (or position).
procedure GetValueOfLineAt(FieldNo: Integer, AcceptNonExisting: Boolean): Text[250]
Parameters
| Name | Type | Description |
|---|---|---|
| FieldNo | Integer |
The field number (or posistion) to identify the value. |
| AcceptNonExisting | Boolean |
The field number (or posistion) to identify the value. |
Returns
| Type | Description |
|---|---|
| Text[250] |
The value on the current line and field number |
GetNumberOfColumns
Gets the number of columns store in the record.
procedure GetNumberOfColumns(): Integer
Returns
| Type | Description |
|---|---|
| Integer |
The number of fields for every line. |
GetNumberOfLines
Gets the number of lines stored in the record.
procedure GetNumberOfLines(): Integer
Returns
| Type | Description |
|---|---|
| Integer |
The number of lines stored in the record. |