Different Behaviour When Deleting Portal Records

FileMaker Pro 19 running in Windows and Mac, separated solution connected to Windows FMS 19 server.

In a standard window, a button in a portal row to run a single step ‘Delete Portal Row’ deletes the related record and as soon as the record is committed by any method all references to this related record is removed.

Admittedly, in this case the relationship in use here is based on a global field, which may be a factor, as we’re using a master detail layout to populate a standard portal with line items from products.

Using a card window and a single step delete portal row, the references to the related record are retained unless a scripted commit is included (we first tested all the refresh script steps, but these do not work). For instance using List () the only manual method of removing a reference in the result is to click on another record in the master detail portal thereby effectively only updating by leaving the record (see Claris, OnRecordExit script trigger isn’t that difficult after all :joy:).

I’ve just been caught out by this when adding records from the master detail list to the related portal and subsequently deleting them during a test to establish whether clicking on the master detail portal record is to view an existing related record or add a new one.

In practice, a user is unlikely to add a record and then immediately click the same record in the master detail portal, but they could add it, change their mind and delete it, then change again and then add it again, which would fail without the scripted portal deletion.

What is also interesting is that if the data viewer is open, as shown by the attached, clicking on the card window then refreshing the data view does clear the value, although sometimes this has to be repeated more than once, Without the data viewer open the references to the deleted record persist unless a scripted commit is run.

We’ve had all sorts of refresh problems in the past, but I can’t recall when it hasn’t been possible to update simply by clicking in the background of a layout. The layout used for the card window is set to ‘Save record changes automatically, but not in this case.

The nuances of FileMaker development!


Great observations! Did it behave let’s say more predictable/ reliable/ consistent if portal connected via non-globals?

BTW portal row Sorting with uncommitted rows works until row added ..