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

Zip File Name Help

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

    Zip File Name Help

    I need a little help trying to putting the most recent date of the last sales call in the into the following:

    XYZ = "C:\Users\Steve\Desktop\Steve Martin Data.zip" which gets its data from: a table called "Sales Data"

    Currently the file is zipped to "Steve's" desktop with a name of "Steve Martin Data.zip". I would like to have it be "Steve Martin Data thru 4/7/12.zip" where the date "4/7/12" is the date of "Steve's" last sales call from the table "Sales Data".

    Thank you in advance... JON

    #2
    Re: Zip File Name Help

    I would like to have it be "Steve Martin Data thru 4/7/12.zip"
    No, you wouldn't. Forward slashes are illegal in file names. You'll have to provide a lot more information, preferably a sample in which we can see the context in which the zip is being generated.

    However you are getting the personal name Steve Martin, you'll want something like

    person_name +" Data thru "+dtoc(date_field,"6-") +".zip"
    There can be only one.

    Comment


      #3
      Re: Zip File Name Help

      Hi Jon,

      Please read my Using Dates in Databases for tips of file naming with date.
      Regards,

      Ira J. Perlow
      Computer Systems Design


      CSDA A5 Products
      New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
      CSDA Barcode Functions

      CSDA Code Utility
      CSDA Screen Capture


      Comment


        #4
        Re: Zip File Name Help

        Stan, thanks for the quick reply. Below is the (3) lines of code that "zips" the table "Sales Data" to in this example "Steve's Desktop". For every user I have to modify the variable "SMData" in the script by changing there Name (ie Steve Martin > Billy Martin) and the location of where I would like the "Zipped" file to be placed (ie C:\Users\Steve\Desktop > C:\Users\Billy\Desktop). The table "Sales Data" does however have each salesmen's name in a field (Sales_Man) which is unique to there computer. I would like simply to either have the current date of when the file was "zipped" (Steve Martin Data thru 4/8/12.zip) or assuming Steve's last sales call was on Friday (4/6/12) then the name of the file that is zipped to his desktop would be "Steve Martin Data thru 4/6/12.zip". I know that later would require some kind of code to look at the "Sales Date" table and the field "Date" inside the table, but to be quite honest, can't fiqure it out. I've tried to just insert current "zipped" date with the following code with no luck:

        SMData= "C:\Users\Steve\Desktop\Steve Martin Data thru"+" "+date()+".zip"

        Here's the current code that zips the Sales Data table and places it on "Steve's" desktop:

        DIM Global SMData as c
        SMData= "C:\Users\Steve\Desktop\Steve Martin Data.zip"
        table.zip("tbl_sales data",SMData,"CDX")
        Last edited by jbk; 04-08-2012, 11:32 AM.

        Comment


          #5
          Re: Zip File Name Help

          Thanks Ira...

          Comment


            #6
            Re: Zip File Name Help

            SMData= "C:\Users\Steve\Desktop\Steve Martin Data thru "+dtoc(date(),"6-")+".zip"

            You said in your first post you wanted to use the table date of last sales call, not the current date.
            There can be only one.

            Comment


              #7
              Re: Zip File Name Help

              Thanks Stan, yes I know I stated that I want to use date of the last sales call, but figured it might be easier just to use date of when table was zipped. I'm still trying to figure out how to get the data from the "Sales Data" table for the last sales_man so that it can replaced "Steve Martin" in C:\Users\Steve\Desktop\Steve Martin Data thru code and "date" from "Sales Date table so it can replace "dtoc(date(),"6-)"

              Just don't know how to reference these to fields, so as to get the proper values.

              Thanks again... JON

              Comment


                #8
                Re: Zip File Name Help

                You'll have to provide a lot more information, preferably a sample in which we can see the context in which the zip is being generated.
                There can be only one.

                Comment


                  #9
                  Re: Zip File Name Help

                  Okay Stan, here's an example database. What I would ULTIMATELY like to accomplish is, stated in code for the "zip database" button (variables: SMName & SCLDate). Again, right now, I have to change for each salesman computer the line of code: C:\Users\Steve\Desktop\Steve Martin Sales Data thru " +dtoc(date(),"6-") updating the location of where the zip file is to be placed (C:\Users\Steve\Desktop) and the name (ie Steve Martin > Billy Martin) of salesman. If I could have the variable "SMName" insert the name from the table "sales data" and insert the variable "SCLDate" insert the most recent sales call date into the one line of code, that would be awesome.

                  Thanks for your patience Stan... JON
                  Attached Files

                  Comment


                    #10
                    Re: Zip File Name Help

                    Code:
                    DIM SMName as c
                    DIM SCLDate as d
                    DIM SMData as c
                    SMName = tablemax("tbl_sales data",".t.","salesman")
                    SCLDate = tablemax("tbl_sales data",".t.","date")
                    SMData = "C:\Users"+chr(92)+word(SMName,1)+chr(92)+"Desktop"+chr(92)+alltrim(SMName)+" Sales Data thru " +dtoc(SCLDate,"6-") +".zip"
                    table.zip("tbl_sales data",SMData,"CDX")
                    
                    '<<< Confirmation of File being Zipped. >>>
                    
                    DIM SHARED  Zip_result as N
                    DIM SHARED  Zip_OK_Button as L 
                    Zip_OK_Button = .F.
                    
                    title_var = "Attention"
                    message_text_var = <<%text%
                    Sales database has been successfully zipped.
                    %text%
                    Zip_result=ui_msg_box(title_var,message_text_var,UI_OK+ UI_FIRST_BUTTON_DEFAULT+ UI_INFORMATION_SYMBOL)
                    'Test to see which button on the message box was pressed....
                    SELECT
                    	CASE Zip_result = UI_OK_SELECTED
                    		Zip_OK_Button= .t.
                    END SELECT
                    
                    END
                    There can be only one.

                    Comment


                      #11
                      Re: Zip File Name Help

                      Thank you Stan... JON

                      Comment


                        #12
                        Re: Zip File Name Help

                        Do you understand what that does?
                        There can be only one.

                        Comment


                          #13
                          Re: Zip File Name Help

                          Stan, I'd be lying if I said yes...

                          Comment


                            #14
                            Re: Zip File Name Help

                            SCLDate = tablemax("tbl_sales data",".t.","date")
                            tablemax() is a function that takes a tablename, filter, and field name to return

                            Once you have the date and the salesman in variables,
                            SMData = "C:\Users"+chr(92)+word(SMName,1)+chr(92)+"Desktop"+chr(92)+alltrim(SMName)+" Sales Data thru " +dtoc(SCLDate,"6-") +".zip"

                            The parts in blue are literal text.
                            The parts in green are Alpha functions.
                            Last edited by Al Buchholz; 04-09-2012, 11:20 PM. Reason: .t. should be blue not red.
                            There can be only one.

                            Comment


                              #15
                              Re: Zip File Name Help

                              Stan

                              Great idea to use the color coding..

                              Too bad we can't use that in the code editor.... hmmmm
                              Al Buchholz
                              Bookwood Systems, LTD
                              Weekly QReportBuilder Webinars Thursday 1 pm CST

                              Occam's Razor - KISS
                              Normalize till it hurts - De-normalize till it works.
                              Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                              When we triage a problem it is much easier to read sample systems than to read a mind.
                              "Make it as simple as possible, but not simpler."
                              Albert Einstein

                              http://www.iadn.com/images/media/iadn_member.png

                              Comment

                              Working...
                              X