I am running a routine that examines a directory of text files, imports the files via dataport and then moves the files to an archive directory. I want to be able to confirm that an instance of the dataport succeeded and commit it so that the imported file can be moved or, if it failed, that the process can continue on to the other files.
I saw some old code here from 2006 about "IF dataport.RUNMODAL THEN" but that does not work in 4.06. What are some other ways people have used to confirm that a dataport executed successfully? Thanks.
0
Comments
What version is that?
AFAK the IF .RUNMODAL THEN works in all versions, UNLESS you are in a transation.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I have the following expression - 'LoadJournal' is the dataport being called.
LoadJournal.IMPORT(TRUE);
LoadJournal.FILENAME(Configuration."Processing Path"+pFileName);
IF LoadJournal.RUNMODAL THEN
Message('');
When I try to compile the code I receive an error message saying "The expression is VOID. There must be a TRUE/FALSE expression in the IF..." ??
I use a count and a message
http://www.BiloBeauty.com
http://www.autismspeaks.org
The client will have as many as 20 files in this folder to import daily. I want to be able to 1) commit & move the files that successfully imported, 2) track the files which did not and 3) provide a summary report when the process is completed so that they know what files need attention.
here are some posts that you might find interesting.
Talking about Writefiles & change logs, etc
http://www.mibuso.com/forum/viewtopic.php?t=17477
http://www.mibuso.com/forum/viewtopic.php?t=17967
http://www.mibuso.com/forum/viewtopic.php?t=14150
http://www.mibuso.com/forum/viewtopic.php?t=10634
http://www.BiloBeauty.com
http://www.autismspeaks.org
I am still confused hearing that IF. xxx.RUNMODAL THEN should work but it is giving me a failure.
Dave
Dynamics West
http://www.dynamicswest.com