Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5751 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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.

Posted

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.

This topic is 5751 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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