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

Trouble finding a way to mark grandchild records

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

    Trouble finding a way to mark grandchild records

    I�m having trouble finding a way to mark grandchild records.

    I have a set with the following structure:

    The Parent table has a 1-to-many relationship with the CHILD table (Called Childtable1). Childtable1 is also linked to its own child table in a 1-to-1 relationship. That table is called Childtable2.

    I�ve built a form that shows fields from the Parent table. I�ve added an embedded browse to show the fields from Childtable1. I�ve added a second embedded browse to show the Childtable2 records.

    If I run a search and use Records > Delete/Mark/Unmark Selected Records�, the Parent records, Childtable1 records, and Childtable2 records all appear marked when viewed by my form. However, when I go look in Childtable1 and Childtable2, Childtable1 records are marked, but Childtable2 records are NOT marked.

    Is there a way to mark the Childtable2 records?

    #2
    Re: Trouble finding a way to mark grandchild records

    HI Ray,
    Your thread got a bit buried. If you still need help with this let me know....when a set is used a mark operation seems to just look or see the parent table. If just the child table is used in the operation it works as expected. Converting to xbasic is fairly straightforward to modify what you want as well. Not knowing the context (IOW having a sample) it would be hard for me to guess at the exact method to use to achieve your goals.

    basically in xbasic--
    Code:
    dim a_tbl as p
    a_tbl = table.open("childTable2 table")
    
    a_tbl.mark_range("ChildTable2_Filter")
    
    a_tbl.close()
    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


      #3
      Re: Trouble finding a way to mark grandchild records

      I’ve added a second embedded browse to show the Childtable2 records.
      ??
      Isn't childtable2 linked to childtable1 on 1-1?
      And if so, why a browse?
      the Parent records, Childtable1 records, and Childtable2 records all appear marked when viewed by my form
      How do you know that? The mark you see on the form relates to the topparent.
      Is there a way to mark the Childtable2 records?
      Yes, but first:
      It seems that you want to mark all tables not just childtable2. Very reasonable expectation on your part. You want when deleting these records to have them marked (or just simply mark them), but childtable2 does not get marked. The reason alpha did not mark childtable2 is because in a 1-to-1 it is viewed as part of it's parent table (childtable1), which I consider a bug in this scenario.
      But before we make it a full fledged bug, which I am sure it is, zip a sample of your db if you can.

      Comment


        #4
        Re: Trouble finding a way to mark grandchild records

        is there a reason it wouldn't just be:

        dim t as p
        t = table.get("childtable2")
        t.mark()

        put it on a form button or browse on double click event?
        Mike W
        __________________________
        "I rebel in at least small things to express to the world that I have not completely surrendered"

        Comment


          #5
          Re: Trouble finding a way to mark grandchild records

          Mike,
          Using table.get() may work as well. But from Ray's post it also seemed to imply that more than one record was being marked as a result of a query---if I guessed correctly, then .mark_range() would have to be used that can use a filter or a loop created. Just how I took it to be...doesn't make it necessarily so!! :)
          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: Trouble finding a way to mark grandchild records

            Mike,
            I’ve built a form that shows fields from the Parent table. I’ve added an embedded browse to show the fields from Childtable1. I’ve added a second embedded browse to show the Childtable2 records.
            The Parent table has a 1-to-many relationship with the CHILD table (Called Childtable1). Childtable1 is also linked to its own child table in a 1-to-1 relationship. That table is called Childtable2.
            Given this, I do not believe there will ever be more than a single grandchild record showing since it is 1:1 with Child table..... right? I believe that was Gabriel's point.
            Mike W
            __________________________
            "I rebel in at least small things to express to the world that I have not completely surrendered"

            Comment


              #7
              Re: Trouble finding a way to mark grandchild records

              Given this, I do not believe there will ever be more than a single grandchild record showing since it is 1:1 with Child table..... right? I believe that was Gabriel's point.
              I agree....all a matter of perspective though and most likely you are correct.

              I took the scenario to be that a query was run for the parent records and that the grandchildren of these parents would then be marked that met a filter of some kind....which means that more than one grandchild record could be marked regardless of what was showing. Incredible how things can be so totally different from a small perspective change.

              -----Ray would have to tell us to be sure.
              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


                #8
                Re: Trouble finding a way to mark grandchild records

                I think Ray's form design is a little unusual in that he placed a browse for the grandchild when all he could get is only one record from that table since the link is 1-to-1. He might have a reason for that, but the design is not critical to his question.

                He marks the "record", whether he marks "it" as he deletes it or just marks it, again that's irrelevant.

                What is relevant is the fact when he marks the "record", the parent gets marked, the child gets marked, but the grandchild does not get marked. Obviously that could create a serious problem.

                I haven't tested this, but I believe it to be the case as alpha treats the grandchild here as part of the child and only marks the child and thus I see this as a bug.
                Last edited by G Gabriel; 10-28-2008, 12:09 PM.

                Comment


                  #9
                  Re: Trouble finding a way to mark grandchild records

                  I thought about this today as well and when I finally woke up I realized what G and Mike were attempting to say! :D :o

                  So it would be nice to have Alpha automatically mark the grandchild, especially if the "mark" is being used for a delete operation --otherwise an orphaned record--unless referential integrity was in force.

                  So when marking a child record that has a one-to-one linkage, one also, apparently, has to independently mark the associated grandchild record.

                  Could this be used in some way I wonder, in that if it did this automatically, would this then prevent a possible use of this scenario?? IOW, could there be a reason to mark the child and have the possibility of not having the grandchild marked? Such as maybe a query that brings up filtered child records, marks them, and then another query/filter that would further limit the records by limiting the grandchildren due to the filter......???? Just supposing......
                  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


                    #10
                    Re: Trouble finding a way to mark grandchild records

                    I agree with Gabiel. This is a bug!
                    This scenerio, I believe, would fall under what Dr. Wayne writes about when he says to move notes (memo field) to their own table and link them 1:1 to associated table.

                    I am going to post this as a separate thread to get more viewers to test this and get more opinions as to bug or not.
                    http://msgboard.alphasoftware.com/al...ad.php?t=76246
                    Last edited by Mike Wilson; 10-30-2008, 10:47 AM.
                    Mike W
                    __________________________
                    "I rebel in at least small things to express to the world that I have not completely surrendered"

                    Comment


                      #11
                      Re: Trouble finding a way to mark grandchild records

                      Mike:
                      I am reluctant to call it a bug as of yet since if you have integrity turned on, the grandchild will be marked. I prefer to see what Ray's set looks like, but what puzzles me, if he has the integrity turned off, how does the child get marked? Not a difficult question to answer: if he has the integrity turned on for the child and off for the grandchild which is not unlikely scenario.

                      Comment


                        #12
                        Re: Trouble finding a way to mark grandchild records

                        Thanks everyone for responding. I did not know that Referential Integrity was required for the grandchild record to retain the mark. After I changed that, the grandchild record retained the mark.

                        I�m a newbie to database design. I bought Alpha 5 for my non-profit agency after Filemaker Pro could no longer meet our demands. The only Alpha 5 resources I have are:

                        Alpha 5 User Guide ver 9
                        Alpha 5 Made Easy ver 9
                        XBasic for Everyone

                        I just re-checked these resources, and didn�t find anything explaining that Referential Integrity was required for the linked table to retain the mark.

                        Is there an additional resource that anyone could suggest?

                        Thanks in advance.

                        Comment


                          #13
                          Re: Trouble finding a way to mark grandchild records

                          Hi Ray,
                          The only two references I basically have ever used--

                          The help files http://support.alphasoftware.com/alphafivehelpv9/

                          and this messageboard.

                          Between the two of these and learning how to search them (which can take a while in itself to learn!) I have found almost everything I needed to know...and when I couldn't I availed myself on this board and asked the generous people here.

                          I really should read through those materials you referenced sometime--especially Dr. Wayne's book which I have only "skimmed" so far.

                          Some things such as knowing the answer to this question, requires an understanding of a relational database and how Alpha works---the latter is something I still learn about quite often (I have a ways to go yet I might add!), but it does come easier over time I have noticed as well....
                          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