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

1 Form containing more than 1 set

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

    1 Form containing more than 1 set

    Hello,

    The question that follows is a development strategy question, not a specific problem. In ACCESS we commonly develop complex forms by using multiple queries in one form or embedding many levels of subforms in the same form.

    With Alpha 5 one can only use one set per form. There must be an additional strategy that allows more complex content to be added to one form such that the form works with more data than one set.

    Can one use a query based upon data other than the set imbedded in the form to create more complex data processing or add more data to the form?

    Has anyone encountered this limitation and found another method to solve this problem?

    Thank you for you assistance,
    Compee

    #2
    Re: 1 Form containing more than 1 set

    Are you thinking of data from different tables that is not related in any way? Can you give an example of how you used this in Access?

    Comment


      #3
      Re: 1 Form containing more than 1 set

      Gary, how about this for example:

      Display the names of all my customers who live in Pittsburgh, PA
      AND
      Display the names of all my vendors who live in Pittsburgh, PA
      AND
      Display the names of all my employees who live in Pittsburgh, PA

      using tables MyCustomers.dbf, MyVendors.dbf, MyEmployees.dbf with the following structures

      CustomerId
      CustomerName
      CustomerCity

      VendorId
      VendorName
      VendorCity

      EmployeeId
      EmployeeName
      EmployeeCity.

      The results of each query should be displayed on a form with three browses: one for customers, one for vendors, one for employees.

      How would you define the set to accomplish this?

      There is no need for a set using Microsoft Access, but a workaround is required with Alpha Five.

      As it turns out this capability is fairly important, if you have any hope of including a "dashboard" in your application -- with the need to display summarized information from many different tables.

      Bob McGaffic
      Pittsburgh, PA

      Comment


        #4
        Re: 1 Form containing more than 1 set

        Bob,
        In your example all data are related.
        If I wanted to have three browses (one for each table), I would create another table "MyCity" with a field "city" and then create a set based on it (MyCity) with the three tables you mention as child tables.
        Moving from record to record in MyCity will then show the related child records.
        The form would have a field Mycity->City and three browses, one for each table you mention.
        The links are:
        - MyCity->City to MyCustomers->CustomerCity
        - MyCity->City to MyVendors->VendorCity
        - MyCity->City to MyEmployees->EmployeeCity

        Comment


          #5
          Re: 1 Form containing more than 1 set

          Bob,
          a workaround is required
          hmmmm....well, lets see...I do not see the alternatives as a work around.....but I also do not see how it could be any easier with Access.

          You can use Alpha forms which are based on tables and sets which, for the most part, enables much faster development especially for those who do not wish to learn a programming language.

          OR learn a little bit of xdialog(or none at all using the xdialog genies) to create the unbound "forms" or "browses" that seem to be what is wanted. Xdialogs can even be embedded on forms now....I just used it in fact just for the purpose of having a checkbox list that is from an unrelated table.....see attached....the one with several checkbox "browses" is completely xdialog...the other has the embedded checkbox listbox xdialog on a form--lower right hand part.

          Bob I know you don't like just pictures of things created, but each project is unique (or confidential)--they are sort of "proof of concept" really is all---but much of what I have produced is based upon genie code (with sometimes slight, sometimes major modifications).

          So how is it harder to do this than with Access? I am really curious as you have mentioned this quite often---does access have genies that basically write the code for you to create these unbound forms/browses? And, if so, are the Access genies easier somehow to use than the Alpha genies?






          But getting back to the thread topic.

          Compee,
          Once what you want is explained and is understood, then a method can most likely be suggested....once you try to accomplish it and run into problems then ask here regarding them.
          Last edited by MikeC; 05-11-2010, 11:44 PM.
          Mike
          __________________________________________
          It is only when we forget all our learning that we begin to know.
          It's not what you look at that matters, it's what you see.
          Henry David Thoreau
          __________________________________________



          Comment


            #6
            Re: 1 Form containing more than 1 set

            Thank you MikeC. That was exactly the information I needed. I now have an understanding of the basic strategy to pursue.

            Compee

            Comment


              #7
              Re: 1 Form containing more than 1 set

              Gary,

              Creating a new table called MyCity is exactly the sort of workaround I am trying to avoid.

              Having to create and populating tables just to handle simple browses or queries is generally not a good strategy. Access does not require such a workaround.

              What if my browses looked like this: On a single Alpha five form
              display three browses as follows:

              All my vendors located in Pittsburgh, PA
              All my customers located in Philadelphia, PA
              All by employees located in Erie, PA

              Sorry, my orginial example was unrealistically simple.

              I've attached something that I whipped up in three minutes using MS Access shown in the screen print below.

              Bob McGaffic
              Pittsburgh, PA
              Last edited by rmcgaffic; 05-12-2010, 07:45 PM.

              Comment


                #8
                Re: 1 Form containing more than 1 set

                xdialogs populated via each table--believe it will do this from the genie using the option to populate from a table, but using straight-forward, basic xBasic it would be similar to:
                Code:
                table.external_record_content_get("Vendor Table", "Vendor Name", "", "City=\"Pittsburgh\"")
                table.external_record_content_get("Customer Table", "Customer Name", "",  "City=\"Philadelphia\"")
                table.external_record_content_get("Employee Table", "Employee Name", "",  "City=\"Erie\"")
                Substituting in the appropriate table and field names. Each xdialog would then have the records corresponding to each "unbound" table wanted.

                And why not use sets as you seem determined to have everyone try and seem also to feel that not being able to use them is a shortfall of some kind??.....well, this is not Access. Tables and sets in Alpha are not to be used for such things (normally not but can be with "work-arounds"--there's that nasty word again...but somehow I love how almost anything wanted can be done in Alpha even though it may not have been initially designed to do it!!).....xdialogs can and are used to add data from unrelated tables without utilizing work-arounds.
                Mike
                __________________________________________
                It is only when we forget all our learning that we begin to know.
                It's not what you look at that matters, it's what you see.
                Henry David Thoreau
                __________________________________________



                Comment


                  #9
                  Re: 1 Form containing more than 1 set

                  Bob,

                  Originally posted by rmcgaffic View Post

                  Creating a new table called MyCity is exactly the sort of workaround I am trying to avoid.
                  How confusing will it be to the user to ever figure out how to initiate a search if you go some other way?

                  Isn't the idea to make an application easy to use? This means the developer may need to do some more work.

                  Is your revised example a real situation?
                  If so, what is so hard about opening three forms? How do you set the filters for each of the three browses to get a different city in Access?

                  Comment


                    #10
                    Re: 1 Form containing more than 1 set

                    Another possibility is the ablity to embed the grid component in an xdialog( all done via a genie).
                    The grid is an elegant way to display and allow user interaction with data fields.

                    Comment


                      #11
                      Re: 1 Form containing more than 1 set

                      Mike,

                      One of the challenges of business information is getting the "Big Picture". Many companies have developed dashboards which allow them to see on one screen information from multiple sources: such as top ten customers, change in employee absenteeism, vendors with the greatest incidence of late deliveries.

                      So using separate forms for this information is not desirable.

                      In thirty seconds I was able to limit my list of employees to only those whose first name was "Robert" in Microsoft Access.

                      Yes, I understand that A5 is not Access, but I am very much interested in doing things as simply and cleanly as possible.

                      Just to make sure I understand what you are proposing:

                      1. Place a SuperControl on the desktop form
                      2. From the popup dialog box, select Embedded XDialog
                      3. The embedded dialog box pops up, and "Place dialog content here..." is indicated.

                      Perhaps, I'm just dense, but is this all the genie does, or how can I get it to generate the code for me?

                      You noted
                      Code:
                      believe it will do this from the genie 
                      using the option to populate from a table,
                      I must be missing something because all that I see is what is in the second screenprint. Where is the option to populate from a table that you mentioned?

                      Or is the idea to use action scripting to generate the code and them cut and paste it back in to this dialog box.

                      Wouldn't a really neat design have been to allow you to jump to action scripting, convert the action script to XBasic, and then drop the XBasic code into the genie dialog.

                      Again, I'm looking for the easiest way of doing this. The beauty of what I demonstrated with Access was that I did not write a single line of code.

                      Bob McGaffic
                      Pittsburgh, PA

                      Comment


                        #12
                        Re: 1 Form containing more than 1 set

                        MikeC,

                        This type of "problem" is really easy to handle in Access since "browses" on Access forms are not locked into the table or set the form is based on.

                        An Access sub-form (or browse) can be based on any table in the database. In order to get it to sync to the main form you do need a common piece of data between the main form and the sub-form. The sub-form is usually based on a query - again any table in the database - and in that query you can enter "criteria" for selecting specific records. That criteria usually refers back to data on the main form - thus creating the link and filtering the sub-form.

                        I find in Alpha that you have to be really careful when designing - not a bad thing - but...

                        Just recently I wanted to show daily Member Scans on a Membership form. I'd not allowed for that in the design. It wasn't a big deal - I have to add the Scans table to the set.

                        In Access I would not have had to change the base set to easily get that information on the form.

                        Thought I'd lay it out since you asked.

                        David

                        Comment


                          #13
                          Re: 1 Form containing more than 1 set

                          David,
                          Originally posted by Davidk View Post
                          In order to get it to sync to the main form you do need a common piece of data between the main form and the sub-form.
                          This is what happens in Alpha when you create a set.

                          Comment


                            #14
                            Re: 1 Form containing more than 1 set

                            Yes... and it's not a really big deal... but the table must be part of the set. In Access it is not required. You could have twenty sub-forms in an Access form coming from 20 tables but those tables are not part of the main form's query.

                            It's just how it's done differently... that's all.

                            Comment


                              #15
                              Re: 1 Form containing more than 1 set

                              Thanks David,
                              I think I understand a bit better how Access works differently.....and the ease of it would be handy...and even wanted....if the trade-off that would happen did not--that is with Alpha's sets, the data is Bound and that can aid a developer many times. And the fact that with xdialog (and the ability to use it on a form) you can have unrelated (unbound) data brings Alpha's ability to more than overshadow Access's abilities. To do what Access can but also more! A few extra steps to have a more powerful RAD tool....a no brainer for me....but then I was never one to have to have it easy, just a need to have it do what I want, when I want it.

                              Bob,
                              You are correct in that Alpha could for sure make it easier to have the code inserted in the embedded xdialog. As it is you have to first create your xdialog (easy with genie)....then actually have to take it apart a bit in order to insert the correct parts of it into the embedded xdialog code (not possible with genie). The last part should be made easier....but is not that difficult when following the instructions on the embedded xdialog.

                              Look, last fall was the first time I had EVER used xdialog (had to for certain projects). Using the genie....then reusing what I, or others, had created to expand upon was (is) not that difficult. Let the genie guide you, follow the instructions. After a few times I bet you will be able to create these embedded xdialogs very fast and the extra steps will not even be considered a burden to do.

                              People here (even developers) have many times said that it is an entirely different language than xbasic....and that it was difficult to learn. I have found it to be mostly straight-forward as was xbasic, but for sure is much "pickier" than xbasic....but at least when you do something wrong with xdialog you will know right away that it is wrong!!---it simply blows up!! :D I found the most difficult parts are the lack of formatting available (now that is an issue we have for sure covered in the past and you know I agree with you on that one!!!).

                              :) Wow Bob, you certainly do get me going on and on about things!! Guess you make me want to spend my 2 cents more than I do with other issues I run across!
                              Nice to have the pros and cons of various matter discussed though I feel.

                              Take care and hope I didn't ruffle/rumple your feathers too much here!
                              Mike
                              __________________________________________
                              It is only when we forget all our learning that we begin to know.
                              It's not what you look at that matters, it's what you see.
                              Henry David Thoreau
                              __________________________________________



                              Comment

                              Working...
                              X