Ok the topic was closed so I had to create a new one.
delete txt file after import
RE:
viewtopic.php?t=4449
Answers:
Put the following Code in the OnPost Dataport Trigger
CurrFile.CLOSE;
IF Confirm(Text000, true) then
ERASE(CurrDataport.FILENAME);
Where Text000 = 'Would you like to delete the file?'
OR
CurrFile.CLOSE;
IF Confirm(Text000, true) then
WHILE EXISTS(CurrDataport.FILENAME)
DO ERASE(CurrDataport.FILENAME);
What I would like to do Now is for the Message after the import to say
XXX Orders Imported
Would you like to delete the file?
XXX being the number of records imported
So basically the only change would to get a count on the records?
I'm thinking the count should go on the
OnAfterImportRecord() of the Sales Header Dataitem. Help. Thanks.
Answers
Guess we should not have highjacked it
I think best thing to do indeed is to keep somekind of counter in the OnAfterImport trigger
RecCounter := RecCounter + 1;
Another thing you can do is if all imported records have a similar ID or fieldvalue you can filter on this and do a COUNT on the table.
](*,)
http://www.BiloBeauty.com
http://www.autismspeaks.org
Making a Internet Interface Harry
I've made 2 changes in your object
And I think you should Initialise the ordercount to 0 in the predataport trigger.
Change your textconstant to
%1 Orders are imported\Would You Like To Delete The File?
Maybe this helps
http://www.BiloBeauty.com
http://www.autismspeaks.org
I don't see a "Locked" icon next to that thread, so why do you think it's closed?
I tried a few times to add to the post and it just kept kicking me out of it. So I assumed that adding anymore replies to the post was closed especially since it was SOLVED.
http://www.BiloBeauty.com
http://www.autismspeaks.org
Perfection! \:D/
http://www.BiloBeauty.com
http://www.autismspeaks.org