Dataport into Table requiring line no.

I am finisihing a dataport into the Gne Jnl Line and to have multiple line imports, I need to assign a line no. Would I be along the right lines with this: If find(’-’) then repeat “Line No.” := “Line No.” + 500; until find.next = 0; Also, which would be the best section to use in the dataport code ?

heres the code we use create an integar type global variable lineno put the following code in the onafterimportrecord trigger: “Line No.” := Lineno +100; Lineno := “Line No.”;

Thanks. I finished this by using somthing very similar to that, but without using a variable. I do have another question relating to dataports though. I need to update a table called log. I have done the following: Create record variable - Log, type Record , Table No. Log.Date:= Today; Log.Filename:= CurrDataport.Filename; Log.modify; I am getting an error telling me that the date does not exist. I know that I am missing somthing obvious, but I cannot see the wood for the trees (so to speak!) Any suggestions… Cheers

Found it ! Log.insert; Not Log.Modify;

quote:


Log.insert; Not Log.Modify;


That works providing you don’t already have a Log-Record with date=TODAY. I suggest the following: If the record doesn’t exist, insert it, otherwise read and modify. The following construct works fine.


If not Log.Get(Today) then Begin
  Clear(Log);
  Log.Date := Today;
  Log.Insert;
End;
Log.Filename:= CurrDataport.Filename;
Log.modify;

About the first question concerning increment of LineNo: Instead of

  LineNo := LineNo + 500; 

You can also write

 LineNo += 500;

------- With best regards from Switzerland Marcus Fabian