Skip to content
+1-888-319-3663

COMMUNITY FORUM

Change SourceFileName

Habib asked 6 months ago
Hello
I am using a text file as the source of my receivables transaction integration.  i recently read an article on your website but i cant seem to find it anywhere.
i recall taht i need to use a Pre-map task, script an openfiledialog and copy or move the file name to a specific folder and assign that filename to a global variable.
I recall that there was something else that caught my attention and i wanted to find taht article again.  can you paste link to that article,please.
Regards
Habib
Answers
Patrick Roth Staff answered 6 months ago
You can’t use an open file dialog with SmartConnect.  I (and others) have tried and while the dialog is called – it never gets displayed in SmartConnect and thus the map just “hangs” until you kill SmartConnect.  We think it is something due to how the dialog does its threading that makes it incompatible to being called this way.
 
This article talks about moving a file from one folder to another.  It does write it as a fixed file name – so you don’t have to put the name in a global variable since you hard code it.  But i suppose you could use this and just move the file as-is.  And since you have the file name there, put it into a user global variable (GBL_FILENAME that you create vs using the built-in global GlobalFileName)
Patrick Roth Staff replied 6 months ago
Habib Salim answered 6 months ago
Thanks Patrick!
This ought to work quite nicely, if i switch to a folder data source.  However, i am currently using a text file source and i thought there was an article that specifically addressed that scenario.  
IT probably wont be of much use if i can’t use OpenFileDialog.  Anyway, if that article is still available/valid, i’d like to see it.
I tried looking for it; your script library/archive is not reachable – error 404.  

If you would like to submit an answer or comment, please sign in to the eOne portal.