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.

return to original layout after a canceled find

Featured Replies

I've created a script that will put a user in find mode in a find layout. However if a user hits the cancel button in the middle of the find it leaves them in that find layout. What would be the best way to have the user return to the original layout if they hit the cancel button during the find?

Thanks,

Alain

Probably not the best solution but it is "a" solution tongue.gif" border="0

Hide the status area (can be done with 'Toggle Status Area(Toggle)') This disables the user from clicking on the cancel button that appears on the left side of the screen (will also probably have to do some modifying so that the user can't hit escape to stop the script) Then you can make your own cancel button in the layout where you can switch back to the original layout/mode and stop the other script.

Hope this helps

The two script steps we tend to start every script with are:

Allow User Abort (off)

Set Error Capture (on)

The first disables the "Cancel" option on such things as Find and Replace. The second prevent the display of FM built-in dialogs such as the "No Records Found". The use of these prevents your scripts from stopping, you must test for errors and provide the user "Cancel" type navigation. For instance in a find:

Perform Find ()

If(Status(CurrentError) = 401

Show Message (No records were found, OK)

Go to Layout (Layout to return to)

Enter Browse Mode

Set Zoom Level (100%)

Scroll Window (home)

Toggle Status Area (hide, lock)

If (Status(CurrentPlatform) = 1)

Toggle Window(Zoom)

else

Toggle Window(Maximize)

End If

Also thrown into this script are steps to make sure you end up in Browse Mode and reset the view of the screen by scrolling back to the top, making sure you are at 100% view, locking the status bar, and sizing the window based upon whether you are on a Mac or PC.

(a little overboard as an answer, but it gives you a flavor of the kind of things that go into advanced scripting wink.gif" border="0 )

-bd

  • Author

Thanks for your help guys. Much appreciated.

Alain

  • 1 year later...

Liveoak - thanks for the explination, I was set out to do exactly what you just described! My work is done for the day, hehe smile.gif

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.