Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Creating a file folder for every new record added

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Creating a file folder for every new record added

    Hi everybody, I am new to this forum and have bought my AlphaFive Version 9 Software recently. I am currently in the process of designing a desktop application and want to know if anyone can answer the following question.

    The software will deal with clients but I want to open a new folder with the Filenumber (clientid) for every new client to save all the documents and reports received for the specific client in that client's own folder.

    Please help me with the answer or direct me to the correct source where I can find a solution for the problem.

    Thank You.

    #2
    Re: Creating a file folder for every new record added

    David, it will help us understand you if you adopt the terminology Alpha Five uses. Records are stored in Tables. Databases are collections of Tables.

    Are you talking about separate "databases" for each client? Are you talking about separate "Tables" for each client but all "Tables" being in a single Database?

    Tell us more about the application you are building.

    -- tom

    ps. Welcome to the Message Board!

    Comment


      #3
      Re: Creating a file folder for every new record added

      Hi David,

      Welcome to Alpha.

      I assume you will be scanning in the documents. I have built an application where all pictures for a Job are stored in a folder with the same name as the Job Number. The folder is opened by the user taking the Job Number as the link with Explorer. Is that what you want to do?
      Regards
      Keith Hubert
      Alpha Guild Member
      London.
      KHDB Management Systems
      Skype = keith.hubert


      For your day-to-day Needs, you Need an Alpha Database!

      Comment


        #4
        Re: Creating a file folder for every new record added

        Sorry, I might have given too little information. I am a debt counsellor. I will design software that will do the following:

        1. I see a client and import the clients personal information, income, deductions and expenses. Then I work out a new budget for the client.

        2. I will then create different forms that will be sent to credit providers to get information about the balances of clients and to negotiate on behalf of the clients with their creditproviders.

        3. I will do calculations and work out a new repayment plan for the client.

        4. I will connect other debt counsellors later and also distribute their and my own clients' payments to the creditproviders as per the new proposal or repayment plan.

        I am in South Africa and this process has been provided for into law to provide assistance to over-indebted consumers.

        What I want to do is to create a folder for every client to save the PDF and other forms in other formats that I create with the report function in Alpha into a folder for that specific consumer. Also any other documents that is scanned or received and faxed from Alpha. This will also include any e-mails send with and received into Alpha for that specific client.

        I know this is a very difficult application to write but the software available in SA is not that good and that is why I bought Alpha.

        Thank You

        Comment


          #5
          Re: Creating a file folder for every new record added

          Given a table named clients.
          Fields clientid, fname, lname.

          I coded the onsaverecord event in the table's field rules.

          Code:
          tbl = table.current()
          cli = alltrim(tbl.clientid)
          flast = alltrim(tbl.fname)+" "+alltrim(tbl.lname)
          dir_create_recurse("c:\clientfolders\\"+cli)
          save_to_file(flast,"c:\clientfolders"+chr(92)+cli+chr(92)+flast+".txt")
          This creates the folder named for the clientid in the c:\clientfolders directory and additionally adds a text file containing the client's first and last names, named the client's first and last names. This allows easy identification of whose directory it is.

          If you download the attachment, unzip it to a new directory and add it to your database for testing. Just add some records and check the c:\clientfolders directory.
          There can be only one.

          Comment


            #6
            Re: Creating a file folder for every new record added

            Originally posted by Stan Mathews View Post
            I coded the onsaverecord event in the table's field rules.
            Good one Stan! Except, personally, I would put the code in a button on a form w. a saftey. Doesn't OnSaveRecord fire every time a change is saved, thus overwriting the text file (which may have had other changes in it)?


            Not that it matters - your image shows the CanSave event.
            Peter
            AlphaBase Solutions, LLC

            [email protected]
            https://www.alphabasesolutions.com


            Comment


              #7
              Re: Creating a file folder for every new record added

              I tried the onsaverecord but switched. Forgot that when I was describing the process, thanks.

              Except, personally, I would put the code in a button on a form w. a saftey.
              I probably would as well but it seemed he wanted automation or at least that's the way I read it.

              w. a saftey
              I charge double for bells and whistles.
              Last edited by Stan Mathews; 06-19-2009, 01:53 PM.
              There can be only one.

              Comment


                #8
                Re: Creating a file folder for every new record added

                Originally posted by Stan Mathews View Post
                I probably would as well but it seemed he wanted automation or alt least that's the way I read it.
                As Bill Gates said of IBM, "Give the customer what he wants". ;)

                I charge double for bells and whistles.
                Aaahhh... so that's your secret.
                Peter
                AlphaBase Solutions, LLC

                [email protected]
                https://www.alphabasesolutions.com


                Comment


                  #9
                  Re: Creating a file folder for every new record added

                  Thank You for all the replies. You all are very knowlegable. I do need the action to be automatic. I work in a legal firm and the software that is used create a folder for every client and every matter of the client. It also saves any letters written to the client etc. in the specific folder of that client. It just seems to make sense to have a specific folder for my client to save all information in preventing confusion with only one folder systems, not to think of the time involved in endless searches.

                  Really appreciate your help and will go test the solution.

                  Comment


                    #10
                    Re: Creating a file folder for every new record added

                    Stan

                    I like your style! I had a similar need on an application but instead of using a client identifier to name each folder I used the client name in the format:

                    Surname, Forenames (ID)

                    I also added the capability to name for a couple (with and without the same surname!)

                    The "(ID)" was added to cater for the potential to have duplicate names.

                    Operators have found it very easy to quickly locate any client.

                    Just my thoughts....

                    Regards

                    Glen
                    Glen Schild



                    My Blog

                    Comment


                      #11
                      Re: Creating a file folder for every new record added

                      Originally posted by Peter.Greulich View Post
                      Doesn't OnSaveRecord fire every time a change is saved, thus overwriting the text file (which may have had other changes in it)?
                      Not sure if this qualifies as a bell or a whistle but a minor addition to Stan's code will limit the action to only happening when the record is first created.
                      Code:
                      tbl = table.current()
                      if tbl.mode_get() = 2   [COLOR=RoyalBlue]'2=enter mode[/COLOR]
                         cli = alltrim(tbl.clientid)
                         flast = alltrim(tbl.fname)+" "+alltrim(tbl.lname)
                         dir_create_recurse("c:\clientfolders\\"+cli)
                         save_to_file(flast,"c:\clientfolders"+chr(92)+cli+chr(92)+flast+".txt")
                      End If
                      Tim Kiebert
                      Eagle Creek Citrus
                      A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

                      Comment


                        #12
                        Re: Creating a file folder for every new record added

                        Originally posted by Tim Kiebert View Post
                        Not sure if this qualifies as a bell or a whistle but a minor addition to Stan's code will limit the action to only happening when the record is first created
                        Showoff! (Ring Ring)
                        There can be only one.

                        Comment


                          #13
                          Re: Creating a file folder for every new record added

                          Originally posted by glenschild View Post
                          Stan

                          I like your style! I had a similar need on an application but instead of using a client identifier to name each folder I used the client name in the format:

                          Surname, Forenames (ID)

                          I also added the capability to name for a couple (with and without the same surname!)
                          Thanks. I agree with your implementation.

                          I've given up offering advice that requires a change of direction or doesn't answer the original question directly. That's the reason I added the portion to create the text file inside the directory. At least that way when you open the directory you can then see who the client might be.

                          I want to open a new folder with the Filenumber (clientid) for every new client
                          I suppose "with the Filenumber" might mean that something like

                          12345 Sam Jones

                          might be a better choice for the directory naming process.

                          Code:
                          dir_create_recurse("c:\clientfolders\\"+cli+" "+flast)
                          and forget saving the text file.
                          There can be only one.

                          Comment


                            #14
                            Re: Creating a file folder for every new record added

                            Originally posted by Stan Mathews View Post
                            I've given up offering advice that requires a change of direction or doesn't answer the original question directly. That's the reason I added the portion to create the text file inside the directory. At least that way when you open the directory you can then see who the client might be.
                            Valid point!
                            Glen Schild



                            My Blog

                            Comment


                              #15
                              Re: Creating a file folder for every new record added

                              Thank You for the replies. Yes I would like to see who the client is. Ssving a txt file in the folder is a great idea. It is also impotant to limit this to the first time one opens a file as was suggested. The idea is to be able to run both a physical file and an electronic file on one's system for the client.

                              Will I use the same code if I want to save a specific letter or report created by alpha for the client in his specific folder?
                              Last edited by Dolphin; 06-20-2009, 07:11 AM.

                              Comment

                              Working...
                              X