This topic is locked

Folders

1/7/2011 12:53:45 AM
ASPRunner.NET General questions
R
Raptor author

I have an interesting situation. When my users create new records everything is working ok, I need to do something a little different.
When a record is added it gets a number. Lets say 80102 is the next record number. So now lets say I want to save a document to this record that will be stored in a file folder. It is currently saving documents to this folder because I have an add event that is this.

Dim fso, f, ndir

ndir="D:\Apps\Database Documents\" & Session(strTableName & "_masterkey1")
So documents for 80102 are saved in a folder named 80102. Well I need to change this process?
Because I have had a bunch of Files I had to change my directory structure. I created sub folder that look like this.
Folder 0000-9999 Any record thats 0 - 9999 Documents are stored here.

Folder 10000-19999 Any record thats 10000 - 19999 Documents are stored here.

Folder 20000-29999 Any record thats 20000 - 29999 Documents are stored here.

Folder 30000-39999 Any record thats 30000 - 39999 Documents are stored here.

I hope I've explained this well enough.
Now the Access database I achieve this with this code
LPID = Len(Forms![patient information]![PatientID])

LLPID = LPID - 4

FPath = "L:\database documents\" & Left(Forms![patient information]![PatientID], LLPID) & "0000-" & Left(Forms![patient information]![PatientID], LLPID) & "9999\" & Forms![patient information]![PatientID] & "\"

MkDir (FPath)
How can I do the same in ASPRunner?

Sergey Kornilov admin 1/11/2011
R
Raptor author 1/25/2011

My Question is about ASPRunnerPro and with your Help we have gotten only so far. I am a green horn with ASP logic as you may remember. Somehow I need to add logic that will determine what the first digit is a add the file to the correct folder.
Has I have said before the root folder is called Docs. I have these subfolders
Folder 0000-9999 Any record thats 0 - 9999 Documents are stored here.

Folder 10000-19999 Any record thats 10000 - 19999 Documents are stored here.

Folder 20000-29999 Any record thats 20000 - 29999 Documents are stored here.

Folder 30000-39999 Any record thats 30000 - 39999 Documents are stored here.
Somehow I need to create logic that will figure out that the master key is X, grab the first digit and look at some scripting.
If the Master Key is 84656, Look to the left 4 digits, if the fifth digit is and 8 the document needs to be in the 80000-89999 folder.
If this is a service that I can pay you for I will be happy to do so.

Sergey Kornilov admin 1/25/2011

Sure, we'll be glad to assist. You can purchase two hours of programming service at http://xlinesoft.com/buy_support.htm.
Then post your application to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL along with task description and we'll be glad to help you with this.