February 19, 200916 yr 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
February 19, 200916 yr 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
February 20, 200916 yr 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.
February 25, 200916 yr 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