Hi,
In a 'price file comparison' solution I have a script which deletes an individual price file and its parent supplier record. Script is as below, triggered by a button on the parent record. My problem is that sometimes there is a delay before the custom dialog is displayed. In this time filemaker is performing a find. The delay seems to be proportional to the size of the price file in question and for long files the 'finding' box is displayed briefly. If you wait for the find to complete, decline to delete the file then run the script again it goes straight to the dialog.
This isn't a killer problem but I'd rather cut the delay out of the process, has anyone got any ideas why it happens?
Regards
Tom
The script:
Set Error Capture [ On ]
Show Custom Dialog [ Title: "Are you sure"; Message: "This will DELETE the current list for this supplier: proceed?"; Buttons: “OK”, “Cancel” ]
If [ Get (LastMessageChoice) = 2 ]
Exit Script [ ]
Else
End If
Set Variable [ $pk_sup; Value:Suppliers::pk_Sup ]
Go to Layout [ “pricelist for delete test” (Pricelist 5) ]
Show All Records
Enter Find Mode [ ]
Set Field [ Pricelist 5::fk_sup; $pk_sup ]
Perform Find [ ]
Delete All Records
[ No dialog ]
Go to Layout [ “SuppliersInfoForSupplierManagement” (Suppliers) ]
Enter Find Mode [ ]
Set Field [ Suppliers::pk_Sup; $pk_sup ]
Perform Find [ ]
Delete Record/Request
[ No dialog ]
Perform Script [ “VieworEditSuppliers” ]
Exit Script [ ]
Set Error Capture [ Off ]