Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7262 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

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

Posted

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

Posted

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

Posted

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

Posted

To all: Thank you!

Frank

Posted

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

Posted

Thanks again QuinTech!

The uploaded database works beautifully!

Frank

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.