fbugeja Posted January 4, 2005 Posted January 4, 2005 I created a portal to show related records from another table. Each row has a delete button to allow the user to delete that portal row (only). Unfortunately, clicking the delete button on any portal row deletes all related records in the portal. What am I doing wrong? Frank
transpower Posted January 4, 2005 Posted January 4, 2005 The delete portal row script step pertains to the selected row. To be extra careful with your buttons, have the script go to that portal row number, then delete that portal row.
Himitsu Posted January 4, 2005 Posted January 4, 2005 Just curious, did you select the check box "Allow deletion of records through this relatioship" on the relationship that portal uses?
fbugeja Posted January 4, 2005 Author Posted January 4, 2005 I've attached the file. It only has 1 record (Peter Green). I am finding that sometimes the delete button deletes the correct portal row, sometimes it deletes all records in the portal. On logging in, the account name and password is "abc" - lower case Frank MASTERempty.fp7.zip
QuinTech Posted January 4, 2005 Posted January 4, 2005 I think Himitsu hit the nail on the head. You have another relationship coming off Infringements, to a second TO of Infringements. When you delete one portal row in the example you posted, it deletes (one instance of) the record where StudentMatch=2; but, because you have the relationship to Infringements2 set to delete related records, when that first action is taken, it deletes all related records, which is why you see multiple portal rows disappear. J
fbugeja Posted January 5, 2005 Author Posted January 5, 2005 QuinTech Thanks for your reply. Could you please re-post the corrected database to the forum. I am a newbie to FMP at this level and learn by looking at actual databases. I would like to re-examine the corrected database with your reply next to it! Many thanks! Frank
QuinTech Posted January 5, 2005 Posted January 5, 2005 Hi, Frank. It is beyond my scope to give you a recommendation as to what you should do, because i am not sure why that particular relationship was set to "Delete related records in this table when a record is deleted in the other table." However, i can tell you how to stop those other records from being deleted. This may cause other issues. Go into the relationships chart for your database. Take a look at the relationship between the TO Infringements and the TO Infringements 2. You'll notice that on the Infringements 2 side, the "Delete related records" option is checked off. To prevent the behavior you objected to in your initial post, uncheck this. As i said, this may have unintended consequences, but it will correct the issue. HTH, J
fbugeja Posted January 5, 2005 Author Posted January 5, 2005 Sorry for this: QuinTech / J - could you please re-upload the corrected database. When I unzip the file, I get FileMaker Pro. exe on a Mac and an unopenable FMP on my Windows XP laptop! Many thanks Frank
QuinTech Posted January 5, 2005 Posted January 5, 2005 I have no idea what's going on... i have an fp7 file, i add it to a WinZip archive, verify that it contains MasterEmpty.fp7, upload it, but then when i download it to check it, it contains FileMaker Pro.exe (version 6, no less)! Trying again... MASTERempty_Corrected.zip
QuinTech Posted January 5, 2005 Posted January 5, 2005 OK, the attachment in my last post looks like it should work.
fbugeja Posted January 6, 2005 Author Posted January 6, 2005 Thanks again QuinTech! The uploaded database works beautifully! Frank
Recommended Posts
This topic is 7262 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now