Table of Content
HAL Forum
procedure AddRecordToArea (
Record record,String recordtype,Area area)
Description:
Adds a specified type of record to a memory area
Parameters:
record Record variable that will be added to the area.
recordtype The type of the record to be added to the area.
area The area variable into where the record will be added.
// Load DEMO data before testing this
// This will run right after HansaWorld has been started
global
updating procedure OnApplicationStartup()
begin
  area a;
  longint l;
  record INVc INr;

  SetCompany(1,true);
  while(LoopMain(INr,1,true)) begin
    AddRecordToArea(INr,"INVc",a);
  end;

  // writes all the record codes in the area to hansa.log
  while(l<GetAreaLength(a)) begin
    l = GetRecordFromArea(INr,"INVc",l,a);
    LogText(0,INr.Code);
  end;
  
  return;
end;
Related topics:
««