Export only the last recourd Calculated

I Created a Export Dataport from Purchase Inv Line.

My dataport has 6 DataportsFields with CallFieldsValidate Property, so is on the last Purchase Invoice line record that I Get all my 6 variables calculated.

In this case, I need only the last dataPort Record to be Exported to txt file.

How can I do That?

My idear was creat a condition in Purch. Inv. Line - OnBeforeExportRecord(), when that condition happens then


But, I don’t have any particulary condition.

how about you create variables to export (for example to test)
MYDESCRIPTION & ITEMNO these will also be your “Dataport Fields”

on before export record - you map the nav fields to these variables for export.

IF “Purchase Line”.FIND(’+’) THEN BEGIN
MYDESCRIPTION := Description;
ITEMNO := “No.”;

Run the dataport - select a PO for export & this should just export the last line of the po.