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

design - three level subbrowse

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

    design - three level subbrowse

    I am not sure how to structure the set(s) and forms for the following. In other programs, I would create nested subforms/browses to accomplish this. In Alpha, I can't tell if I would create one or two sets, and how to show that last tier properly.

    I have three tables:

    DocSet (Set_ID)
    DocVariation (Set_ID, Variation_ID - related to above on Set_ID
    DocFilename (Set_ID, Variation_ID, Filename - related to above on Set_ID + Variation_ID)

    A view of the data might look like this:

    DOC SET A
    - VARIATION A
    -- FILENAME: 123.DOC
    -- FILENAME: 456.DOC
    - VARIATION B
    -- FILENAME: 123.DOC
    -- FILENAME: ABC.DOC
    DOC SET B
    etc.

    This indicates that Document Set A is comprised of files 123 & 456 if Variation A is selected, and 123 & ABC if variation B is selected.

    I am trying to create a form where the user can browse to a Doc Set and view/edit the available Variations. And, upon selecting a Variation, view/edit the related Filenames. Basically, a three tier related browse. I can make this work fine for a two-layer situation, not a three.

    The attached graphic shows how it might look on screen. I left in the related fields to show relationship.
    Steve Wood
    See my profile on IADN


    #2
    Steve,

    It looks like you have a many to many relationship between DocVariation and DocFilename. I usually add an intermediary table so you would have:

    Code:
    DocSet
          ====DocVariation
                      =====DocVar_DocFile
                                    ------DocFilename
    DocSet (Set_ID)
    DocVariation (Set_ID, Variation_ID - related to above on Set_ID) .. 1-N
    DocVar_DocFile(Set_IDv, Variation_IDv, Set_IDf, Variation_IDf - related to above on Set_IDv + Variation_IDv=Set_ID + Variation_ID)..1-N
    DocFilename (Set_ID, Variation_ID, Filename - related to above on Set_ID + Variation_ID=Set_IDf + Variation_ID)..1-1

    While looking at this I realised that if DocVariation is only linked to one DocSet (one - many) then unless you have another reason to do so you shouldn't need the compound key in the other tables. This would simplify to:

    DocSet (Set_ID)
    DocVariation (Set_ID, Variation_ID - related to above on Set_ID)..1-N
    DocVar_DocFile(Variation_ID, FileName_ID - related to above on Variation_ID)..1-N
    DocFilename (FileName_ID, Filename - related to above on FileName_ID)..1-1

    You can still have the Set_ID in the DocVar_DocFile table for info but you wouldn't need it for links.

    The second browse would be based on the DocVar_DocFile table and have the fields of the DocFilename table included as well since it is a 1-1 relationship. Neither the Set_ID or the Variation_ID is needed in the DocFilename Table since that data will be shown in the browse from the DocVar_DocFile table.
    Tim Kiebert
    Eagle Creek Citrus
    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

    Comment


      #3
      Tim,

      The second browse would be based on the DocVar_DocFile table and have the fields of the DocFilename table included as well since it is a 1-1 relationship.
      I'm having trouble seeing why these need to be two tables? Since the link is one to one, why not use a single table ?

      -- tom

      Comment


        #4
        Tom,

        The two tables are needed so that 1 DocFilename record can belong to multiple DocVariation records as in Steve's sample data
        DOC SET A
        - VARIATION A
        -- FILENAME: 123.DOC
        -- FILENAME: 456.DOC
        - VARIATION B
        -- FILENAME: 123.DOC
        -- FILENAME: ABC.DOC
        DOC SET B
        The filename 123.doc belongs to both variation A and B. Without the intermediate table you would need to duplicate the record and the only difference would be the value of the linking field(Variation_ID) The DocVar_DocFile table is only the mechanism to all multiple linking values to be assigned to one Filename record.
        DOC SET A
        - VARIATION A
        --Variation A, Filename1--- FILENAME1: 123.DOC
        --Variation A, Filename2--- FILENAME2: 456.DOC
        - VARIATION B
        --Variation B, Filename1-- FILENAME1: 123.DOC
        --Variation B, Filename3-- FILENAME3: ABC.DOC
        DOC SET B
        - VARIATION C
        --Variation C, Filename1--- FILENAME1: 123.DOC
        --Variation C, Filename2--- FILENAME2: 456.DOC
        Another benifit is that you can reverse the set using DocFilename as the parent 1-N to DocVar_DocFile 1-1 to DocVariation and find all the Variations where a particular Document is used.

        This is the way I have learned to handle many-many relationships. If there is an easier or better way, or just different I am all ears. :)
        Tim Kiebert
        Eagle Creek Citrus
        A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

        Comment


          #5
          Thanks, your discussion pointed me in the right direction. I put my thinking cap back on and restructured the tables. Now I have the following:

          Table 1: Doc_Set - w/fields Doc_Type, Doc_State (previously 'variation') and Set_ID (unique, autoincrement)

          Table 2: Doc_Set_Files - w/fields Set_ID, Filename and Set_ID.

          Doc_Set to Doc_Set_Files is 1-N on Set_ID.

          That structure alone provides a list of Filenames assigned to any Document_Set, which is what I was trying to achieve. Where I went wrong was thinking there was a middle layer (Variations in my initial example) at all. A Doc_Set is a combnation of a document type and the state involved. There was no reason to break out the State as a child to the Doc_Set, it should be part of it.

          Purely for viewing purpouses, I also created Sets with primary tables Doc_Type and Doc_State so I can view by Type or State. Attached graphic is an example.

          Doc_Type to Doc_Set 1-N on Type_ID
          Doc_Set to Doc_Set_Files 1-N on Set_ID
          Steve Wood
          See my profile on IADN

          Comment


            #6
            Tim, thanks. In the initial post I missed the fact that the same grandchild record was linked to two different children. -- tom

            Comment


              #7
              Re: design - three level subbrowse

              I'm interested in how one might set up a many to many "set"
              Does Alpha handle this? Or does one need 2 sets?

              Comment

              Working...
              X