FMP 15 and 16 Windows and Mac
I have a database of products. When a new product record is created by a user it requires approval from a manager before it can be used elsewhere in the system.
To this end, I created a script that when a new product record is created an alert email to the relevant manager with a snapshot link as an attachment is sent. The manager can then go straight to that record to review it.
This works just fine if the manager does not already have the products file open.
However, if the manager already has the file open, then the snapshot link still opens a new window. This can be a bit confusing for the manager as they may well already be in the same layout as the snapshot link takes them to when opening the second window, the result, two windows open on the same layout.
I am wondering if there is any way of controlling whether the snapshot link opens another window if the recipient already has a window open or perhaps closing the already open window if it has the same layout name as the one the snapshot link takes them to?
I have thought about creating a new table of snapshot links where a script copies the ID of the record I want the manager to view, creates a new record in the snapshot links table containing that ID and having the snapshot link send that record as the link. When the recipient opens the snapshot link, an On Layout Enter trigger could conceivably then set the ID in to a variable, close the newly opened window, navigate to the correct layout and find the record using the ID variable. I haven't tried this yet but I was thinking it sounds a bit of a clunk.
I would be very grateful if anyone could offer some advice on a better way to solve the problem.
Thanks as always.