10 Replies Latest reply on Apr 24, 2012 6:52 AM by JosahMower

    Relationship between tables issue

    JosahMower

      Title

      Relationship between tables issue

      Post

      I have a REQ table and a note table that have a relationship by Req index number. If I delete the note record it deletes the whole Req record also.

      The relationship is req has not check marks and note req only has allow creation of records in this table via this relationship checked, for __pkReqindex = _fkReqIndex.

        • 1. Re: Relationship between tables issue
          philmodjunk

          There's more than one way to delete a record.

          What method are you using to delete a record from the note table? (We need to know the exact steps you are taking.)

          • 2. Re: Relationship between tables issue
            JosahMower

            Just deleteing from the top option delete record. I am just trying to get tables setup and linked at this stage. I did try to create a button using delete record/request, but it is also deleteing the record from Req table.

            • 3. Re: Relationship between tables issue
              philmodjunk

              From what layout are you deleting the record? If you enter layout mode and check layout setup, do you see your REQ or your notes table listed in "Show Records From"?

              Does this layout display the notes records in a portal? If so, when you attempt to delete the record, what is the exact wording in the confirmation dialog you get when you select this menu option?

              • 4. Re: Relationship between tables issue
                JosahMower

                I am inside the Note Form for Req. Inside Layout Setup, the Show Records from is the REQ table. There is a portal in Req Form showing the date and subject about the Notes attached to the Req record.

                 

                What I am doing is from the Req form inside the portal for the Notes I have a link to click on subject and it takes you to a new window with the notes on that subject. When I delete the record for the note, say I put the wrong infor in or dont need the note, and delete it, the REQ and all the notes are deleted from the DB altogether.

                 

                Also afte I commit the record after creating a new one and the index # is placed it deletes the Req infor also.

                • 5. Re: Relationship between tables issue
                  philmodjunk

                  What I am doing is from the Req form inside the portal for the Notes I have a link to click on subject and it takes you to a new window with the notes on that subject. When I delete the record for the note, say I put the wrong infor in or dont need the note, and delete it, the REQ and all the notes are deleted from the DB altogether.

                  Are you deleting from the new window or from the original layout?

                  When you select the Delete record option, what is the exact wording that appears in the dialog box asking you if you really want to delete that record?

                  • 6. Re: Relationship between tables issue
                    JosahMower

                    The Exact wording when I hit delete "Permanently delete this ENTIRE record?"

                     

                    After I changed the Show record from, from Req table to Note table it was deleting just from the note table. I dont know how it was set to Req table but after changing that corrected the issue.

                    I am assuming it was seeing the Show record Req table as the master table and when I deleted it, it was using the relationship index to delete the record from the Req Table instead of the Note Table.

                    • 7. Re: Relationship between tables issue
                      philmodjunk

                      The Exact wording when I hit delete "Permanently delete this ENTIRE record?"

                      This indicates that you are deleting a record from the REQ table not the notes table.

                      Delete record deletes a record from the layout's table--the table listed in "Show Records From". This has nothing directly to do with your relationship to Notes.

                      The except to this is if you have enabled portal row deletion in a portal AND a portal row is currently selected, Delete Record will then delete the related record from the portal. In this case, you get a slightly different message in the confirmation dialog so this is why I asked about the exact wording.

                      • 8. Re: Relationship between tables issue
                        JosahMower

                        I am moving to a new windows after selecting the subject line that takes me to the record for the Req-Note table. I am not deleting any thing from the portal just moving to a new window and form that has all the detail about the note and from there I can delete or make changes.

                         

                        Now I have a new problem. When I select the record / subject to open a new window to view the note it is taking me to the first record for notes. It is no longer taking me to the not I am selecting. Example: note RN10050 is what I am looking for, it is taking me now to RN10000. (RN10000) RN is for Req-Note index. But the tables are linked together by ReqIndex number RQ10000.

                        The portal button script is:

                        New Window
                        Go to Layout ["Req-Note" (tblNoteReq")]   # tblNoteReq was tblReq
                        Enter Browse Mode []

                        • 9. Re: Relationship between tables issue
                          philmodjunk

                          New Window is disconnecting the "focus" on the selected note.

                          If you are selecting the note from a portal, Use Go to Related records to open the new window, while also specifying the layout desired.

                          If you are selecting such a record from a list view of note records, you can capture the ID number in a variable and then, after opening the new window and specifying the layout, use the variable as search criteria to perform a find for the ID number.

                          • 10. Re: Relationship between tables issue
                            JosahMower

                            I have been playing with the Go Related all morning and had no luck till just now. I hate when that happens. Thank you for the help.