Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WDESIGNER and version 24.0

For a flat file that contains a header row, you can easily filter out the header row while processing the file. The example below implements such a behavior.

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNameFlatFileAdapter_ProductExport_Example
PageWithExcerptINTERNAL:_designer_examples
shouldDisplayInlineCommentsInIncludesfalse

Define a dedicated FlatFileRecord class for the header record and add it to the FlatFile class.

Info

It is not possible to use header record information to define dynamically attribute names of the following data records.

By specifying lineNumber=1, the first record is processed into class Header. If the flat file has more than one header record, you must specify a FlatFileRecord class for each of the header records and set lineNumber accordingly.

Due to the fact that there are multiple FlatFileRecord classes on the same level, the attribute evaluationOrder manifests the order in which the records occur in the file:

  • Header: Evaluation order = 1
  • Product: Evaluation order = 2
Info

It's strongly recommend to use evaluationOrder in such cases. If you do not specify an evaluation order, the order of processing is undefined and random.

rp
Panel
titleRelated Pages:

Other Common Flat File Issues:

Children Display
pageCommon Flat File Issues