Skip 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.

DoScript Validation Problem

Featured Replies

I'm using the DoScript plug-in from http://myfmbutler.com/ in order to trigger scripts, but I've run into a bit of a problem.

The script I want to trigger takes the user to a different layout. The layout the user is in when the script is trigger includes a number of fields that can't be left blank. The script is triggered as soon as a record is committed.

However, this leads to a problem: if the user fills in every field in a record and then creates a new record, the first record is committed and the script is triggered. The script tries to take the user to a different layout, but by this point the user is being presented with a blank record, which doesn't validate because it's blank. Because it won't validate the user can't move away from it, and therefore the new layout won't load.

Any thoughts on how I can get round this?

--Jim

Welcome to the forum.

I don't use fmbutler, but, why not put in a trap to see if all the fields are empty and if so show a dialog.

If (IsEmpty(F1) AND IsEmpty(F2) AND IsEmpty(F3) AND IsEmpty(.....))

Show Custom Dialog ("Do you want to complete this record, blah, blah?"; Yes,No)

If(Get(LastMesasageChoice)=1)

Exit Script()

EndIf

hth

  • Author

That's really useful, thanks!

In reading your post again why not just have a dialog ask if the user wishes to create a new record?

If yes, create new record

If no, go to layout.

Then you don't need to worry about what fields are empty. Just another way to approach the problem.

  • Author

Thanks - in the end I worked out that I could just open a new window to do all the stuff I needed to do, and then close it again, and that solution has worked really well.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.