September 19, 201114 yr We have a number of databases running under FMP11Server. I need to allow a limited group of users to make a link between an existing database and a new one I have written. I chose to do this by building a set of scripts in the old database which display a small modal window containing a filtered list of the records in the new database - the user selects the appropriate record and the link field is updated - this all works exactly as expected. User access to both databases is controlled by having identical user accounts in both databases, so if you have an account in both databases you get access to both; however the new database only has three accounts in common with the old one. If I log in as a user who doesn't have a user account in the new database, I correctly get a login challenge. If I cancel this login challenge, my script continues to run and the user is left looking at an empty modal window. As there doesn't seem to be a way of capturing the users 'cancel' choice on the login challenge, I can't tell the user what went wrong, nor manage a graceful exit. Is there a way of testing if the user has a user account in the new database from a script in the old database? If not, this means I need to hardwire a conditional test in the old database for which accounts can use the linking feature which sort of goes against the grain for future maintenance. Thanks Brian
September 19, 201114 yr Take a look at errors in the 206-212 range. Also generally a cancel event returns Error 1. Steven
September 19, 201114 yr Author Hi Steven Thanks for the prompt response. I'm using FMP 11.0v3 Advanced client. I use the debugging tools to step through the script to monitor the values and error messages. The user account that I am testing with does not have [full access] privileges so I need to activate the debugging tools with the admin logins. In my script, I do a new window on the current layout, then switch to the layout which contains the portal into the other database. The new window is displayed OK, but is immediately by is overlaid by the Login request when the layout is switched. When you click the cancel button on the login, the last error value shown in the debugging window remains at 0, Is this the expected behaviour? Thanks Brian
September 19, 201114 yr After the login event, you could test to see whether the target file is open or not.
Create an account or sign in to comment