OBJECT Table 93000 Temp File List { OBJECT-PROPERTIES { Date=15-12-28; Time=18:35:15; Modified=Yes; Version List=; } PROPERTIES { } FIELDS { { 1 ; ;Filepath ;Text200 } { 2 ; ;Date ;Date } } KEYS { { ;Filepath ;Clustered=Yes } { ;Date } } FIELDGROUPS { } CODE { BEGIN END. } } OBJECT Codeunit 93000 Temp File List Creator { OBJECT-PROPERTIES { Date=15-12-28; Time=18:47:09; Modified=Yes; Version List=; } PROPERTIES { OnRun=BEGIN LoadList('C:\Temp'); ShowDateSortedList; MESSAGE('Done'); END; } CODE { VAR TempFileList@1000000000 : TEMPORARY Record 93000; VirtualFile@1000000001 : Record 2000000022; PROCEDURE LoadList@1000000001(Path@1000000000 : Text[1024]); VAR DotNetPath@1000000001 : DotNet "'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.IO.Path"; BEGIN VirtualFile.SETRANGE("Is a file", TRUE); VirtualFile.SETRANGE(Path, Path); IF NOT VirtualFile.FINDSET THEN EXIT; REPEAT TempFileList.INIT; TempFileList.Filepath := DotNetPath.Combine(VirtualFile.Path, VirtualFile.Name); TempFileList.Date := VirtualFile.Date; TempFileList.INSERT; UNTIL VirtualFile.NEXT = 0; END; PROCEDURE ShowDateSortedList@1000000003(); BEGIN TempFileList.SETCURRENTKEY(Date); IF NOT TempFileList.FINDSET THEN EXIT; REPEAT IF NOT CONFIRM('%1 %2',FALSE, TempFileList.Date, TempFileList.Filepath) THEN ERROR('Aborts...'); UNTIL TempFileList.NEXT = 0; END; BEGIN END. } }
Answers
By that I mean that you create a new table with field path and date. Then you create keys for both fields.
Now to the trick. You don't really want to waste a table license on this BUT if you only use the table as a temporary table you don't need to assign the table in the licens
Here is an example I did in NAV 2013 R2 containing one codeunit and table:
Have you checked the cables?
Have you released the filters?
http://www.navfreak.com