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

Transfer data in tables

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

    Transfer data in tables

    Hi

    There are probably very easy solutions for this, but being new i dont have a clue myself.
    I set up a quotation from and append the required products to it. If the customer accept the offer, I want to post the details into a invoice form straight away. I want to get the possibility to alter everything, but I shouldn't have to amend anything manualy.

    I presume the products from the quotation_items need to be transferred to the invoice_items and the quotation number needs to change in a invoice number, but obviously they need to be unique.

    Thanks for any help!

    Evert vink

    #2
    Re: Transfer data in tables

    If I'm not mistaken, what you want to do is the following:
    Have a "Quote" form that shows products and price.
    if the forms is accepted then form "Invoice" will show with the products on the "quote" form.

    Both forms should be able to modify.

    Solution in Pseudo code:
    Create table products
    Create table quote
    Create table quote_details
    Create table Invoice
    Create table invoice_details


    Show quote form with a new ID
    Add products to quote_details table using the quote form
    Accept Quote form
    Open Invoice form --Should create a new entry in the Invoice table with an ID
    Invoice form should have a button that will allow you to enter a quote Id and should be able to pull the records from the quote_details based on that Id.

    Hope this gives you an idea.
    The Mexican

    Comment


      #3
      Re: Transfer data in tables

      Evert,
      Or you could have one field that identifies it is a quote, or as an invoice, and not have to transfer anything. Just a thought.

      Mike W
      Mike W
      __________________________
      "I rebel in at least small things to express to the world that I have not completely surrendered"

      Comment


        #4
        Re: Transfer data in tables

        Hi,

        Thanks a lot for your considerations! Indeed, I created the following tables:

        Customers
        Products
        Quote_Items
        Quote_Header
        Invoice_Items
        Invoice_Header

        And the forms

        customers (to enter customer details)
        products (to enter product details)
        Quotation (to append a customer -in the header part- and to append products in the subform)
        Invoice (to append a customer -in the header part- and to append products in the subform)

        However I sometimes want to copy all the quotation information from the quotation form straight into the invoice form. So I thought about a button on the quotation form, enableling me to 'push' the information through to the invoice form. (May be somthing like posting the info?)

        I�m wondering if a code or genie is available for this requirement. Every hint is welcome!!

        Evert

        Comment


          #5
          Re: Transfer data in tables

          Hi Evert,
          Unless you have a need to save the original quote after converting it to an invoice, the same quote line items can be used in your invoice by setting referential integrity. All you need to do is get the next invoice number and change the quote id to that number and the line items will update. Then you can show the converted quote in a different form as an invoice. You might also want to have a flag that will differentiate between a quote and an invoice for filtering in reports.
          Robin

          Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

          Comment


            #6
            Re: Transfer data in tables

            What you're trying to do is exactly what we do daily... create workorders (Jobs) from quotes.

            A button press 'pulls' information from the quote form and places it in a new workorder.

            I've included a txt file that:
            - creates some temp variables and reads the quote info
            - creates a new record in our workorder system
            - places the temp variable information into the proper fields

            Note: disregard the password area (this just lets the system know who created the workorder)

            HTH,
            --Bob

            Comment


              #7
              Re: Transfer data in tables

              Hi Bob,

              Indeed, this is exactly what i was looking after. Thanks a lot!!

              However, I'm a real beginner so these scrips contain some difficult stuff. I wonder if you could explain me something.

              I'm not in for a password, so actually I can erase that part anyway. I'm not to sure which part of the next bit I have to use to open my invoice form:

              tbl2 = table.open("labmat")
              indx = tbl2.index_primary_put("PASSDEX")
              tbl2.fetch_find(pword)
              fld = table.field_get("labmat->Empl_Name")
              gName = alltrim(fld.value_get())
              tbl2.close()

              I presume I have to change tbl2 = table.open("labmat") into tbl2 = table.open("invoice"), is that right??
              I'm wondering what the 'passdex' contains and if I just can erase it?
              Actually, do I need anything of tbl2??

              I also dont really no where this part point to

              line1 = Main:line1.value
              line2 = Main:line2.value
              line3 = Main:line3.value
              line4 = Main:line4.value
              line5 = Main:line5.value

              If you could give me some explanations I would be very delighted!

              Thanks a lot

              Evert

              Comment


                #8
                Re: Transfer data in tables

                Evert,
                Bob's code is very specific, although well written, I have a tough time deciphering it to convert to what you describe. I am working on an example that I believe will hopefully be more understandable for you, and that you might more be able to convert to your scenerio. Pease be patient.

                Mike W
                Mike W
                __________________________
                "I rebel in at least small things to express to the world that I have not completely surrendered"

                Comment


                  #9
                  Re: Transfer data in tables

                  Hi Mike,

                  That is so great!
                  I'm really pleased you are taking the trouble to help me out of this. Maybe a can just explain you a bit better what I'm after:

                  I've got the tables:

                  Quote_Item:
                  - Quote_Number
                  - Product_Id
                  - Price
                  - Quantity
                  - Extension

                  Quote_Header:
                  - Quote_Number
                  - Customer_Id
                  - Date
                  - Sales_Tax
                  - Discount
                  - Expiration_Date

                  Invoice_Items
                  - Invoice_Number
                  - Product_Id
                  - Price
                  - Quantity
                  - Extension

                  Invoice_Header
                  - Invoice_Number
                  - Customer_Id
                  - Date
                  - Sales_Tax
                  - Discount

                  This tables are brought together in a quotation form (containing quotation items and quotation header) and in an invoice form (containing the invoice items and the invoice header)

                  I actually want a button on the quotation form, which post everything the quotation form contains straight onto an invoice form. However, I still want to be able to create an invoice without using the quotation form at all.

                  Once again if you could provide me anything near to this, I would be so delighted!

                  Thanks

                  Evert

                  Comment


                    #10
                    Re: Transfer data in tables

                    Evert,

                    I've re-done the sample to simplify it.

                    I have a button on my quote form called: Main (in sample file)

                    When pressed, it:

                    - Creates some temporary variables
                    - Stores quote information to these variables
                    - Opens an workorder form (invoice)
                    - Dumps the information from the variables into the proper fields
                    - Closes the quote form (since I've finished with it).

                    HTH,
                    --Bob

                    Comment


                      #11
                      Re: Transfer data in tables

                      Evert,
                      Between Bob's and the attached, I'm thinking you should be able to get what you need. The codes between Bob's and mine do about the same thing a little differently. The field names are different but the structure I believe are similar and you shoud be able to change mine for yours and get the pattern of things to add the other fields that you have that are not in my example

                      Good luck and don't hesitate to ask for help.

                      Mike W
                      Mike W
                      __________________________
                      "I rebel in at least small things to express to the world that I have not completely surrendered"

                      Comment


                        #12
                        Re: Transfer data in tables

                        Hi Mike, Bob,

                        This is really stunning!! You both helped me so much, I now only have to work out the the code. But Im really helped and would like to give some inteligence back so in the future hope to be able to help other people myself.

                        Regards,
                        Evert

                        Comment

                        Working...
                        X