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

Populating a record with default values - Record List-Combo Box?

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

    Populating a record with default values - Record List-Combo Box?

    I'm stuck again.

    This time I am trying to build a data-entry form for my invoice application. I have a Customer table with default values for each customer: address, tax jurisdiction, terms, etc., and an Invoice table including the same fields (and more). I want a way to pick a record from the Customer table and copy its fields into the corresponding fields in the Invoice table. I can then edit the default values to suit the needs of a specific invoice.

    I have two sticking points. First, I don't know the best use of controls to accomplish this. I've figured out that I want a Combo Box showing all the CustName fields from the Customer table (there aren't too many). But should I use a Record List-Combo Box, or a Record List-Edit Combo Box? And should I have the Combo Box be the data entry field for CustName on the Invoice form, or a button alongside the data entry field, or something else?

    Next, I can't figure out how to get the Combo Box to cause multiple fields to get copied. I'm guessing I need to include some Xbasic running off an event of the control like OnPush. But I don't know how to reference the Customer table record selected by the Combo Box, or if that is even possible.

    As always, I'm grateful for any help, and realize I'm asking pretty basic questions. All I need is to be pointed in the right direction. I've already made a lot of progress in learning Alpha Five.

    Thanks,

    -jimc

    #2
    Re: Populating a record with default values - Record List-Combo Box?

    Jim

    Open the AlphaSports sample database and review how it works.
    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


      #3
      Re: Populating a record with default values - Record List-Combo Box?

      Test

      Comment


        #4
        Re: Populating a record with default values - Record List-Combo Box?

        Originally posted by bob9145 View Post
        Test
        Yes it tested..
        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


          #5
          Re: Populating a record with default values - Record List-Combo Box?

          I finally got something working that does what I want.

          I spent a day studying the AlphaSports example, long enough to figure out that it didn't have anything that did what I wanted to do. It wasn't wasted time, as I learned a lot.

          I finally ended up with a button that ran some ActionScript that did what I needed, on the OnPush event. The script put up an XDialog to select the desired customer-file record, then read a bunch of data from the customer file into variables, then used it to populate the corresponding fields of an invoice-file record. A gotcha was that I needed to check for the user pressing Cancel in the XDialog and abort the script.

          Now each invoice has its own editable copy of the customer soldto and shipto data, that I can populate with default data with a couple of clicks. I did a similar thing with sales tax data, so that if a tax rate changes old invoices will use the old rate and new invoices the new rate.

          If somebody ends up finding this thread in the future, hopefully this information will prove useful. If there's a better way to do this, please share.

          Thank you.

          -jimc

          Comment


            #6
            Re: Populating a record with default values - Record List-Combo Box?

            Jim, have you discovered field rules yet? A table lookup field rule could display a customer list from the "lookup" customer table. User picks one and fields in the invoice header record get auto-filled. No need to write any special code. It's pre-built for you.

            Check the field rules for the customer_id field in the invoice_header table in AlphaSports. Accessible by right clicking the table name in the Alpha Five control panel.

            Comment


              #7
              Re: Populating a record with default values - Record List-Combo Box?

              Damn. It does just what I need.

              What got me was the fact that there was no indication on the Customer_id field that it did anything special when you picked it. Users shouldn't have to "just know" stuff to use the application. I found a lot of stuff in AlphaSports that was awkward or non-obvious -- one of the things I'm trying to do is figure out if that unfriendliness comes from Alpha Five or just the way AlphaSports is designed.

              So far my little test Invoice app is farther along than I'd expected, but I still have some pretty big hurdles to overcome. I don't need very many more 18-hour wild goose chases before I give up.

              -jimc

              Comment


                #8
                Re: Populating a record with default values - Record List-Combo Box?

                Jim, oops. Sounds like you didn't know about field rules after all. Maybe you jumped in and started building without looking around first?

                Permit me to make two suggestions for you:

                a) stop what you're doing and read the User's Guide; and

                b) if your wheels spin for an hour stop, search the message board for similar issues, and finally post a question if your search turns up empty.

                No reason for ANY 18 hour wild goose chases.

                PS - The user guide is also available in the documentation. Help // Open Documentation // Table of Contents tab // Tutorials // Alpha Five User Guide (Desktop)
                Last edited by Tom Cone Jr; 02-01-2013, 08:15 AM.

                Comment


                  #9
                  Re: Populating a record with default values - Record List-Combo Box?

                  I've been busy reading, and working on my invoice app, which is much further along than I ever thought I'd get. Thanks for everyone's help.

                  I've run into a couple of things that have me baffled. I don't think they warrant threads of their own, so I'll ask here...

                  1) My invoice form disappeared yesterday, about the time I added two new fields to the Invoice-header table. Does changing a table layout cause forms that reference it to be deleted? If so, I don't think that's very user-friendly behavior. [I searched the message board when it happened and found out how to restore the deleted form by creating a new one with the same name and right-clicking on it to access A5's automatic form backups.]

                  2) I'm building a complicated report that has several conditional subreports. Each section generates zero or more numbered line items. I want to have a variable somewhere that keeps track of the sequential line number, but I can't figure out where to put code to increment it. Message board searches suggest that it may not be possible. Any suggestions?

                  As always, thanks for taking the time to help a beginner. I can figure things out pretty well, but when I get lost, a sentence or two pointing me in the right direction is greatly appreciated!

                  -jimc

                  Comment


                    #10
                    Re: Populating a record with default values - Record List-Combo Box?

                    Originally posted by exeye View Post

                    1) My invoice form disappeared yesterday, about the time I added two new fields to the Invoice-header table. Does changing a table layout cause forms that reference it to be deleted?
                    Jim

                    How did you add fields to the table?

                    Via the form to edit the structure or xbasic add to table? Or another way?

                    Glad you recovered the form. That was a handy addition from Alpha.

                    Sometimes the lights go out unexpectedly. ( Not necessarily a computer issue...) (ie Super Bowl 47)
                    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


                      #11
                      Re: Populating a record with default values - Record List-Combo Box?

                      Originally posted by Al Buchholz View Post
                      How did you add fields to the table?

                      Via the form to edit the structure or xbasic add to table? Or another way?
                      I right-clicked on the table and picked Edit Structure. I added two fields to the end of the record. I'm assuming if I added one in the middle it would slide my data over to make room, but I'm very gunshy at this point and am not looking to push my luck...

                      Originally posted by Al Buchholz View Post
                      Sometimes the lights go out unexpectedly. ( Not necessarily a computer issue...)
                      In my case it has nothing to do with electricity... :)

                      -jimc

                      Comment


                        #12
                        Re: Populating a record with default values - Record List-Combo Box?

                        Originally posted by exeye View Post
                        I right-clicked on the table and picked Edit Structure. I added two fields to the end of the record. I'm assuming if I added one in the middle it would slide my data over to make room, but I'm very gunshy at this point and am not looking to push my luck...
                        OK Thanks for the info. Always have a copy before making a structure change.

                        Originally posted by exeye View Post
                        In my case it has nothing to do with electricity... :)

                        -jimc
                        My reference to the unexpected power outage at Super Bowl 47 tonight.
                        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