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

Importing data an auto-increment field

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

    #31
    Re: Importing data an auto-increment field

    Christiano,

    Are they giving you an account number for these excel files and is each excel file associated with only one account?
    The header table like Ray gave could be helpful if there is an account/control field for each file.
    Dave Mason
    [email protected]
    Skype is dave.mason46

    Comment


      #32
      Re: Importing data an auto-increment field

      Originally posted by DaveM View Post
      Christiano,

      Are they giving you an account number for these excel files and is each excel file associated with only one account?
      The header table like Ray gave could be helpful if there is an account/control field for each file.


      Hi Dave,
      as I said the headquarters of this company does not want to give access to their database absolutely (I think it's because they want that the satellite offices they buy their software management) of 32 offices throughout Europe only 2 offices they use my software, the other 30 are considering buying the parent company's management software, also why only a fool like me could create an application from a simple Excel file.

      Another little problem that I'm encountering is that the field "invoice_number" (number field) that I use as a counter for creating invoices start from "0" instead of "1". In Italy the numbering for tax bills must start from 1 and not from 0.

      The tips I received in this post, were very useful and instructive and so thank you everybody.

      These are the tables that I have created from the Excel file that I received:

      Tbl_Temp_Orders (Template where I imported all fields from Excel file)

      Tbl_Temp_header (Template where I copy only two fields: ORDERID and date from the table Tbl_Temp_Orders)

      from this last table, then delete duplicate records (a_tbl. delete_dups ("str (ORDERID .7 .0)", ".T.") )

      I have created another table for the numbering of invoices and the order numbers: Tbl_Header_Invoice. This Table I use for doing the numbering of invoices and the data it receives from the table Tbl_Temp_Header only after that I delete the duplicate records. (see above)

      Always in Tbl_Invoice_Header table I have created an auto-increment numbering field, this is a field is used for number of invoices. Here, though, I have a problem because the auto-numbering starts from 0 and not 1 and this for the Italian tax legislation is no good.


      Then I copy the rest of data from the Tbl_Temp_Orders tables to the final table: Tbl_Invoice and also the field ORDERID

      Finally I created a SET with Tbl_invoice_Header and Tbl_Invoice that have a common field: OrderID


      Now I finish to prepare it and then try, hope it works
      Cristiano
      [email protected]

      Skype: cris-do

      Comment


        #33
        Re: Importing data an auto-increment field

        Hi,


        And I would like to apologize to everyone for my terrible English
        Cristiano
        [email protected]

        Skype: cris-do

        Comment


          #34
          Re: Importing data an auto-increment field

          Dave the way the code is written is universal, he can add to the able or append to a main table after the code has run (the way Cristiano described he does already, is preferable) either would work
          But seems a waste of time if Cristiano is not interested in the ready to run simple solution provided. As you know doesn't have to be more complicated
          We do this sort of thing all the time.

          Comment


            #35
            Re: Importing data an auto-increment field

            Cristiano this probably will work, difficult to maintain table size with constant deleting records for every single order
            Code:
            Tbl_Temp_Orders (Template where I imported all fields from Excel file) [FONT=Arial Black]this is all you need[/FONT]
            
            Tbl_Temp_header (Template where I copy only two fields: ORDERID and date from the table Tbl_Temp_Orders) [FONT=Arial Black]unnecessary[/FONT]
            
            from this last table, then delete duplicate records (a_tbl. delete_dups ("str (ORDERID .7 .0)", ".T.") ) [FONT=Arial Black]' IMO bad practice. I suggested just adding the new order number once.[/FONT]

            Comment


              #36
              Re: Importing data an auto-increment field

              Originally posted by DaveM View Post
              Christiano,

              Are they giving you an account number for these excel files and is each excel file associated with only one account?
              The header table like Ray gave could be helpful if there is an account/control field for each file.

              Hi Dave,
              The only file that we have in our hand is the Excel file.
              nothing but this wretched file with customer orders. I'm building a solution for printing invoices starting from a simple and banal Excel file. This is really frustrating.
              Cristiano
              [email protected]

              Skype: cris-do

              Comment


                #37
                Re: Importing data an auto-increment field

                Originally posted by Ray in Capetown View Post
                Cristiano this probably will work, difficult to maintain table size with constant deleting records for every single order
                Code:
                Tbl_Temp_Orders (Template where I imported all fields from Excel file) [FONT=Arial Black]this is all you need[/FONT]
                
                Tbl_Temp_header (Template where I copy only two fields: ORDERID and date from the table Tbl_Temp_Orders) [FONT=Arial Black]unnecessary[/FONT]
                
                from this last table, then delete duplicate records (a_tbl. delete_dups ("str (ORDERID .7 .0)", ".T.") ) [FONT=Arial Black]' IMO bad practice. I suggested just adding the new order number once.[/FONT]
                Ok, Ray,
                but I need a numeric field that is increased to do the numbering of invoices , how can do it if I don't create a Tbl_header_invoice table?
                Cristiano
                [email protected]

                Skype: cris-do

                Comment


                  #38
                  Re: Importing data an auto-increment field

                  To repeat one of Tom's questions
                  The next incrementing number created with each order number, is THAT going to be the invoice number? Or it is a sort of tracking number and an invoice number will be created later or when invoiced?
                  I created a database to work out the working example explained earlier.
                  Do you want a copy of that database to play with, may be easier than explaining? Or do you want a walk-through with examples

                  Comment


                    #39
                    Re: Importing data an auto-increment field

                    Originally posted by Ray in Capetown View Post
                    To repeat one of Tom's questions
                    The next incrementing number created with each order number, is THAT going to be the invoice number? Or it is a sort of tracking number and an invoice number will be created later or when invoiced?
                    I created a database to work out the working example explained earlier.
                    Do you want a copy of that database to play with, may be easier than explaining? Or do you want a walk-through with examples
                    Dear Ray,

                    i think was all clear The file Excel (as you see the Excel file) is for to PRINT the invoices, becaause there there are all the orders made by the customers in italy. I had to finish this part of job but I appreciate if you cangive me a real sample as i can check if my job is correct
                    Cristiano
                    [email protected]

                    Skype: cris-do

                    Comment


                      #40
                      Re: Importing data an auto-increment field

                      C,

                      Please review post #18 in this thread. These questions remain unanswered. If you are having trouble understanding the questions let us know. Perhaps we can clarify things for you. -- tom

                      Comment


                        #41
                        Re: Importing data an auto-increment field

                        Cristiano
                        your excel file in .RAR file does not download here
                        I made up something to work with.
                        If you send a .dbf that you create first (from the Excel) I will send you a basic working model ADB that you can add more excel files to and see how they create the header and collected orders table that you use in a set for invoicing. Can you do?

                        Comment


                          #42
                          Re: Importing data an auto-increment field

                          Originally posted by Ray in Capetown View Post
                          Cristiano
                          your excel file in .RAR file does not download here
                          I made up something to work with.
                          If you send a .dbf that you create first (from the Excel) I will send you a basic working model ADB that you can add more excel files to and see how they create the header and collected orders table that you use in a set for invoicing. Can you do?
                          Ok Ray, now I'm not at work , tonight i send to you the table from excel
                          Thank you
                          Cristiano
                          [email protected]

                          Skype: cris-do

                          Comment


                            #43
                            Re: Importing data an auto-increment field

                            On creation of a AI field in field rules, you can cause it to start with 1 by "Data Entry" then "default" choose simple and put a 1 in there. If character, precede with 0's for padding.
                            Last edited by DaveM; 01-12-2015, 12:52 PM.
                            Dave Mason
                            [email protected]
                            Skype is dave.mason46

                            Comment


                              #44
                              Re: Importing data an auto-increment field

                              Originally posted by Tom Cone Jr View Post
                              C,have told

                              Please review post #18 in this thread. These questions remain unanswered. If you are having trouble understanding the questions let us know. Perhaps we can clarify things for you. -- tom
                              .

                              I'm sorry Tom but Which are the questio remain unanswered ? I told that the excel is the only file tha I have and with that file i need to print invoices, and I agree with you (solution 3) regarding the creation on set based containing two: table, the fisrt with the invoice number and the Orderid and the second table with the same OrderId and with the detailed orders linked by the order id
                              Cristiano
                              [email protected]

                              Skype: cris-do

                              Comment


                                #45
                                Re: Importing data an auto-increment field

                                Originally posted by DaveM View Post
                                On creation of a AI field in field rules, you can cause it to start with 1 by "Data Entry" then "default" choose simple and put a 1 in there. If character, precede with 0's for padding.
                                Hi Dave,

                                I do it like you suggested, but when I tried to copy or append data from an Tbl_Temp_header table to the Tbl_header_Invoice the count of invoices start from 0. I'm sure I have wrong something but I don't know what
                                Cristiano
                                [email protected]

                                Skype: cris-do

                                Comment

                                Working...
                                X