UseFieldNamesFromFirstRecord Tag

ClosedDescription

Sets whether to use the data from the first record of a text file as the field headings for the remaining data.

ClosedSyntax

<UseFieldNamesFromFirstRecord>Value</UseFieldNamesFromFirstRecord>

Where Value defines whether the field names in the first record are used as headings. Valid values are true or false.

ClosedParent Tag

<RecordSet>

ClosedRemarks

The <UseFieldNamesFromFirstRecord> tag sets whether to use field names from the first record of a text file. The first record (or row) can contain header information for each of the field columns. When <UseFieldNamesFromFirstRecord> is set to true, BarTender will read the first record and assign field names based on the values read. All remaining records will be read as data to be printed on the label.

BarTender ignores the header record in substitute text file databases unless the <UseFieldNamesFromFirstRecord> tag is explicitly set to true.

<UseFieldNamesFromFirstRecord> is an optional tag that is used with the <Print>, <FormatSetup>, and <ExportPrintPreviewToImage> commands when the <RecordSet> tag is included in the script.

ClosedExample

<?xml version="1.0" encoding="utf-8"?>

<XMLScript Version="2.0" Name="09232006_103601_Job1" ID="123">

<Command Name="Job1">

<Print>

<Format>Label1.btw</Format>

<RecordSet Name="Text File 1" Type="btTextFile">

<FileName>Data1.dat</FileName>

<Delimitation>btDelimCustom</Delimitation>

<FieldDelimiter>;</FieldDelimiter>

<NumberOfFields>10</NumberOfFields>

<UseFieldNamesFromFirstRecord>true</UseFieldNamesFromFirstRecord>

</RecordSet>

</Print>

</Command>

</XMLScript>

ClosedRequirements

BTXML Script version 1.0 (BarTender 8.0 and later versions)

Related Topics