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

Can't see child records

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

    Can't see child records

    I am using A5v10.5. I have a vendor table (parent) and a vendorcontacts table (child) with vendorname as the primary key in both tables and the set configured as one-to-many. The vendor table currently has 278 records and the vendorcontacts table has 355 records. There are multiple contacts for some of the vendors, thus the one-to-many relationship. The vendor table was created and the data entered prior to creating the vendorcontacts table. Data was imported from an Excel spreadsheet into the vendorcontacts table. My problem now is how to see the appropriate vendorcontacts for each of the vendors in the vendor table. How do I get the two tables to associate on the vendorname key so that for each vendor I can see the matching vendorcontacts? Also, could I create a form with a embedded browse table that would display the proper parent-child relationship as well as allow new vendor contacts to be entered and correctly associated with that vendor?

    Thanks,
    gitpicker

    #2
    Re: Can't see child records

    Native Alpha Five tables?

    If so, you can create a NEW set. Make Vendor table the parent and link one-to-many to the vendorContacts table. Save the set definition. Right click the new set name from the control panel, and choose open default form. This will get you going. The user guide discussion of sets will help you more. If you can't find it let us know.

    Comment


      #3
      Re: Can't see child records

      Thanks Tom. Yes, native A5(dbf)tables. I figured it out. The field values for the vendorname (key index) did not match for the first few records in the the vendor and vendorcontacts tables. I had to scroll down several records before I began to see any records show up in the child table in the embedded browser. Setting up the key index using the vendorname may be a bad idea. Do you think it would be advantageous to change the data structure of each table by adding an auto-increment vendor_id field? And if so, should that field type be character or numeric? If I am going to add the field, I guess now would be the time to do it considering I have not created any forms, browses, queries, or reports yet. What do you think? Also, what is the best way to add the initial vendor_id field values? I know I can use and Update Records operation to Assign Serial Values, and that should work for the vendor table since each vendor name is unique. How could that be done for the vendorcontacts table considering there are duplicate field values for the vendor name? Then if I create the vendor_id field and assign each record a unique vendor_id number, would I then be able to set the field rules for the vendor_id field to auto-increment and, as each new record is entered, it would increment beginning with the current highest value +1?

      thanks,
      gitpicker

      Comment


        #4
        Re: Can't see child records

        I prefer to use a vendor_id field, instead of the vendorname, to uniquely identify each record in the parent table. Names can change (weddings, divorces, mergers, breakups, etc.) Also, when you have enough records you're bound to run into two vendors with the same name. Or names that are so close your staff regularly mixes them up. Assign an id field value and then who cares if the name changes down the line.

        For native A5 tables I tend to use character data types for my primary key fields. I use numeric fields only if I plan to do arithmetic. So zip codes, phone numbers, and id fields are character based in my systems. It's a matter of personal preference I suppose.

        I don't know of an easy, accurate, way to assign foreign key values to the child table. Be grateful you don't have 10x more records.

        Comment


          #5
          Re: Can't see child records

          Once you've assigned the id values to the vendor table, create a set where the vendorcontacts links (1-1) to the vendor by name.

          Then look at a browse of that set to see if the data of the 2 tables lines up properly.

          Use an update operation on that set to assign the id value in the vendor table to the id value in the vendorcontacts table.

          Adjust remaining ids manually.
          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


            #6
            Re: Can't see child records

            Good point Al.

            Michael, notice that in the set Al describes your child table is the parent, ok?

            Comment


              #7
              Re: Can't see child records


              Per Tom:
              For native A5 tables I tend to use character data types for my primary key fields.
              I absolutely always use numeric fields as in 9,0(no decimals) since so many errors with the character primary fields in the early days and the side effect is that I do not have to worrp about filling with o's.

              Tom and I differ on very little really.
              Dave Mason
              [email protected]
              Skype is dave.mason46

              Comment


                #8
                Re: Can't see child records

                Thanks everyone for the help on this. Because of the good advice I was able to get the primary indexes created as vendor_id and, using Al's and Tom's suggestions got them synced up. Everything is working as it should. I deployed my development database and it is now my production database, but I am having a new weird issue with A5 backups. I posted a new thread for some help with that one.

                Comment


                  #9
                  Re: Can't see child records

                  Originally posted by DaveM View Post
                  I absolutely always use numeric fields as in 9,0(no decimals) since so many errors with the character primary fields in the early days and the side effect is that I do not have to worrp about filling with o's.

                  Tom and I differ on very little really.
                  The only problem with using numerical data for an auto increment is that 10 will be in the sort before 9.
                  Robin

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

                  Comment


                    #10
                    Re: Can't see child records

                    Originally posted by MoGrace View Post
                    The only problem with using numerical data for an auto increment is that 10 will be in the sort before 9.
                    Only in circumstances where the value is converted to a character and then sorted. Which can happen automagically.

                    ie a list object or a multiple field sort where the sort field is concatenated with numeric and character data..

                    A normal sort is fine.

                    But certainly something to watch and allow for .
                    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: Can't see child records

                      The only problem with using numerical data for an auto increment is that 10 will be in the sort before 9.
                      Actually just the opposite unless you pack a character field with O's at the front which is more setup work.
                      numeric gives
                      8
                      9
                      10
                      11
                      and so on.

                      I moved from character many years ago when the table did not wish to go past around 19000 and something with character. Since fixed(I think). Also much easier to move to sql with numeric primaries.
                      Dave Mason
                      [email protected]
                      Skype is dave.mason46

                      Comment


                        #12
                        Re: Can't see child records

                        As Al said - until you want to do something with that ID field that requires converting it to a string. I prefer character fields for ID's because you can add a "C" for customers and a "V" for vendors, etc. Otherwise you have tables filled with Id's that look pretty much the same.
                        Robin

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

                        Comment


                          #13
                          Re: Can't see child records

                          I have a different field for that. Clients rarely ever see the connection field. Why would they need to?
                          But, each to his own. It just seems if it is an incrementing field, adding a c or v would be counter productive?

                          My biggest alpha app has car dealerships, then departments, then salespeople(mostly)
                          a car deal(customer) has its own identifying number(incremented and never seen) and it also has another ID field that is what it becomes in the dealership.
                          Confusing? Not to me. Never show anybody the incremented numbers. They can see the deal number and stock number of a vehicle.

                          Do I have an extra field here or there? Maybe, but no index issues or search issues like I see others having here from time to time.

                          Adding my customers are labeled in a field as active, sold, pending, on order or dead deal. My inventory is labeled in a field as active, sold or pending
                          Vendors are further broken down as to type. Parts, labor, etc

                          Why would I need to put a character field just so I can add a V or C to it?

                          Now I have to get back to the website project for a couple hours. I have 3 more google maps and 2 jcalendars to set up.
                          Last edited by DaveM; 08-09-2014, 01:03 AM.
                          Dave Mason
                          [email protected]
                          Skype is dave.mason46

                          Comment


                            #14
                            Re: Can't see child records

                            I use character exclusively and pad it with "0", and add suffix of 3-4 characters giving the ID association to what the ID is for. Why?. Because these values go on reports and these reports are saved by these values and having a suffix that delineates what the ID value relates to is more robust. Otherwise if it is just that the customer is 12 and the invoice is 12 and the Project is 12, provides little delineation. And to have it said, during development, this distinction is invaluable! I have done it both ways and I have come to appreciate, and my customers and vendors appreciate the distinctions when a conversation regarding an order, or invoice, or comminication is being had.
                            Attached Files
                            Mike W
                            __________________________
                            "I rebel in at least small things to express to the world that I have not completely surrendered"

                            Comment

                            Working...
                            X