AnsweredAssumed Answered

What's the best way to do a partial cascading delete?

Question asked by matt.rowe on Feb 23, 2012
Latest reply on Feb 23, 2012 by matt.rowe

FMP newbie question I'm afraid!


Part of my database looks like this:


Lease --< LeaseLetUnit >-- LettingUnit


When I delete a Lease record I want to change a field in the LettingUnit table (LettingUnit::Status) to the string "Vacant", before the Lease record and LeaseLetUnit join record are deleted (by way of a cascading delete on the relationship between these two TOs i.e. Lease --< LeaseLetUnit).


The Letting Unit's details appear on a portal on the Lease Details layout.


Can I use the "Go To Portal row"/"Set Field" script step to iterate through each record in the portal to achieve this (by way of a custom menu item)? If so what would happen if there were no rows in the portal? Or should I use a more complex approach in a new window, passing paramters and switching layouts etc?


Being a newbie; I'm not aware of the "gotchas" when taking the simplewr approach!


Any help you can offer is much appreciated.


Thanks in advance.