Firstly, in the portal, you 'allow deletion of records' then insert a button in the portal to run this script:
Set Variable ($productID ; yourproductstable::productID)
Set Variable ($distributorID ; yourdistributortable::distributorID)
Go To Layout ["Join Table" (YourJoinTable)]
Enter Find Mode
Set Field [YourJoinTable::ProductID ; $productID]
Set Field [YourJoinTable::DistributorID ; $distributorID]
Delete All Records // make sure 'Perform Without Dialog' is unchecked when you're testing :)
You may also want to add logic to test if there's more than one join_table record for that combination of Product and Distributor
update..just realised that of course you're not deleting records of the portal, so that first bit about allowing their deletion is spurious
The Filemaker Fog has lifted a bit more. I was mentally missing the bit where you can enter values into a 'field' in find mode without actually changing a record.
I can see that I may end up with orphaned product records if all the records of the join_table are deleted for a particular product, ie no distributor supplies a particular product. Any thoughts on how to detect this situation?
If you use a script to delete the join table record, the script can first go to the related products record and count the number of related join table records. If the count is 1--the record you are about to delete, then the product record will be an orphan and the script can either delete that record or ask the user if it should be deleted.