How can I update the 'FIle' Table?

Raul
Member Posts: 14
I'm using the 'File' Table to edit a directory, but when
I move some files to another directory Navision does not update.
The way it updates is restarting the navision client.
Any suggestion?
Thanks a million
Raúl.
I move some files to another directory Navision does not update.
The way it updates is restarting the navision client.
Any suggestion?
Thanks a million
Raúl.
0
Comments
-
I think a currform.UPDATE should do the trick, but I haven't tried it.
Dennis van Es
PerCom: Research & Development BV
The NetherlandsDennis van Es
Qwinsoft BV
The Netherlands0 -
Haaaa,
this is a though one ... I 'll try to explain how you can solve the problem.
When using the virtual table file you can show entries of a certain folder by setting a filter on the 'path' field.
Example : suppose you have a folder 'data' on drive C. Then you can write :
setrange(path,'c:\data');
Now if you want to get it updated after an action of a user (or you implement a 'refresh' button) you should use :
setrange(path,'c:\data\');
in fact you should allways switch between a filter with a backslash on the last position or not ... put it in a little algorithme :
- test for the last position,
- if this is a backslash then remove the backslash and apply the filter again
- if this is a another char. add the backslash and apply the filter again
Hope this works,
LVDE
[This message has been edited by Ludo (edited 25-02-2000).]0 -
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Ludo:
setrange(path,'c:\data\');
<HR></BLOCKQUOTE>
Wow, what a nice trick!
Good work Ludo.
[This message has been edited by Luc Van Dyck (edited 25-02-2000).]No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Yes,it works really fine. <img border="0" title="" alt="" src="images/smiles/icon_wink.gif" />
Thanks.
OnPreDataItem()
IF slash THEN
BEGIN
FileTable.RESET;
FileTable.SETRANGE(FileTable."Is a file", TRUE);
FileTable.SETRANGE(FileTable.Path, StrPath + '\');
END
ELSE
BEGIN
FileTable.RESET;
FileTable.SETRANGE(FileTable."Is a file", TRUE);
FileTable.SETRANGE(FileTable.Path, StrPath);
END;
OnAfterGetRecord()
dportPathFile.FILENAME(StrPath + '\' + FileTable.Name);
dportPathFile.RUN;0 -
This is indeed a nice trick.
But what if you don't have a path ?
The update works fine if you change between 'c:\data' and 'c:\data\'.
But what if i want to update the view on the root directory ?
It doesn't work with 'c:\' and 'c:' because if you omit the path navision defaults to the current directory.
How do i solve thisone ?
Rgds
BennyRgds
Benny Giebens0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions