I am struggling to make different destination paths for Export and Import files when running in designer mode and RunTime time in the application.
Tests are OK in Designer mode, but fail in RunTime.
If I change paths to work in Runtime, then I cannot test the routines in designer mode.
Design work is frequently done on my local PC. Then reconciled to application on customer Server. But sometimes Designer is used on a customer workstation. Workstations are mapped to a Share on the server, but the Drive letters are not recognized by the Server when going to relative paths in Client-Server mode.
Server 2012 has a Share identified as Sesame2. On the server it is the C:\Sesame2\ folder.
Sesame is installed on the \\Server\Sesame2\ folder
Work stations are mapped so Drive S goes to the share Sesame2 with a subfolder \Sesame2\Exports\
Cannot find a common path for both modes. Need to make something like this:
// Set vDataPath based on environment
var vDataPath as String // Destination path for exports
// and Source path for imports
// Designer/Runtime mode on my local workstation
If @DirectoryExists("C:\Sesame2\CustName") Then {
vDataPath = "C:\Sesame2\CustName\Exports"
} ELSE {
// On customer network, local station
If @DirectoryExists("S:\Exports") Then {
// Runtime mode on customer network, local station
If @RuntimeMode Then {
vDataPath = "Exports"
} ELSE {
// Designer mode on customer network, local station
If @DesignerMode Then {
vDataPath = "S:\Sesame2\Exports"
} ELSE {
// None of above conditions exist
@MsgBox("Control folders not found.","","This may not be a valid setup.")
}
}
}
}
Is there such a command somewhere that I have not been able to find?