AnsweredAssumed Answered

Export data using variable to set path

Question asked by Cadburys on Mar 27, 2015
Latest reply on Mar 27, 2015 by ChrisC_3

Title

Export data using variable to set path

Post

Hi

I have a script to export data, when I "hard code" the path it works perfectly. ie.

"filewin:/c:/My Extract Files/"&$printfilename

I would prefer to have the path as a variable. I have a table called Setup and have created a field within it called "PCExportPath" and entered C:\My Extract Files\ and set it as a Global variable.

Then I created a variable within my script for it.  I have tried various ways to setup the export path:

"filewin:"&Setup::PCExportPath&$printfilename

and I have tried to first create a variable for it and then include it in the export path variable

"fielwin:"&$PCExportpath&$printfilename

with both I get the following message:

"C:\My Extract Files\Export27032015.csv could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk."

Is it not possible to create your own path other than when using Get(Document Path)?

Any help would be appreciated.

Thanks

Cadburys 

 

 

 

 

Outcomes