Jump to content

(FM7) Wrong related record is deleted


RWX

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

Recommended Posts

I seem to have run into a little problem (bug?) in FM7 with related records being deleted. Or, perhaps I'm just doing something wrong? :-)

I have a single file with many tables. One table, Students, keeps track of student information. Another table, Student Interests, is a list of possible student interests. Student Interests JOIN joins Students and Student Interests.

Students and Student Interests are also joined directly. A global in the Students table contains a "1" and each "active" Student Interest receives a "1" via calculation in the Student Interests table. This global field and ActiveFlag field are related. This shows a list of all available Student Interests.

I have two portals positioned next to each other on the screen. All Interests is on the left, while Student Interests is on the right. Clicking a right arrow button adds the selected interest in All Interests to the Student Interests list. Clicking a left arrow button deletes the Student Interest.

If, however, I click a portal row in the All Interests list and click the left arrow, that record is deleted despite having "Allow Deletion of Portal Records" unchecked. Why is this happening? Even though the script step is "Delete Portal Row", if the portal doesn't have allow deletion checked, how can the record be deleted? Am I missing something? Or this a bug?

Also, I assume there's still no way to target a specific portal on a layout? Grumble, grumble...

-Rob

FileMaker Version: Dev 7

Platform: Mac OS X Panther

Link to comment
Share on other sites

1. There is no bug. That's how portal row delete scripts work. The other option is just for manual row deletion.

2. The way to go to a specific portal is the same as it has been since FM3. Go to a FIELD that exists in a portal; THEN go to a row. Example:

Go to field [invoices::InvoiceID]

Go to portal row [1]

Link to comment
Share on other sites

I thought that might be the case re: deletion, but wanted to ask.

As for the specific portal, that won't really work for my needs. I want to check that the user has clicked a line in the correct portal before the rest of the script runs. If, for example, the user has clicked a portal row in the Student Interests portal and clicked the Right (Add) Arrow, nothing should happen as you can only add from the left (All Interests) portal to the right (Student Interests) portal.

Does that make sense? Any ideas?

-Rob

Link to comment
Share on other sites

This topic is 7292 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.