Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Capturing a cancelled login as an error

Featured Replies

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

Take a look at errors in the 206-212 range. Also generally a cancel event returns Error 1.

Steven

  • 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

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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.